:root {
    --bg-color: #0b0f19;
    --panel-bg: rgba(22, 28, 45, 0.6);
    --panel-border: rgba(255, 255, 255, 0.08);
    --accent-color: #00ff88;
    --accent-hover: #00cc6a;
    --text-main: #ffffff;
    --text-muted: #8b949e;
    --glass-blur: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(0, 255, 136, 0.05), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 162, 255, 0.05), transparent 25%);
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--panel-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.nav-brand small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 24px;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--accent-color);
}

.support-link {
    color: #ff6b6b;
}

.support-link:hover {
    color: #ff8e8e;
}

.blog-link {
    color: #a78bfa;
    font-weight: 700;
}

.blog-link:hover {
    color: #c4b5fd;
}

.blog-footer-link {
    margin-top: 4px;
    font-size: 0.82rem;
}

.blog-footer-link a {
    color: #a78bfa;
}

.blog-footer-link a:hover {
    filter: brightness(1.25);
}

.blog-partner-btn {
    background: rgba(167, 139, 250, 0.12) !important;
    border-color: rgba(167, 139, 250, 0.3) !important;
    color: #c4b5fd !important;
}

.blog-partner-btn:hover {
    background: #a78bfa !important;
    color: #0b0f19 !important;
    border-color: #a78bfa !important;
    box-shadow: 0 4px 15px rgba(167, 139, 250, 0.4) !important;
}

/* World Cup Hero Banner */
.wc-hero-banner {
    background: linear-gradient(135deg, rgba(0,255,136,0.08), rgba(0,162,255,0.08));
    border-bottom: 1px solid rgba(0,255,136,0.15);
    padding: 10px 30px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.wc-hero-banner strong {
    color: var(--text-main);
}

.wc-flag {
    font-size: 1.1rem;
    margin: 0 3px;
}

.share-link {
    color: #7aaeff;
}

.share-link:hover {
    color: #a8caff;
}

.app-container {
    display: flex;
    min-height: calc(100vh - 110px);
    padding: 20px;
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

/* Sidebar styling */
.sidebar {
    width: 320px;
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.sidebar-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--panel-border);
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: filter 0.2s;
}

.sidebar-footer a:hover {
    filter: brightness(1.2);
}

.sidebar-header {
    padding: 30px 24px;
    border-bottom: 1px solid var(--panel-border);
}

.sidebar-header h1 {
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.5px;
}

.sidebar-header h1 span {
    color: var(--accent-color);
}

.sidebar-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
    font-weight: 300;
}

.sidebar-scroll-area {
    flex: 1;
    overflow-y: auto;
}

.sidebar-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.sidebar-scroll-area::-webkit-scrollbar-thumb {
    background: var(--panel-border);
    border-radius: 10px;
}

.channel-list {
    padding: 12px;
}

.channel-item {
    padding: 16px;
    margin-bottom: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.channel-item.active {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
}

.channel-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.channel-item.active .channel-icon {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
}

.channel-info h3 {
    font-size: 1rem;
    font-weight: 600;
}

.channel-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.live-badge {
    display: inline-block;
    background: #ff3b3b;
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 6px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 4px;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}


/* Main Player Area */
.player-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.video-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 75vh;
    flex-shrink: 0;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--panel-border);
}

video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
}

.overlay {
    position: absolute;
    inset: 0;
    background: rgba(11, 15, 25, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 255, 136, 0.2);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.stream-info {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 24px 30px;
}

.stream-info h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.stream-info p {
    color: var(--accent-color);
    font-weight: 400;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stream-info p::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent-color);
}

.stream-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.stream-action-btns {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.icon-btn {
    background: rgba(0,255,136,0.1);
    border: 1px solid rgba(0,255,136,0.25);
    color: var(--accent-color);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 7px 14px;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: rgba(0,255,136,0.2);
    transform: translateY(-1px);
}

/* Advertisement Slot */
.ad-slot {
    background: rgba(16, 22, 38, 0.6);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.ad-banner-link {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    padding: 20px;
    border-radius: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ad-banner-link:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: rgba(0, 255, 136, 0.05);
}

.professional-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.professional-contact p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 400px;
}

.partner-btn {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.partner-btn:hover {
    background: var(--accent-color);
    color: #0b0f19;
    border-color: var(--accent-color);
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.3);
}

.text-link-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.2s;
}

.text-link-btn:hover {
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: 300px;
        flex-shrink: 0;
    }
}

/* ===== CORS Help Button (in error overlay) ===== */
.cors-help-btn {
    margin-top: 16px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #00ff88, #00bfff);
    color: #0b0f19;
    border: none;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.cors-help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 255, 136, 0.5);
}

/* ===== CORS Modal Backdrop ===== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.25s ease;
}

.modal-backdrop.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ===== Modal Box ===== */
.modal-box {
    background: rgba(16, 22, 38, 0.95);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 24px;
    padding: 36px;
    max-width: 640px;
    width: 100%;
    position: relative;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 136, 0.05);
    animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.modal-box::-webkit-scrollbar { width: 4px; }
.modal-box::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 4px; }

.modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: rgba(255,255,255,0.07);
    border: none;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
    background: rgba(255, 59, 59, 0.2);
    color: #ff3b3b;
}

/* ===== Modal Header ===== */
.modal-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--panel-border);
}

.modal-icon {
    font-size: 2.4rem;
    flex-shrink: 0;
    line-height: 1;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    background: linear-gradient(90deg, #00ff88, #00bfff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.modal-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ===== Steps ===== */
.cors-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.step {
    display: flex;
    gap: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 14px;
    padding: 18px;
    transition: border-color 0.2s;
}

.step:hover {
    border-color: rgba(0, 255, 136, 0.2);
}

.step-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #00ff88, #00bfff);
    color: #0b0f19;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.step-content h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.step-content strong { color: var(--text-main); }
.step-content em { color: var(--accent-color); font-style: normal; }

kbd {
    display: inline-block;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 5px;
    padding: 1px 8px;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-main);
}

/* ===== Extension Link Buttons ===== */
.ext-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.ext-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid transparent;
}

.ext-btn.chrome {
    background: rgba(66, 133, 244, 0.15);
    border-color: rgba(66, 133, 244, 0.35);
    color: #7aaeff;
}

.ext-btn.edge {
    background: rgba(0, 120, 212, 0.15);
    border-color: rgba(0, 120, 212, 0.35);
    color: #60b8ff;
}

.ext-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Tip Box ===== */
.modal-tip {
    background: rgba(0, 255, 136, 0.06);
    border: 1px solid rgba(0, 255, 136, 0.2);
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-tip strong { color: var(--accent-color); }

/* ===== Close button at bottom ===== */
.close-bottom-btn {
    width: 100%;
    padding: 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    color: var(--text-muted);
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.close-bottom-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

/* ===== About Modal specific styles ===== */
.about-content p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.about-content strong {
    color: var(--text-main);
}

.about-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--accent-color);
    font-family: monospace;
}

/* Support Options */
.donation-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.donate-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
}

.donate-icon {
    font-size: 2rem;
    color: #f7931a;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.donate-card:nth-child(2) .donate-icon {
    color: #627eea;
}

.donate-details h4 {
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: var(--text-main);
}

.wallet-address {
    cursor: pointer;
    font-size: 0.8rem;
    word-break: break-all;
    display: block;
    transition: background 0.2s, color 0.2s;
    position: relative;
}

.wallet-address:hover {
    background: rgba(0, 255, 136, 0.2);
    color: #fff;
}

.wallet-address:active::after {
    content: "Copied!";
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.7rem;
    color: var(--accent-color);
}

.paypal-btn {
    display: block;
    text-align: center;
    background: #0070ba;
    color: white;
    text-decoration: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: background 0.2s, transform 0.2s;
    margin-top: 8px;
}

.paypal-btn:hover {
    background: #005ea6;
    transform: translateY(-2px);
}

/* ===== CTA Banner ===== */
.cta-banner {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.05), rgba(0, 191, 255, 0.05));
    border: 1px solid rgba(0, 255, 136, 0.15);
    border-radius: 20px;
    padding: 30px;
    margin-top: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}


/* ===== Tournament Dashboard ===== */
.tournament-dashboard {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dashboard-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.tab-nav {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    overflow-x: auto;
}

.tab-nav::-webkit-scrollbar { height: 0; }

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--accent-color);
    color: #0b0f19;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.match-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, border-color 0.2s;
}

.match-card:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 136, 0.2);
}

.match-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
}

.match-status {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: right;
    margin-top: 4px;
}

.match-status.live {
    color: #ff3b3b;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

.match-status.ft {
    color: var(--accent-color);
}

/* Standings Table */
.table-responsive {
    overflow-x: auto;
}

.table-responsive::-webkit-scrollbar { height: 6px; }
.table-responsive::-webkit-scrollbar-thumb { background: rgba(0,255,136,0.2); border-radius: 4px; }

.standings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

.standings-table th, .standings-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.standings-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.standings-table tr {
    transition: background 0.2s;
}

.standings-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Stats Pane */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
}

.stat-card h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.stat-list li {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-bottom: 10px;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}

.stat-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.stat-list li strong {
    color: var(--accent-color);
    font-weight: 800;
}

/* ===== Share Modal ===== */
.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 4px 0 16px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}

.share-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.15);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.share-btn.whatsapp  { background: #25D366; color: #fff; }
.share-btn.twitter   { background: #000; color: #fff; border: 1px solid #333; }
.share-btn.facebook  { background: #1877F2; color: #fff; }
.share-btn.telegram  { background: #229ED9; color: #fff; }
.share-btn.copy-link { background: rgba(255,255,255,0.07); color: var(--text-main); border: 1px solid var(--panel-border); }
.share-btn.native-share { background: linear-gradient(135deg,#00ff88,#00bfff); color: #0b0f19; }

.copy-confirm {
    text-align: center;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 8px;
    border-radius: 8px;
    background: rgba(0,255,136,0.08);
    border: 1px solid rgba(0,255,136,0.2);
    animation: fadeIn 0.3s ease;
}

.copy-confirm.hidden { display: none; }

/* ===== Stats & CORS Sections ===== */
.page-section {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 24px;
    margin-top: 24px;
    backdrop-filter: blur(var(--glass-blur));
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--panel-border);
    padding-bottom: 12px;
}

.stats-container {
    color: var(--text-muted);
}

.stats-description {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.stats-placeholder {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.stat-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, background 0.2s;
}

.stat-box:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.06);
}

.stat-box h3 {
    color: var(--accent-color);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-box p {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
}

.cors-guide-section {
    border-color: rgba(255, 171, 0, 0.3);
}

.cors-guide-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.cors-guide-content ol {
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-main);
}

.cors-guide-content li {
    margin-bottom: 12px;
    line-height: 1.5;
}

.cors-guide-content li strong {
    color: #ffab00;
}

.cors-guide-content a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.cors-guide-content a:hover {
    text-decoration: underline;
}

.cors-warning {
    font-size: 0.9rem !important;
    color: #ff8e8e !important;
    background: rgba(255, 107, 107, 0.1);
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid #ff6b6b;
}

/* ===== Web Stream & Iframe Styles ===== */
#iframePlayer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 10;
    background: #000;
}

#iframePlayer.hidden {
    display: none;
}

.channel-category {
    padding: 16px 20px 8px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s;
}

.channel-category:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.accordion-arrow {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hidden-content {
    display: none !important;
}

.sidebar-ad {
    margin: 16px;
}

.top-ad {
    margin-bottom: 20px;
}

/* ===== Responsive & Mobile Friendly Styles ===== */
@media (max-width: 992px) {
    .app-container {
        flex-direction: column;
        padding: 10px;
        gap: 15px;
    }

    .player-container {
        order: 1;
    }

    .sidebar {
        order: 2;
        width: 100%;
        height: 500px; /* Fixed height so the internal scroll area works */
    }

    .top-nav {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
        text-align: center;
    }

    .nav-brand {
        justify-content: center;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .stream-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .stream-action-btns {
        width: 100%;
        justify-content: space-between;
    }

    .stats-placeholder {
        grid-template-columns: 1fr;
    }

    .page-section {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .sidebar {
        height: 400px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .stat-box h3 {
        font-size: 2rem;
    }

    .modal-box {
        width: 95%;
        padding: 20px;
    }

    .share-grid {
        grid-template-columns: 1fr;
    }

    .stream-action-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .stream-action-btns button {
        width: 100%;
        justify-content: center;
    }
}
