/* ============================================
   LANGUAGE SELECTOR
   ============================================ */
.language-selector {
    display: flex;
    gap: 4px;
    align-items: center;
    background: #1f2a36;
    padding: 4px 8px;
    border-radius: 30px;
    border: 1px solid #2e3b4a;
    flex-shrink: 0;
    height: 38px;
    box-sizing: border-box;
}

.language-selector a {
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #8b9bb0;
    text-decoration: none;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.language-selector a:hover {
    color: #fff;
    background: #2a3848;
}

.language-selector a.active {
    color: #f6b83e;
    background: #2a3848;
}

.language-selector .lang-flag { font-size: 0.9rem; }
.language-selector .lang-name { font-size: 0.75rem; }

/* ============================================
   THEME SELECTOR Ã¢â‚¬â€ PILL TOGGLE
   ============================================ */
.theme-selector {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: #1f2a36;
    padding: 3px;
    border-radius: 30px;
    border: 1px solid #2e3b4a;
    flex-shrink: 0;
    height: 38px;
    box-sizing: border-box;
}

.theme-selector a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    color: #8b9bb0;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    line-height: 1;
    user-select: none;
    box-sizing: border-box;
    font-size: 0;
}

.theme-selector a .theme-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 14px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    opacity: 0.45;
    filter: grayscale(0.4);
    transition: opacity 0.2s ease, filter 0.2s ease, transform 0.2s ease;
}

.theme-selector a:hover {
    background: rgba(255, 255, 255, 0.06);
}

.theme-selector a:hover .theme-icon {
    opacity: 0.85;
    filter: grayscale(0);
}

.theme-selector a.active {
    background: #2a3848;
    box-shadow: inset 0 0 0 1px rgba(246, 184, 62, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.3);
}

.theme-selector a.active .theme-icon {
    opacity: 1;
    filter: grayscale(0);
    transform: scale(1.05);
}

/* Fallback: if no .active exists, still highlight first child */
.theme-selector:not(:has(a.active)) a:first-child {
    background: #2a3848;
    box-shadow: inset 0 0 0 1px rgba(246, 184, 62, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.3);
}

.theme-selector:not(:has(a.active)) a:first-child .theme-icon {
    opacity: 1;
    filter: grayscale(0);
}

/* ============================================
   LIGHT THEME Ã¢â‚¬â€ SELECTORS
   ============================================ */
body.light-theme .language-selector {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

body.light-theme .language-selector a {
    color: #64748b;
}

body.light-theme .language-selector a:hover {
    color: #1a2330;
    background: #e2e8f0;
}

body.light-theme .language-selector a.active {
    color: #d97706;
    background: #e2e8f0;
}

body.light-theme .theme-selector {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

body.light-theme .theme-selector a {
    color: #64748b;
}

body.light-theme .theme-selector a:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .theme-selector a.active {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-theme .theme-selector a.active .theme-icon {
    opacity: 1;
    filter: grayscale(0);
}

body.light-theme .theme-selector:not(:has(a.active)) a:first-child {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(217, 119, 6, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.08);
}

body.light-theme .theme-selector:not(:has(a.active)) a:first-child .theme-icon {
    opacity: 1;
    filter: grayscale(0);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, system-ui, sans-serif;
}

body {
    background: #0b0e14;
    color: #eef2f7;
    line-height: 1.5;
}

body.light-theme {
    background: #f5f7fa;
    color: #1a2330;
}

a { text-decoration: none; color: inherit; }

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAV
   ============================================ */
.header {
    background: #141a24;
    padding: 16px 0;
    border-bottom: 1px solid #2a3340;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(4px);
}

body.light-theme .header {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 50px;
    width: auto;
    display: block;
    transition: all 0.3s ease;
}

.logo img:hover { transform: scale(1.02); }

.header-search {
    display: flex;
    align-items: center;
    background: #1f2a36;
    border-radius: 40px;
    padding: 6px 16px 6px 20px;
    border: 1px solid #2e3b4a;
    flex: 1 1 280px;
    max-width: 420px;
}

body.light-theme .header-search {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.header-search input {
    background: transparent;
    border: none;
    padding: 10px 6px;
    color: #fff;
    font-size: 0.95rem;
    width: 100%;
    outline: none;
}

body.light-theme .header-search input { color: #1a2330; }

.header-search input::placeholder { color: #8b9bb0; }

body.light-theme .header-search input::placeholder { color: #94a3b8; }

.header-search button {
    background: none;
    border: none;
    color: #b0c4db;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px 8px;
}

body.light-theme .header-search button { color: #64748b; }

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    flex-wrap: wrap;
}

.header-actions a {
    color: #bccbdf;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.light-theme .header-actions a { color: #475569; }

.header-actions a:hover { color: #f6b83e; }
.header-actions a i { margin-right: 4px; }

.header-actions .fav-count {
    background: #f6b83e;
    color: #0b0e14;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* ============================================
   CATEGORY TOGGLE BUTTON (mobile only)
   ============================================ */
.category-toggle {
    display: none;
    background: none;
    border: 1px solid #2e3b4a;
    color: #bccbdf;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s;
    align-items: center;
    gap: 8px;
}

.category-toggle:hover {
    background: #1f2a36;
    color: #fff;
}

body.light-theme .category-toggle {
    border: 1px solid #e2e8f0;
    color: #475569;
}

body.light-theme .category-toggle:hover {
    background: #f1f5f9;
    color: #1a2330;
}

.category-toggle i { font-size: 1.2rem; }

.category-toggle .badge {
    background: #f6b83e;
    color: #0b0e14;
    font-size: 0.65rem;
    padding: 1px 8px;
    border-radius: 20px;
    font-weight: 600;
}

/* ============================================
   CATEGORY BAR (desktop horizontal scroll)
   ============================================ */
.category-bar {
    background: #10171f;
    padding: 14px 0;
    border-bottom: 1px solid #212b36;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

body.light-theme .category-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.category-bar .container {
    display: flex;
    gap: 28px;
    align-items: center;
}

.category-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    color: #b6c9dd;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
    cursor: pointer;
}

body.light-theme .category-item { color: #475569; }

.category-item i {
    color: #f6b83e;
    font-size: 0.9rem;
}

.category-item:hover,
.category-item.active {
    color: #fff;
    border-bottom-color: #f6b83e;
}

body.light-theme .category-item:hover,
body.light-theme .category-item.active { color: #1a2330; }

.category-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: inherit;
}

/* ============================================
   MOBILE CATEGORY DROPDOWN
   ============================================ */
.category-dropdown {
    display: none;
    background: #10171f;
    border-bottom: 1px solid #212b36;
    padding: 10px 0;
}

body.light-theme .category-dropdown {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.category-dropdown.open { display: block; }

.category-dropdown .container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-dropdown .category-item {
    padding: 10px 16px;
    border-radius: 8px;
    border-bottom: none;
    background: #141a24;
    border: 1px solid #1d2836;
    width: 100%;
    justify-content: flex-start;
}

body.light-theme .category-dropdown .category-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.category-dropdown .category-item:hover,
.category-dropdown .category-item.active {
    background: #1f2a38;
    border-color: #f6b83e;
}

body.light-theme .category-dropdown .category-item:hover,
body.light-theme .category-dropdown .category-item.active { background: #f1f5f9; }

.category-dropdown .category-item a { width: 100%; }

/* ============================================
   HERO SECTION - HIDDEN
   ============================================ */
.hero { display: none; }

/* ============================================
   CHANNELS SECTION
   ============================================ */
.channels-section { padding: 28px 0 48px; }

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.section-title h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

body.light-theme .section-title h2 { color: #1a2330; }

.section-title h2 i { color: #f6b83e; margin-right: 10px; }

.filter-links {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-links a {
    color: #9bb0cc;
    font-size: 0.95rem;
    border-bottom: 1px dashed #3f4d61;
    padding-bottom: 2px;
    transition: 0.2s;
}

body.light-theme .filter-links a {
    color: #64748b;
    border-bottom-color: #cbd5e1;
}

.filter-links a.active {
    color: #f6b83e;
    border-bottom-color: #f6b83e;
}

.filter-links a:hover { color: #f6b83e; }

/* ============================================
   CHANNEL GRID
   ============================================ */
.channel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 22px;
    margin-bottom: 40px;
    align-items: stretch; /* Ensures all cards in a row stretch to the same height */
}

.channel-card {
    background: #18202b;
    border-radius: 20px;
    padding: 18px 12px 14px;
    text-align: center;
    transition: 0.25s ease;
    border: 1px solid #25303e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex; /* Added for internal layout control */
    flex-direction: column; /* Added for internal layout control */
    height: 100%; /* Ensures equal height in grid */
}

body.light-theme .channel-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: #f6b83e;
    background: #1f2a38;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5);
}

body.light-theme .channel-card:hover {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.channel-card .card-link { display: block; color: inherit; }

/* ============================================
   CHANNEL LOGO
   ============================================ */
.channel-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 12px;
    background: linear-gradient(145deg, #2d3b4b, #1f2836);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.05);
    border: 2px solid #3a4a5e;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0; /* Prevent logo from squishing */
}

body.light-theme .channel-logo {
    background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
    border: 2px solid #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.channel-card:hover .channel-logo {
    border-color: #f6b83e;
    box-shadow: 0 6px 20px rgba(246, 184, 62, 0.2), inset 0 2px 0 rgba(255, 255, 255, 0.05);
    transform: scale(1.05);
}

.channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    border-radius: 50%;
    background: #1a2330;
    transition: all 0.3s ease;
}

body.light-theme .channel-logo img { background: #ffffff; }

.channel-card:hover .channel-logo img { transform: scale(1.05); }

.channel-logo .logo-text {
    font-size: 2.2rem;
    font-weight: 700;
    color: #f6b83e;
    text-shadow: 0 2px 10px rgba(246, 184, 62, 0.2);
    letter-spacing: 1px;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: all 0.3s ease;
}

.channel-card:hover .logo-text { transform: scale(1.1); }

.logo-text.ulusal { color: #ff6b6b; }
.logo-text.haber { color: #4ecdc4; }
.logo-text.spor { color: #45b7d1; }
.logo-text.muzik { color: #a29bfe; }
.logo-text.cocuk { color: #fd79a8; }
.logo-text.belgesel { color: #fdcb6e; }
.logo-text.yerel { color: #00b894; }
.logo-text.dini { color: #6c5ce7; }
.logo-text.azerbaycan { color: #00cec9; }
.logo-text.kktc { color: #e17055; }

/* ============================================
   CHANNEL CARD ELEMENTS
   ============================================ */
.channel-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin: 8px 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

body.light-theme .channel-card h4 { color: #1a2330; }

.channel-card .category-tag {
    font-size: 0.65rem;
    background: #2c3b4e;
    padding: 3px 12px;
    border-radius: 30px;
    color: #bccfe6;
    display: inline-block;
    margin-top: 4px;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.light-theme .channel-card .category-tag {
    background: #e2e8f0;
    color: #475569;
}

.channel-card .live-badge {
    font-size: 0.7rem;
    color: #4caf50;
    display: block;
    margin-top: 6px;
}

body.light-theme .channel-card .live-badge { color: #22c55e; }

.channel-card .live-badge i { margin-right: 4px; font-size: 0.5rem; }

.channel-card .view-count {
    font-size: 0.7rem;
    color: #6f89aa;
    display: block;
    margin-top: 4px;
}

body.light-theme .channel-card .view-count { color: #94a3b8; }

/* ============================================
   FAVORITE BUTTON
   ============================================ */
.channel-card .favorite-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #6f89aa;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    z-index: 10; /* Ensure it stays above content */
}

body.light-theme .channel-card .favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.channel-card .favorite-btn:hover {
    background: rgba(246, 184, 62, 0.2);
    transform: scale(1.1);
}

.channel-card .favorite-btn.is-favorite { color: #f6b83e; }
.channel-card .favorite-btn.is-favorite i { font-weight: 900; }
.channel-card .favorite-btn.loading { opacity: 0.5; pointer-events: none; }

/* ============================================
   FEATURED BADGE
   ============================================ */
.channel-card .featured-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(246, 184, 62, 0.12);
    color: #f6b83e;
    font-size: 0.4rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(246, 184, 62, 0.25);
    backdrop-filter: blur(4px);
    box-shadow: 0 0 12px rgba(246, 184, 62, 0.08);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 5;
}

body.light-theme .channel-card .featured-badge {
    background: rgba(246, 184, 62, 0.15);
    color: #d97706;
    border: 1px solid rgba(246, 184, 62, 0.3);
}

.channel-card .featured-badge i { font-size: 0.3rem; color: #f6b83e; }

body.light-theme .channel-card .featured-badge i { color: #d97706; }

/* ============================================
   TOAST NOTIFICATION
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #141a24;
    border: 1px solid #2a3340;
    border-left: 4px solid #f6b83e;
    padding: 14px 24px;
    border-radius: 12px;
    color: #eef2f7;
    z-index: 999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
}

body.light-theme .toast {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f6b83e;
    color: #1a2330;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: #f6b83e; font-size: 1.2rem; }

/* Toast variants (border-left color) */
.toast.success { border-left-color: #2ecc71; }
.toast.error { border-left-color: #e74c3c; }
.toast.warning { border-left-color: #f39c12; }
.toast.success i { color: #2ecc71; }
.toast.error i { color: #e74c3c; }
.toast.warning i { color: #f39c12; }

/* ============================================
   NO RESULTS
   ============================================ */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6f89aa;
}

body.light-theme .no-results { color: #94a3b8; }

.no-results i {
    font-size: 3rem;
    display: block;
    margin-bottom: 16px;
    color: #3f4d61;
}

body.light-theme .no-results i { color: #cbd5e1; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination a {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #2e3b4a;
    color: #bccbdf;
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.9rem;
    background: #141a24;
}

body.light-theme .pagination a {
    border: 1px solid #e2e8f0;
    color: #475569;
    background: #ffffff;
}

.pagination a:hover {
    background: #1f2a36;
    color: #fff;
    border-color: #f6b83e;
}

body.light-theme .pagination a:hover {
    background: #f1f5f9;
    color: #1a2330;
}

.pagination a.active {
    background: #f6b83e;
    color: #0b0e14;
    border-color: #f6b83e;
    font-weight: 600;
}

body.light-theme .pagination a.active { color: #ffffff; }

.pagination a.disabled { opacity: 0.4; pointer-events: none; }

.pagination .info {
    color: #6f89aa;
    padding: 8px 16px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

body.light-theme .pagination .info { color: #94a3b8; }

/* ============================================
   LAST ADDED SECTION
   ============================================ */
.last-added-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #1d2836;
}

body.light-theme .last-added-section { border-top: 1px solid #e2e8f0; }

.last-added-section .section-title { margin-bottom: 20px; }

.last-added-section .section-title h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #f6b83e;
}

body.light-theme .last-added-section .section-title h3 { color: #d97706; }

.last-added-section .section-title h3 i { margin-right: 10px; }

.last-added-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.last-added-grid .channel-card {
    background: #18202b;
    border-radius: 16px;
    padding: 14px 10px 12px;
    text-align: center;
    transition: 0.25s ease;
    border: 1px solid #25303e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

body.light-theme .last-added-grid .channel-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.last-added-grid .channel-card:hover {
    transform: translateY(-4px);
    border-color: #f6b83e;
    background: #1f2a38;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

body.light-theme .last-added-grid .channel-card:hover {
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.last-added-grid .channel-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 8px;
    background: linear-gradient(145deg, #2d3b4b, #1f2836);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 2px solid #3a4a5e;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

body.light-theme .last-added-grid .channel-logo {
    background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
    border: 2px solid #cbd5e1;
}

.last-added-grid .channel-card:hover .channel-logo {
    border-color: #f6b83e;
    transform: scale(1.05);
}

.last-added-grid .channel-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    border-radius: 50%;
    background: #1a2330;
}

body.light-theme .last-added-grid .channel-logo img { background: #ffffff; }

.last-added-grid .channel-logo .logo-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: #f6b83e;
}

.last-added-grid .channel-card h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 4px 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

body.light-theme .last-added-grid .channel-card h4 { color: #1a2330; }

.last-added-grid .channel-card .category-tag {
    font-size: 0.6rem;
    background: #2c3b4e;
    padding: 2px 10px;
    border-radius: 30px;
    color: #bccfe6;
    display: inline-block;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

body.light-theme .last-added-grid .channel-card .category-tag {
    background: #e2e8f0;
    color: #475569;
}

.last-added-grid .channel-card .live-badge {
    font-size: 0.65rem;
    color: #4caf50;
    display: block;
    margin-top: 4px;
}

body.light-theme .last-added-grid .channel-card .live-badge { color: #22c55e; }

.last-added-grid .channel-card .live-badge i { margin-right: 4px; font-size: 0.4rem; }

.last-added-grid .channel-card .view-count {
    font-size: 0.6rem;
    color: #6f89aa;
    display: block;
    margin-top: 2px;
}

body.light-theme .last-added-grid .channel-card .view-count { color: #94a3b8; }

.last-added-grid .channel-card .favorite-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #6f89aa;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    backdrop-filter: blur(4px);
}

body.light-theme .last-added-grid .channel-card .favorite-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #94a3b8;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.last-added-grid .channel-card .favorite-btn:hover {
    background: rgba(246, 184, 62, 0.2);
    transform: scale(1.1);
}

.last-added-grid .channel-card .favorite-btn.is-favorite { color: #f6b83e; }
.last-added-grid .channel-card .favorite-btn.is-favorite i { font-weight: 900; }
.last-added-grid .channel-card .favorite-btn.loading { opacity: 0.5; pointer-events: none; }
.last-added-grid .channel-card .card-link { display: block; color: inherit; }

.last-added-grid .channel-card .new-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    font-size: 0.4rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(46, 204, 113, 0.25);
    backdrop-filter: blur(4px);
    box-shadow: 0 0 12px rgba(46, 204, 113, 0.08);
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 5;
    transition: all 0.3s ease;
}

body.light-theme .last-added-grid .channel-card .new-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.last-added-grid .channel-card .new-badge i { font-size: 0.3rem; color: #2ecc71; }

body.light-theme .last-added-grid .channel-card .new-badge i { color: #16a34a; }

.last-added-grid .channel-card:hover .new-badge {
    background: rgba(46, 204, 113, 0.2);
    border-color: rgba(46, 204, 113, 0.4);
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.15);
    transform: scale(1.05);
}

.view-all-link {
    display: inline-block;
    margin-top: 12px;
    color: #f6b83e;
    font-size: 0.9rem;
    border-bottom: 1px dashed #f6b83e;
    padding-bottom: 2px;
    transition: 0.2s;
}

body.light-theme .view-all-link {
    color: #d97706;
    border-bottom-color: #d97706;
}

.view-all-link:hover { color: #fff; border-bottom-color: #fff; }

body.light-theme .view-all-link:hover {
    color: #1a2330;
    border-bottom-color: #1a2330;
}

/* ============================================
   USER MENU
   ============================================ */
.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.user-menu .user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #bccbdf;
}

body.light-theme .user-menu .user-info { color: #475569; }

.role-badge {
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.role-badge.admin { background: #e74c3c; color: #fff; }
.role-badge.vip { background: #f6b83e; color: #0b0e14; }
.role-badge.user { background: #3498db; color: #fff; }
.role-badge.guest { background: #6f89aa; color: #fff; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #0e141e;
    padding: 0;
    border-top: 1px solid #1d2836;
    margin-top: 20px;
}

body.light-theme .footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

.footer-hero {
    background: linear-gradient(145deg, #141d2b, #0c121c);
    padding: 40px 0 32px;
    border-bottom: 1px solid #25303e;
    text-align: center;
}

body.light-theme .footer-hero {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid #e2e8f0;
}

.footer-hero h2 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #f6d07a, #f08a4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

body.light-theme .footer-hero h2 {
    background: linear-gradient(135deg, #d97706, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-hero h2 i { -webkit-text-fill-color: initial; color: #f6b83e; }

.footer-hero p {
    color: #adbdd4;
    font-size: 1.05rem;
    max-width: 800px;
    margin: 0 auto 16px;
    line-height: 1.6;
}

body.light-theme .footer-hero p { color: #64748b; }

.footer-hero .footer-stats {
    display: flex;
    gap: 30px;
    justify-content: center;
    color: #8ba0c0;
    flex-wrap: wrap;
}

body.light-theme .footer-hero .footer-stats { color: #64748b; }

.footer-hero .footer-stats span i { color: #f6b83e; margin-right: 6px; }

.footer-bottom { padding: 24px 0 20px; }

.footer-bottom .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-links { display: flex; gap: 28px; flex-wrap: wrap; }
.footer-links a { color: #9aafca; font-size: 0.9rem; }

body.light-theme .footer-links a { color: #64748b; }

.footer-links a:hover { color: #f6b83e; }
.footer-copy { color: #6f83a0; font-size: 0.85rem; }

body.light-theme .footer-copy { color: #94a3b8; }

/* ============================================
   PLAYER SECTION
   ============================================ */
.player-section {
    padding: 30px 0;
    background: #0f1620;
}

body.light-theme .player-section { background: #f1f5f9; }

.player-wrapper {
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    max-height: 70vh;
    border: 1px solid #25303e;
    min-height: 300px;
}

body.light-theme .player-wrapper { border: 1px solid #e2e8f0; }

.player-wrapper iframe,
.player-wrapper video {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
}

.jwplayer {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    justify-content: center;
    width: 100% !important;
    height: 100% !important;
}

.player-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #0a0f18;
    color: #8ba0c0;
}

body.light-theme .player-overlay {
    background: #f1f5f9;
    color: #64748b;
}

.player-overlay i { font-size: 4rem; color: #f6b83e; margin-bottom: 20px; }
.player-overlay .channel-name { font-size: 1.6rem; font-weight: 600; color: #fff; }

body.light-theme .player-overlay .channel-name { color: #1a2330; }

.player-overlay .status { font-size: 1rem; margin-top: 10px; color: #6f89aa; }

body.light-theme .player-overlay .status { color: #94a3b8; }

/* ============================================
   ACCESS DENIED OVERLAY
   ============================================ */
.access-denied-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #0a0f18;
    padding: 40px;
    text-align: center;
}

body.light-theme .access-denied-overlay { background: #f1f5f9; }

.access-denied-overlay i { font-size: 4rem; color: #e74c3c; margin-bottom: 20px; }
.access-denied-overlay h2 { color: #fff; margin-bottom: 10px; font-size: 1.8rem; }

body.light-theme .access-denied-overlay h2 { color: #1a2330; }

.access-denied-overlay p { color: #8ba0c0; margin-bottom: 20px; max-width: 400px; }

body.light-theme .access-denied-overlay p { color: #64748b; }

.access-denied-overlay .btn {
    background: #f6b83e;
    color: #0b0e14;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.light-theme .access-denied-overlay .btn { color: #ffffff; }

.access-denied-overlay .btn:hover { transform: scale(1.05); opacity: 0.9; }

.access-denied-overlay .btn-secondary {
    background: transparent;
    color: #fff;
    border: 1px solid #2e3b4a;
}

body.light-theme .access-denied-overlay .btn-secondary {
    color: #1a2330;
    border: 1px solid #e2e8f0;
}

.access-denied-overlay .btn-secondary:hover { background: #1f2a36; }

body.light-theme .access-denied-overlay .btn-secondary:hover { background: #f1f5f9; }

.access-denied-overlay .btn-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ============================================
   PLAYER + EPG SIDEBAR LAYOUT
   ============================================ */
.player-epg-container {
    display: flex;
    gap: 20px;
    margin-top: 12px;
}

.player-epg-container .player-col { flex: 2; min-width: 0; }
.player-epg-container .epg-col { flex: 1; min-width: 280px; max-width: 380px; }

/* ============================================
   EPG SIDEBAR
   ============================================ */
.epg-sidebar {
    background: #141a24;
    border-radius: 16px;
    border: 1px solid #25303e;
    overflow: hidden;
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

body.light-theme .epg-sidebar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.epg-sidebar .epg-header {
    padding: 14px 18px;
    background: #10171f;
    border-bottom: 1px solid #25303e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

body.light-theme .epg-sidebar .epg-header {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.epg-sidebar .epg-header h3 { font-size: 1rem; font-weight: 600; color: #f6b83e; }

body.light-theme .epg-sidebar .epg-header h3 { color: #d97706; }

.epg-sidebar .epg-header h3 i { margin-right: 8px; }
.epg-sidebar .epg-header .epg-time { font-size: 0.75rem; color: #6f89aa; }

body.light-theme .epg-sidebar .epg-header .epg-time { color: #94a3b8; }

.epg-sidebar .epg-body {
    padding: 12px 16px;
    overflow-y: auto;
    flex: 1;
}

.epg-sidebar .epg-body::-webkit-scrollbar { width: 4px; }
.epg-sidebar .epg-body::-webkit-scrollbar-track { background: #10171f; }

body.light-theme .epg-sidebar .epg-body::-webkit-scrollbar-track { background: #f1f5f9; }

.epg-sidebar .epg-body::-webkit-scrollbar-thumb { background: #f6b83e; border-radius: 2px; }

.epg-program {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 6px;
    border-left: 3px solid transparent;
    transition: 0.2s;
    cursor: default;
}

.epg-program:hover { background: #1a2330; }

body.light-theme .epg-program:hover { background: #f8fafc; }

.epg-program.current {
    border-left-color: #f6b83e;
    background: #1a2a24;
}

body.light-theme .epg-program.current { background: #f0fdf4; }

.epg-program.current .epg-title { color: #f6b83e; }

body.light-theme .epg-program.current .epg-title { color: #d97706; }

.epg-program .epg-time { font-size: 0.7rem; color: #6f89aa; display: block; margin-bottom: 2px; }

body.light-theme .epg-program .epg-time { color: #94a3b8; }

.epg-program .epg-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: #eef2f7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .epg-program .epg-title { color: #1a2330; }

.epg-program .epg-category {
    font-size: 0.6rem;
    color: #8ba0c0;
    background: #2c3b4e;
    padding: 1px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 2px;
}

body.light-theme .epg-program .epg-category {
    color: #64748b;
    background: #e2e8f0;
}

.epg-program .epg-progress {
    margin-top: 6px;
    background: #1f2a36;
    border-radius: 2px;
    height: 2px;
    overflow: hidden;
}

body.light-theme .epg-program .epg-progress { background: #e2e8f0; }

.epg-program .epg-progress .epg-progress-bar {
    height: 100%;
    background: #f6b83e;
    transition: width 0.5s ease;
}

.no-epg { color: #6f89aa; text-align: center; padding: 30px 10px; font-size: 0.9rem; }

body.light-theme .no-epg { color: #94a3b8; }

.no-epg i { font-size: 2rem; display: block; margin-bottom: 10px; color: #3f4d61; }

body.light-theme .no-epg i { color: #cbd5e1; }

.epg-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    color: #f6b83e;
    font-size: 0.8rem;
    border-top: 1px solid #1d2836;
    text-decoration: none;
    transition: 0.2s;
    flex-shrink: 0;
}

body.light-theme .epg-view-all {
    color: #d97706;
    border-top: 1px solid #e2e8f0;
}

.epg-view-all:hover { background: #1a2330; }

body.light-theme .epg-view-all:hover { background: #f8fafc; }

/* ============================================
   STREAM SELECTOR (desktop)
   ============================================ */
.stream-selector {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.stream-selector .stream-label {
    color: #8ba0c0;
    font-size: 0.85rem;
    margin-right: 4px;
}

body.light-theme .stream-selector .stream-label { color: #64748b; }

.stream-btn {
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #2e3b4a;
    background: #1f2a36;
    color: #8b9bb0;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

body.light-theme .stream-btn {
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #64748b;
}

.stream-btn:hover {
    background: #2a3848;
    color: #fff;
    border-color: #f6b83e;
}

body.light-theme .stream-btn:hover {
    background: #e2e8f0;
    color: #1a2330;
}

.stream-btn.active {
    background: #f6b83e;
    color: #0b0e14;
    border-color: #f6b83e;
    font-weight: 600;
}

body.light-theme .stream-btn.active { color: #ffffff; }

.stream-btn .quality-badge {
    font-size: 0.6rem;
    background: rgba(0,0,0,0.3);
    padding: 1px 6px;
    border-radius: 10px;
}

body.light-theme .stream-btn .quality-badge { background: rgba(0, 0, 0, 0.08); }

.stream-btn.active .quality-badge { background: rgba(0,0,0,0.15); }
.stream-btn .stream-type-icon { font-size: 0.7rem; }

/* ============================================
   CHANNEL INFO & DESCRIPTION
   ============================================ */
.channel-info-section { padding: 20px 0 10px; }

.channel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.channel-header h1 { font-size: 2rem; font-weight: 700; }

body.light-theme .channel-header h1 { color: #1a2330; }

.channel-header h1 small {
    font-size: 1rem;
    font-weight: 400;
    color: #8ba0c0;
    margin-left: 14px;
}

body.light-theme .channel-header h1 small { color: #64748b; }

.channel-meta {
    display: flex;
    gap: 24px;
    color: #8ba0c0;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

body.light-theme .channel-meta { color: #64748b; }

.channel-meta i { margin-right: 6px; color: #f6b83e; }

.channel-description {
    background: #141a24;
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid #1d2836;
    margin: 12px 0 20px;
}

body.light-theme .channel-description {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.channel-description h3 { color: #f6b83e; font-size: 1rem; margin-bottom: 8px; }

body.light-theme .channel-description h3 { color: #d97706; }

.channel-description h3 i { margin-right: 8px; }
.channel-description p { color: #bccbdf; line-height: 1.7; font-size: 0.95rem; }

body.light-theme .channel-description p { color: #475569; }

.channel-description .empty-desc { color: #6f89aa; font-style: italic; }

body.light-theme .channel-description .empty-desc { color: #94a3b8; }

.tv-guide-btn {
    background: #f6b83e;
    color: #0b0e14;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

body.light-theme .tv-guide-btn { color: #ffffff; }

.tv-guide-btn:hover { transform: scale(1.05); opacity: 0.9; }

.success-message {
    background: #1a3a2a;
    border: 1px solid #2ecc71;
    color: #6fcf97;
    padding: 12px 20px;
    border-radius: 12px;
    margin: 12px 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.5s ease;
}

body.light-theme .success-message {
    background: #f0fdf4;
    color: #16a34a;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.success-message i { color: #2ecc71; font-size: 1.2rem; }

.admin-pending-badge {
    background: #f6b83e;
    color: #0b0e14;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.light-theme .admin-pending-badge { color: #ffffff; }

/* ============================================
   COMMENTS SECTION
   ============================================ */
.comments-section { padding: 20px 0 40px; width: 100%; overflow: hidden; }

.comments-section h2 { font-size: 1.6rem; margin-bottom: 20px; word-break: break-word; }

body.light-theme .comments-section h2 { color: #1a2330; }

.comments-section h2 i { color: #f6b83e; margin-right: 10px; }
.comments-section h2 .comment-count { font-size: 1rem; color: #8ba0c0; font-weight: 400; }

body.light-theme .comments-section h2 .comment-count { color: #64748b; }

.comment-form {
    background: #141a24;
    border-radius: 16px;
    padding: 20px 16px;
    border: 1px solid #1d2836;
    margin-bottom: 30px;
    width: 100%;
}

body.light-theme .comment-form {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.comment-form .form-row { display: flex; flex-direction: column; gap: 16px; }
.comment-form .form-group { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.comment-form .form-group label { color: #bccbdf; font-weight: 500; font-size: 0.9rem; }

body.light-theme .comment-form .form-group label { color: #475569; }

.comment-form .form-group input,
.comment-form .form-group textarea {
    padding: 12px 14px;
    background: #1f2a36;
    border: 1px solid #2e3b4a;
    border-radius: 8px;
    color: #fff;
    outline: none;
    font-size: 0.95rem;
    transition: 0.2s;
    width: 100%;
    box-sizing: border-box;
}

body.light-theme .comment-form .form-group input,
body.light-theme .comment-form .form-group textarea {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a2330;
}

.comment-form .form-group input:focus,
.comment-form .form-group textarea:focus { border-color: #f6b83e; }

.comment-form .form-group textarea { min-height: 80px; resize: vertical; }

.comment-form .btn-submit {
    background: linear-gradient(135deg, #f6b83e, #f05a28);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    width: 100%;
    margin-top: 4px;
}

.comment-form .btn-submit:hover { opacity: 0.9; transform: translateY(-1px); }
.comment-form .btn-submit i { margin-right: 8px; }

.comment-form .pending-notice {
    color: #f6b83e;
    font-size: 0.85rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

body.light-theme .comment-form .pending-notice { color: #d97706; }

.comment {
    background: #141a24;
    border-radius: 12px;
    padding: 14px 16px;
    border: 1px solid #1d2836;
    margin-bottom: 14px;
    width: 100%;
    overflow: hidden;
}

body.light-theme .comment {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.comment.pending { border-left: 3px solid #f6b83e; opacity: 0.85; }

.comment .pending-badge {
    background: #f6b83e;
    color: #0b0e14;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.6rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

body.light-theme .comment .pending-badge { color: #ffffff; }

.comment .comment-header { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.comment .comment-user { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.comment .comment-user .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #2d3b4b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #f6b83e;
    font-size: 0.9rem;
    flex-shrink: 0;
}

body.light-theme .comment .comment-user .avatar {
    background: #e2e8f0;
    color: #d97706;
}

.comment .comment-user .name { font-weight: 600; color: #eef2f7; word-break: break-word; }

body.light-theme .comment .comment-user .name { color: #1a2330; }

.comment .comment-user .date { font-size: 0.8rem; color: #6f89aa; margin-left: 0; }

body.light-theme .comment .comment-user .date { color: #94a3b8; }

.comment .comment-text {
    color: #bccbdf;
    line-height: 1.6;
    margin-left: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

body.light-theme .comment .comment-text { color: #475569; }

.comment .comment-actions {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    margin-left: 0;
    flex-wrap: wrap;
}

.comment .comment-actions button {
    background: none;
    border: none;
    color: #6f89aa;
    cursor: pointer;
    font-size: 0.85rem;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

body.light-theme .comment .comment-actions button { color: #94a3b8; }

.comment .comment-actions button:hover { color: #f6b83e; }

.comment .replies {
    margin-left: 0;
    margin-top: 12px;
    border-left: 2px solid #2a3340;
    padding-left: 12px;
}

body.light-theme .comment .replies { border-left: 2px solid #e2e8f0; }

.comment .replies .reply {
    background: #10171f;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #1d2836;
}

body.light-theme .comment .replies .reply {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.comment .replies .reply.pending-reply { border-left: 3px solid #f6b83e; opacity: 0.85; }

.comment .replies .reply .reply-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 4px;
}

.comment .replies .reply .reply-user { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.comment .replies .reply .reply-user .avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2d3b4b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #f6b83e;
    font-size: 0.7rem;
    flex-shrink: 0;
}

body.light-theme .comment .replies .reply .reply-user .avatar {
    background: #e2e8f0;
    color: #d97706;
}

.comment .replies .reply .reply-user .name { font-weight: 500; color: #eef2f7; font-size: 0.9rem; word-break: break-word; }

body.light-theme .comment .replies .reply .reply-user .name { color: #1a2330; }

.comment .replies .reply .reply-user .date { font-size: 0.75rem; color: #6f89aa; }

body.light-theme .comment .replies .reply .reply-user .date { color: #94a3b8; }

.comment .replies .reply .reply-text {
    color: #bccbdf;
    font-size: 0.9rem;
    margin-left: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

body.light-theme .comment .replies .reply .reply-text { color: #475569; }

.reply-form { margin-left: 0; margin-top: 10px; display: none; }
.reply-form.active { display: block; }
.reply-form .form-group { display: flex; flex-direction: column; gap: 10px; }

.reply-form .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: #1f2a36;
    border: 1px solid #2e3b4a;
    border-radius: 8px;
    color: #fff;
    outline: none;
    min-height: 60px;
    resize: vertical;
    font-size: 0.9rem;
    box-sizing: border-box;
}

body.light-theme .reply-form .form-group textarea {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a2330;
}

.reply-form .form-group textarea:focus { border-color: #f6b83e; }

.reply-form .form-group button {
    background: #f6b83e;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    color: #0b0e14;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    width: 100%;
}

body.light-theme .reply-form .form-group button { color: #ffffff; }

.reply-form .form-group button:hover { background: #f0a82a; }

.no-comments { text-align: center; padding: 40px 20px; color: #6f89aa; }

body.light-theme .no-comments { color: #94a3b8; }

.no-comments i { font-size: 2.5rem; display: block; margin-bottom: 12px; color: #3f4d61; }

body.light-theme .no-comments i { color: #cbd5e1; }

@media (min-width: 600px) {
    .comment-form { padding: 24px; }
    .comment-form .form-row { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; align-items: start; }
    .comment-form .btn-submit { width: auto; align-self: flex-end; }
    .comment { padding: 16px 20px; }
    .comment .comment-header { flex-direction: row; justify-content: space-between; align-items: center; }
    .comment .comment-user .date { margin-left: 8px; }
    .comment .comment-text { margin-left: 42px; }
    .comment .comment-actions { margin-left: 42px; }
    .comment .replies { margin-left: 42px; padding-left: 16px; }
    .comment .replies .reply .reply-text { margin-left: 32px; }
    .reply-form { margin-left: 42px; }
    .reply-form .form-group { flex-direction: row; align-items: flex-start; }
    .reply-form .form-group button { width: auto; white-space: nowrap; }
    .comment .replies .reply .reply-header { flex-direction: row; justify-content: space-between; align-items: center; }
}

@media (max-width: 480px) {
    .comments-section h2 { font-size: 1.3rem; }
    .comment-form { padding: 16px 12px; border-radius: 12px; }
    .comment-form .form-group input,
    .comment-form .form-group textarea { padding: 10px 12px; font-size: 0.9rem; }
    .comment-form .btn-submit { padding: 12px 16px; font-size: 0.9rem; border-radius: 8px; }
    .comment { padding: 12px 12px; border-radius: 10px; }
    .comment .comment-user .avatar { width: 28px; height: 28px; font-size: 0.8rem; }
    .comment .comment-user .name { font-size: 0.9rem; }
    .comment .comment-user .date { font-size: 0.7rem; }
    .comment .comment-text { font-size: 0.9rem; margin-left: 0; }
    .comment .comment-actions { margin-left: 0; gap: 10px; }
    .comment .comment-actions button { font-size: 0.8rem; }
    .comment .replies { margin-left: 0; padding-left: 8px; }
    .comment .replies .reply { padding: 10px 12px; }
    .comment .replies .reply .reply-user .name { font-size: 0.85rem; }
    .comment .replies .reply .reply-text { font-size: 0.85rem; margin-left: 0; }
    .reply-form { margin-left: 0; }
    .reply-form .form-group textarea { font-size: 0.85rem; min-height: 50px; }
    .no-comments i { font-size: 2rem; }
}

/* ============================================
   BACK BUTTON
   ============================================ */
.back-btn {
    background: #1f2a36;
    padding: 8px 18px;
    border-radius: 30px;
    color: #bccbdf;
    transition: 0.2s;
    border: 1px solid #2e3b4a;
    white-space: nowrap;
}

body.light-theme .back-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.back-btn:hover { background: #2a3848; color: #fff; }

body.light-theme .back-btn:hover {
    background: #e2e8f0;
    color: #1a2330;
}

/* ============================================
   MODAL OVERLAY & CONTAINER
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease;
    backdrop-filter: blur(4px);
}

body.light-theme .modal-overlay { background: rgba(0, 0, 0, 0.5); }

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

@keyframes modalSlideIn {
    from { transform: translateY(-30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-container {
    background: #141a24;
    border-radius: 20px;
    border: 1px solid #2a3340;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.3s ease;
}

body.light-theme .modal-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-container::-webkit-scrollbar { width: 4px; }
.modal-container::-webkit-scrollbar-track { background: #10171f; border-radius: 2px; }

body.light-theme .modal-container::-webkit-scrollbar-track { background: #f1f5f9; }

.modal-container::-webkit-scrollbar-thumb { background: #f6b83e; border-radius: 2px; }

.modal-header {
    padding: 24px 28px 16px;
    border-bottom: 1px solid #1d2836;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.light-theme .modal-header { border-bottom: 1px solid #e2e8f0; }

.modal-header h2 { color: #f6b83e; font-size: 1.5rem; font-weight: 700; margin: 0; }

body.light-theme .modal-header h2 { color: #d97706; }

.modal-header h2 i { margin-right: 10px; }

.modal-close {
    background: none;
    border: none;
    color: #6f89aa;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0 4px;
}

body.light-theme .modal-close { color: #94a3b8; }

.modal-close:hover { color: #ff6b6b; transform: rotate(90deg); }

.modal-body { padding: 24px 28px 20px; }

.modal-footer {
    padding: 16px 28px 24px;
    border-top: 1px solid #1d2836;
    text-align: center;
}

body.light-theme .modal-footer { border-top: 1px solid #e2e8f0; }

.modal-footer .footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    color: #8ba0c0;
    font-size: 0.95rem;
}

body.light-theme .modal-footer .footer-links { color: #64748b; }

.modal-footer .footer-links a {
    color: #f6b83e;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 6px;
}

body.light-theme .modal-footer .footer-links a { color: #d97706; }

.modal-footer .footer-links a:hover {
    background: rgba(246, 184, 62, 0.1);
    text-decoration: underline;
}

.modal-footer .footer-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #2a3340, transparent);
    margin: 12px 0;
}

body.light-theme .modal-footer .footer-divider {
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}

.modal-footer .footer-bottom-link { margin-top: 4px; }

.modal-footer .footer-bottom-link a {
    color: #6f89aa;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

body.light-theme .modal-footer .footer-bottom-link a { color: #94a3b8; }

.modal-footer .footer-bottom-link a:hover {
    color: #f6b83e;
    background: rgba(246, 184, 62, 0.08);
}

body.light-theme .modal-footer .footer-bottom-link a:hover { color: #d97706; }

.modal-footer .footer-bottom-link a i { font-size: 0.8rem; }

.modal-body .form-group { margin-bottom: 18px; }

.modal-body .form-group label {
    display: block;
    color: #bccbdf;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

body.light-theme .modal-body .form-group label { color: #475569; }

.modal-body .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: #1f2a36;
    border: 2px solid #2e3b4a;
    border-radius: 10px;
    color: #eef2f7;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
}

body.light-theme .modal-body .form-group input {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #1a2330;
}

.modal-body .form-group input:focus {
    border-color: #f6b83e;
    background: #1a2632;
    box-shadow: 0 0 0 4px rgba(246, 184, 62, 0.08);
}

body.light-theme .modal-body .form-group input:focus { background: #ffffff; }

.modal-body .form-group input::placeholder { color: #4a5a6a; }

body.light-theme .modal-body .form-group input::placeholder { color: #94a3b8; }

.modal-body .form-message {
    padding: 10px 14px;
    border-radius: 8px;
    margin: 10px 0 16px;
    display: none;
    font-size: 0.95rem;
}

.modal-body .form-message.error {
    display: block;
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

body.light-theme .modal-body .form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.modal-body .form-message.success {
    display: block;
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

body.light-theme .modal-body .form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.modal-body .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f6b83e, #f05a28);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-body .btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 184, 62, 0.3);
}

.modal-body .btn-submit:active { transform: translateY(0); }
.modal-body .btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.modal-body .btn-spinner { display: none; }

.modal-body .info-text {
    color: #8ba0c0;
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
}

body.light-theme .modal-body .info-text { color: #64748b; }

.modal-body .info-text i { color: #f6b83e; margin-right: 6px; }

.captcha-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
    min-height: 65px;
}

.cf-turnstile { display: flex; justify-content: center; }
.cf-turnstile iframe { border-radius: 8px; }

.user-dropdown { position: relative; display: inline-block; }

.user-dropdown .dropdown-toggle {
    background: none;
    border: none;
    color: #bccbdf;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 30px;
    transition: all 0.2s;
    font-size: 0.9rem;
}

body.light-theme .user-dropdown .dropdown-toggle { color: #475569; }

.user-dropdown .dropdown-toggle:hover { background: #1f2a36; color: #fff; }

body.light-theme .user-dropdown .dropdown-toggle:hover {
    background: #f1f5f9;
    color: #1a2330;
}

.user-dropdown .dropdown-toggle .avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f6b83e, #f05a28);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
}

.user-dropdown .dropdown-toggle .chevron {
    font-size: 0.7rem;
    color: #6f89aa;
    transition: transform 0.3s;
}

body.light-theme .user-dropdown .dropdown-toggle .chevron { color: #94a3b8; }

.user-dropdown .dropdown-toggle .chevron.open { transform: rotate(180deg); }

.user-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #141a24;
    border: 1px solid #2a3340;
    border-radius: 12px;
    min-width: 240px;
    padding: 8px 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    display: none;
    z-index: 1000;
    animation: dropdownFade 0.2s ease;
}

body.light-theme .user-dropdown .dropdown-menu {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.user-dropdown .dropdown-menu.open { display: block; }

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-dropdown .dropdown-menu .dropdown-item {
    padding: 10px 18px;
    color: #bccbdf;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}

body.light-theme .user-dropdown .dropdown-menu .dropdown-item { color: #475569; }

.user-dropdown .dropdown-menu .dropdown-item:hover { background: #1f2a36; color: #fff; }

body.light-theme .user-dropdown .dropdown-menu .dropdown-item:hover {
    background: #f1f5f9;
    color: #1a2330;
}

.user-dropdown .dropdown-menu .dropdown-item i { width: 20px; color: #6f89aa; }

body.light-theme .user-dropdown .dropdown-menu .dropdown-item i { color: #94a3b8; }

.user-dropdown .dropdown-menu .dropdown-item.danger { color: #e74c3c; }
.user-dropdown .dropdown-menu .dropdown-item.danger i { color: #e74c3c; }
.user-dropdown .dropdown-menu .dropdown-item.danger:hover { background: #2a1414; }

body.light-theme .user-dropdown .dropdown-menu .dropdown-item.danger { color: #ef4444; }
body.light-theme .user-dropdown .dropdown-menu .dropdown-item.danger i { color: #ef4444; }
body.light-theme .user-dropdown .dropdown-menu .dropdown-item.danger:hover { background: #fef2f2; }

.user-dropdown .dropdown-menu .dropdown-divider {
    height: 1px;
    background: #1d2836;
    margin: 4px 14px;
}

body.light-theme .user-dropdown .dropdown-menu .dropdown-divider { background: #e2e8f0; }

.user-dropdown .dropdown-menu .user-info-header {
    padding: 12px 18px 8px;
    border-bottom: 1px solid #1d2836;
    margin-bottom: 8px;
}

body.light-theme .user-dropdown .dropdown-menu .user-info-header { border-bottom: 1px solid #e2e8f0; }

.user-dropdown .dropdown-menu .user-info-header .name { color: #eef2f7; font-weight: 600; font-size: 0.95rem; }

body.light-theme .user-dropdown .dropdown-menu .user-info-header .name { color: #1a2330; }

.user-dropdown .dropdown-menu .user-info-header .email { color: #6f89aa; font-size: 0.8rem; margin-top: 2px; }

body.light-theme .user-dropdown .dropdown-menu .user-info-header .email { color: #94a3b8; }

.user-dropdown .dropdown-menu .user-info-header .role-badge { margin-top: 4px; }

.password-requirements { font-size: 0.8rem; color: #6f89aa; margin-top: 4px; }

body.light-theme .password-requirements { color: #94a3b8; }

.password-requirements li { list-style: none; padding: 2px 0; }
.password-requirements li i { margin-right: 6px; font-size: 0.7rem; }
.password-requirements li.valid i { color: #2ecc71; }
.password-requirements li.invalid i { color: #e74c3c; }

/* ============================================
   VIP STYLES
   ============================================ */
.vip-status-bar {
    background: linear-gradient(135deg, #1a2330, #0f1a24);
    border: 1px solid #2a3340;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

body.light-theme .vip-status-bar {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.vip-status-bar .vip-info { display: flex; align-items: center; gap: 16px; }
.vip-status-bar .vip-info .vip-icon { font-size: 2rem; color: #f6b83e; }
.vip-status-bar .vip-info .vip-text .vip-label { font-size: 0.8rem; color: #8ba0c0; }

body.light-theme .vip-status-bar .vip-info .vip-text .vip-label { color: #64748b; }

.vip-status-bar .vip-info .vip-text .vip-status { font-weight: 600; font-size: 1.1rem; }
.vip-status-bar .vip-info .vip-text .vip-status.active { color: #f6b83e; }

body.light-theme .vip-status-bar .vip-info .vip-text .vip-status.active { color: #d97706; }

.vip-status-bar .vip-info .vip-text .vip-status.inactive { color: #6f89aa; }

body.light-theme .vip-status-bar .vip-info .vip-text .vip-status.inactive { color: #94a3b8; }

.vip-status-bar .vip-points { display: flex; align-items: center; gap: 20px; }
.vip-status-bar .vip-points .points-display { text-align: center; }
.vip-status-bar .vip-points .points-display .points-number { font-size: 1.5rem; font-weight: 700; color: #2ecc71; }

body.light-theme .vip-status-bar .vip-points .points-display .points-number { color: #16a34a; }

.vip-status-bar .vip-points .points-display .points-label { font-size: 0.7rem; color: #6f89aa; }

body.light-theme .vip-status-bar .vip-points .points-display .points-label { color: #94a3b8; }

.vip-status-bar .vip-points .vip-btn {
    background: linear-gradient(135deg, #f6b83e, #f05a28);
    color: #0b0e14;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

body.light-theme .vip-status-bar .vip-points .vip-btn { color: #ffffff; }

.vip-status-bar .vip-points .vip-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 184, 62, 0.3);
}

.vip-packages-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

body.light-theme .vip-packages-popup { background: rgba(0, 0, 0, 0.5); }

.vip-packages-popup.active { display: flex; }

.vip-packages-popup .popup-content {
    background: #141a24;
    border-radius: 20px;
    border: 1px solid #2a3340;
    padding: 40px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

body.light-theme .vip-packages-popup .popup-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.vip-packages-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.vip-packages-popup .popup-header h2 { color: #f6b83e; font-size: 1.8rem; }

body.light-theme .vip-packages-popup .popup-header h2 { color: #d97706; }

.vip-packages-popup .popup-close {
    background: none;
    border: none;
    color: #6f89aa;
    font-size: 32px;
    cursor: pointer;
    transition: 0.3s;
}

body.light-theme .vip-packages-popup .popup-close { color: #94a3b8; }

.vip-packages-popup .popup-close:hover { color: #ff6b6b; transform: rotate(90deg); }

.vip-packages-popup .packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.vip-packages-popup .package-item {
    background: #1a2330;
    border: 1px solid #2a3340;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: 0.3s;
}

body.light-theme .vip-packages-popup .package-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.vip-packages-popup .package-item:hover { border-color: #f6b83e; transform: translateY(-4px); }
.vip-packages-popup .package-item .pkg-icon { font-size: 2.5rem; color: #f6b83e; margin-bottom: 8px; }
.vip-packages-popup .package-item .pkg-name { font-weight: 700; font-size: 1.1rem; margin-bottom: 4px; }

body.light-theme .vip-packages-popup .package-item .pkg-name { color: #1a2330; }

.vip-packages-popup .package-item .pkg-duration { font-size: 0.9rem; color: #8ba0c0; }

body.light-theme .vip-packages-popup .package-item .pkg-duration { color: #64748b; }

.vip-packages-popup .package-item .pkg-points { font-size: 1.2rem; font-weight: 600; color: #2ecc71; margin: 8px 0; }

body.light-theme .vip-packages-popup .package-item .pkg-points { color: #16a34a; }

.vip-packages-popup .package-item .pkg-btn {
    background: linear-gradient(135deg, #f6b83e, #f05a28);
    color: #0b0e14;
    padding: 8px 16px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    width: 100%;
}

body.light-theme .vip-packages-popup .package-item .pkg-btn { color: #ffffff; }

.vip-packages-popup .package-item .pkg-btn:hover { opacity: 0.9; transform: scale(1.02); }
.vip-packages-popup .package-item .pkg-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.vip-packages-popup .package-item .pkg-features { font-size: 0.8rem; color: #6f89aa; margin: 8px 0; }

body.light-theme .vip-packages-popup .package-item .pkg-features { color: #94a3b8; }

/* ============================================
   MODAL & VIP RESPONSIVE
   ============================================ */
@media (max-width: 500px) {
    .modal-container { max-width: 95%; border-radius: 16px; margin: 10px; }
    .modal-header { padding: 18px 20px 12px; }
    .modal-header h2 { font-size: 1.2rem; }
    .modal-body { padding: 18px 20px 16px; }
    .modal-footer { padding: 14px 20px 20px; }
    .modal-footer .footer-links { font-size: 0.85rem; flex-direction: column; gap: 4px; }
    .modal-footer .footer-links span { display: block; }
    .modal-footer .footer-divider { margin: 10px 0; }
    .modal-body .form-group input { padding: 10px 14px; font-size: 0.95rem; }
    .modal-body .btn-submit { padding: 12px; font-size: 0.95rem; }
    .user-dropdown .dropdown-menu { right: -60px; min-width: 200px; }
    .vip-status-bar { flex-direction: column; align-items: stretch; text-align: center; }
    .vip-status-bar .vip-info { justify-content: center; }
    .vip-status-bar .vip-points { justify-content: center; flex-wrap: wrap; }
    .vip-packages-popup .popup-content { padding: 20px; }
    .vip-packages-popup .packages-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 400px) {
    .user-dropdown .dropdown-menu { right: -80px; min-width: 180px; }
    .vip-packages-popup .packages-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE - TABLETS (992px)
   ============================================================ */
@media (max-width: 992px) {
    .player-epg-container { flex-direction: column; }
    .player-epg-container .epg-col { max-width: 100%; min-width: 0; }
    .epg-sidebar { max-height: 400px; }
}

/* ============================================================
   RESPONSIVE - MOBILE (768px)
   ============================================================ */
@media (max-width: 768px) {

    /* ---------- HEADER LAYOUT ---------- */
    .header { padding: 8px 0 6px; }

    .header .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Row 1: Logo (left) + Theme + Language (right) */
    .logo { order: 1; flex: 0 0 auto; }
    .logo img { height: 30px; }

    .theme-selector {
        order: 2;
        flex: 0 0 auto;
        margin-left: auto;
        padding: 2px;
        gap: 2px;
        height: 32px;
    }

    .theme-selector a {
        width: 28px;
        height: 26px;
    }

    .theme-selector a .theme-icon {
        width: 16px;
        height: 16px;
        font-size: 12px;
    }

    .language-selector {
        order: 3;
        flex: 0 0 auto;
        display: flex;
        flex-wrap: nowrap;
        gap: 2px;
        padding: 3px 6px;
        border-radius: 20px;
        height: 32px;
    }

    .language-selector a {
        padding: 3px 5px;
        font-size: 0.7rem;
        border-radius: 12px;
        min-width: 24px;
        justify-content: center;
    }

    .language-selector .lang-name { display: none; }

    /* Row 2: Category toggle (full width) */
    .category-toggle {
        order: 4;
        flex: 1 1 100%;
        display: inline-flex;
        justify-content: center;
        padding: 8px 12px;
        min-height: 38px;
        font-size: 0.85rem;
        gap: 6px;
        border-radius: 8px;
        margin-top: 2px;
    }

    /* Row 3: Login / Register / Favorites */
    .header-actions {
        order: 5;
        flex: 1 1 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85rem;
        justify-content: flex-start;
        padding-top: 2px;
    }

    /* Row 4: Search */
    .header-search {
        order: 6;
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        height: 38px;
        min-height: 38px;
        padding: 3px 10px 3px 14px;
        border-radius: 10px;
        margin-top: 2px;
    }

    .header-search input { font-size: 0.85rem; padding: 6px 4px; }
    .header-search button { font-size: 0.95rem; padding: 3px 6px; }

    /* ---------- HIDE DESKTOP CATEGORY BAR ON MOBILE ---------- */
    .category-bar { display: none !important; }

    /* ---------- MOBILE CATEGORY DROPDOWN ---------- */
    .category-dropdown {
        display: none;
        background: #10171f;
        border-top: 1px solid #212b36;
        border-bottom: 1px solid #212b36;
        padding: 8px 0;
        width: 100%;
        max-height: 60vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    body.light-theme .category-dropdown {
        background: #ffffff;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }

    .category-dropdown.open { display: block; }

    .category-dropdown .container {
        display: flex;
        flex-direction: column;
        gap: 6px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .category-dropdown .category-item {
        display: flex;
        align-items: center;
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        border-radius: 10px;
        border-bottom: none;
        background: #141a24;
        border: 1px solid #1d2836;
        justify-content: flex-start;
        font-size: 0.9rem;
        transition: all 0.2s;
    }

    body.light-theme .category-dropdown .category-item {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
    }

    .category-dropdown .category-item:hover,
    .category-dropdown .category-item.active {
        background: #1f2a38;
        border-color: #f6b83e;
    }

    body.light-theme .category-dropdown .category-item:hover,
    body.light-theme .category-dropdown .category-item.active { background: #f1f5f9; }

    .category-dropdown .category-item a {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        color: inherit;
        text-decoration: none;
    }

    .category-dropdown .category-item i {
        font-size: 0.9rem;
        flex: 0 0 20px;
        text-align: center;
    }

    .category-dropdown::-webkit-scrollbar { width: 5px; }
    .category-dropdown::-webkit-scrollbar-track { background: #10171f; }

    body.light-theme .category-dropdown::-webkit-scrollbar-track { background: #f1f5f9; }

    .category-dropdown::-webkit-scrollbar-thumb { background: #f6b83e; border-radius: 4px; }

    /* ---------- STREAM SELECTOR Ã¢â‚¬â€ ONE LINE ---------- */
    .stream-selector {
        display: flex;
        gap: 6px;
        margin-top: 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        align-items: center;
        padding: 2px 0 8px;
        width: 100%;
    }

    .stream-selector::-webkit-scrollbar { height: 4px; }
    .stream-selector::-webkit-scrollbar-track { background: #10171f; border-radius: 2px; }

    body.light-theme .stream-selector::-webkit-scrollbar-track { background: #f1f5f9; }

    .stream-selector::-webkit-scrollbar-thumb { background: #f6b83e; border-radius: 2px; }

    .stream-selector .stream-label {
        flex: 0 0 auto;
        font-size: 0.75rem;
        margin-right: 4px;
        color: #8ba0c0;
    }

    body.light-theme .stream-selector .stream-label { color: #64748b; }

    .stream-btn {
        flex: 0 0 auto;
        min-height: 32px;
        padding: 5px 12px;
        border-radius: 16px;
        font-size: 0.75rem;
        gap: 5px;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
    }

    .stream-btn .quality-badge { font-size: 0.55rem; padding: 1px 5px; border-radius: 8px; }
    .stream-btn .stream-type-icon { font-size: 0.65rem; }

    /* ---------- PLAYER & EPG ---------- */
    .player-section { padding: 14px 0; }
    .player-epg-container { gap: 12px; margin-top: 8px; }
    .player-wrapper { border-radius: 10px; min-height: 200px; }
    .epg-sidebar { border-radius: 10px; max-height: 40vh; }

    /* ---------- MISC MOBILE FIXES ---------- */
    .header-actions { gap: 10px; }
    .access-denied-overlay h2 { font-size: 1.4rem; }
    .access-denied-overlay .btn-group { flex-direction: column; align-items: center; }
    .tv-guide-btn { font-size: 0.8rem; padding: 6px 14px; }

    .channel-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .footer-hero h2 { font-size: 1.8rem; }
    .footer-hero p { font-size: 0.95rem; }
    .footer-hero .footer-stats { gap: 16px; font-size: 0.9rem; }
    .pagination a { padding: 6px 12px; font-size: 0.8rem; }
    .last-added-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .section-title { flex-direction: column; gap: 12px; }

    .toast { left: 20px; right: 20px; bottom: 20px; min-width: auto; }

    .container { padding-left: 10px; padding-right: 10px; }
}

/* ============================================================
   RESPONSIVE - SMALL PHONES (500px)
   ============================================================ */
@media (max-width: 500px) {

    .logo img { height: 26px; }

    .theme-selector {
        padding: 2px;
        gap: 2px;
        height: 30px;
    }

    .theme-selector a {
        width: 26px;
        height: 24px;
    }

    .theme-selector a .theme-icon {
        width: 14px;
        height: 14px;
        font-size: 11px;
    }

    .language-selector { padding: 2px 5px; gap: 1px; height: 30px; }
    .language-selector a { padding: 2px 4px; font-size: 0.65rem; min-width: 22px; border-radius: 10px; }
    .language-selector .lang-flag { font-size: 0.7rem; }

    .category-toggle { padding: 7px 10px; min-height: 34px; font-size: 0.8rem; gap: 5px; }
    .category-toggle .badge { font-size: 0.55rem; padding: 1px 6px; }

    .header-actions { gap: 8px; font-size: 0.78rem; }
    .header-actions .fav-count { font-size: 0.55rem; }

    .header-search { height: 36px; min-height: 36px; padding: 2px 8px 2px 12px; border-radius: 9px; }
    .header-search input { font-size: 0.8rem; padding: 5px 3px; }

    .category-dropdown .category-item { min-height: 42px; padding: 9px 12px; font-size: 0.85rem; }
    .category-dropdown .category-item i { font-size: 0.85rem; flex: 0 0 18px; }

    .stream-selector { gap: 5px; margin-top: 8px; }
    .stream-selector .stream-label { font-size: 0.7rem; }

    .stream-btn {
        min-height: 30px;
        padding: 4px 10px;
        border-radius: 15px;
        font-size: 0.7rem;
        gap: 4px;
    }

    .stream-btn .quality-badge { font-size: 0.5rem; padding: 1px 4px; }
    .stream-btn .stream-type-icon { font-size: 0.6rem; }

    .player-wrapper { border-radius: 8px; min-height: 180px; }
    .epg-sidebar { max-height: 35vh; border-radius: 8px; }

    /* --- FIX: Channel Grid Alignment on Pagination --- */
    .channel-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 12px; 
        align-items: stretch; 
    }

    .channel-card {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: 100%;
        min-height: 220px;
        padding: 12px 8px 10px;
    }

    .channel-card h4 {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin: 6px 0 2px;
        width: 100%;
    }

    .channel-card .channel-logo {
        width: 60px;
        height: 60px;
        margin: 0 auto 8px;
        flex-shrink: 0;
    }

    .channel-card .category-tag {
        font-size: 0.55rem;
        padding: 2px 8px;
        margin-top: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .channel-card .live-badge {
        font-size: 0.6rem;
        margin-top: 4px;
    }

    .channel-card .view-count {
        font-size: 0.6rem;
        margin-top: 2px;
    }

    .channel-card .favorite-btn {
        top: 6px;
        right: 6px;
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
    /* --- END FIX --- */

    .footer-hero h2 { font-size: 1.4rem; }
    .footer-hero p { font-size: 0.85rem; }
    .footer-hero .footer-stats { gap: 10px; font-size: 0.8rem; flex-wrap: wrap; }
    .footer-bottom .container { flex-direction: column; text-align: center; }
    .footer-links { justify-content: center; gap: 16px; }
    .pagination a { padding: 4px 10px; font-size: 0.7rem; }
    .filter-links { gap: 10px; }
    .filter-links a { font-size: 0.8rem; }
    .last-added-grid { grid-template-columns: repeat(2, 1fr); }
    .last-added-grid .channel-logo { width: 50px; height: 50px; }
    .last-added-grid .channel-logo .logo-text { font-size: 1.2rem; }

    .back-btn { padding: 6px 12px; font-size: 0.8rem; }
    .player-wrapper { min-height: 200px; }
    .access-denied-overlay i { font-size: 3rem; }
    .access-denied-overlay h2 { font-size: 1.2rem; }
    .tv-guide-btn { font-size: 0.7rem; padding: 4px 10px; }
}

/* ============================================================
   RESPONSIVE - VERY SMALL PHONES (360px)
   ============================================================ */
@media (max-width: 360px) {

    .theme-selector {
        height: 28px;
    }

    .theme-selector a {
        width: 24px;
        height: 22px;
    }

    .theme-selector a .theme-icon {
        width: 13px;
        height: 13px;
        font-size: 10px;
    }

    .language-selector { height: 28px; }
    .language-selector a { min-width: 20px; padding: 2px 3px; font-size: 0.6rem; }
    .language-selector .lang-flag { font-size: 0.65rem; }

    .category-toggle { font-size: 0.75rem; padding: 6px 8px; min-height: 32px; }

    .header-search { height: 34px; min-height: 34px; }
    .header-search input { font-size: 0.75rem; }

    .stream-btn { padding: 3px 8px; font-size: 0.65rem; min-height: 28px; }
    .stream-btn .quality-badge { font-size: 0.45rem; padding: 1px 3px; }

    /* --- FIX: Very Small Phone Alignment --- */
    .channel-card {
        min-height: 200px;
        padding: 10px 6px;
    }
    
    .channel-card h4 {
        font-size: 0.75rem;
    }
    
    .channel-card .channel-logo {
        width: 50px;
        height: 50px;
    }
    /* --- END FIX --- */
}

/* ============================================================
   DESKTOP - HIDE MOBILE DROPDOWN
   ============================================================ */
@media (min-width: 769px) {
    .category-dropdown { display: none !important; }
}

/* ============================================
   MISSING: MODAL OVERLAY DUPLICATE
   ============================================ */
.modal-overlay .modal-content {
    background: #141a24;
    border-radius: 20px;
    border: 1px solid #2a3340;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
    animation: modalSlideIn 0.3s ease;
}

body.light-theme .modal-overlay .modal-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header .modal-close-btn {
    background: none;
    border: none;
    color: #6f89aa;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0 4px;
}

body.light-theme .modal-header .modal-close-btn { color: #94a3b8; }

.modal-header .modal-close-btn:hover {
    color: #ff6b6b;
    transform: rotate(90deg);
}

.modal-body .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    background: #1f2a36;
    border: 2px solid #2e3b4a;
    border-radius: 10px;
    color: #eef2f7;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

body.light-theme .modal-body .form-group textarea {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #1a2330;
}

.modal-body .form-group textarea:focus {
    border-color: #f6b83e;
    background: #1a2632;
    box-shadow: 0 0 0 4px rgba(246, 184, 62, 0.08);
}

body.light-theme .modal-body .form-group textarea:focus { background: #ffffff; }

.modal-body .form-group textarea::placeholder {
    color: #4a5a6a;
}

body.light-theme .modal-body .form-group textarea::placeholder { color: #94a3b8; }

.modal-body .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #1f2a36;
    border: 2px solid #2e3b4a;
    border-radius: 10px;
    color: #eef2f7;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f89aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

body.light-theme .modal-body .form-group select {
    background-color: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #1a2330;
}

.modal-body .form-group select:focus {
    border-color: #f6b83e;
    background-color: #1a2632;
    box-shadow: 0 0 0 4px rgba(246, 184, 62, 0.08);
}

body.light-theme .modal-body .form-group select:focus { background-color: #ffffff; }

.modal-body .form-group select option {
    background: #1f2a36;
    color: #eef2f7;
    padding: 10px;
}

body.light-theme .modal-body .form-group select option {
    background: #ffffff;
    color: #1a2330;
}

.modal-body .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
}

.modal-body .form-check input[type="checkbox"],
.modal-body .form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #f6b83e;
    cursor: pointer;
    flex-shrink: 0;
}

.modal-body .form-check label {
    color: #bccbdf;
    font-size: 0.9rem;
    cursor: pointer;
    margin: 0;
}

body.light-theme .modal-body .form-check label { color: #475569; }

.modal-body .btn-secondary {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 2px solid #2e3b4a;
    border-radius: 10px;
    color: #bccbdf;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

body.light-theme .modal-body .btn-secondary {
    border: 2px solid #e2e8f0;
    color: #475569;
}

.modal-body .btn-secondary:hover {
    background: #1f2a36;
    color: #fff;
    border-color: #f6b83e;
}

body.light-theme .modal-body .btn-secondary:hover {
    background: #f1f5f9;
    color: #1a2330;
}

.modal-body .btn-danger {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal-body .btn-danger:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

.modal-body .btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-body .btn-group .btn-submit,
.modal-body .btn-group .btn-secondary {
    flex: 1 1 auto;
    min-width: 120px;
}

.modal-body .btn-submit.loading .btn-text { display: none; }

.modal-body .btn-submit.loading .btn-spinner {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

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

.modal-body .divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #2a3340, transparent);
    margin: 20px 0;
}

body.light-theme .modal-body .divider {
    background: linear-gradient(to right, transparent, #e2e8f0, transparent);
}

.modal-body .divider-text {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #6f89aa;
    font-size: 0.85rem;
    margin: 20px 0;
}

body.light-theme .modal-body .divider-text { color: #94a3b8; }

.modal-body .divider-text::before,
.modal-body .divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #2a3340;
}

body.light-theme .modal-body .divider-text::before,
body.light-theme .modal-body .divider-text::after { background: #e2e8f0; }

.modal-body .modal-icon {
    text-align: center;
    margin-bottom: 20px;
}

.modal-body .modal-icon i {
    font-size: 3.5rem;
    color: #f6b83e;
    display: block;
    margin-bottom: 12px;
}

.modal-body .modal-icon.success i { color: #2ecc71; }
.modal-body .modal-icon.error i { color: #e74c3c; }
.modal-body .modal-icon.warning i { color: #f39c12; }

.modal-body .modal-icon h3 {
    color: #eef2f7;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
}

body.light-theme .modal-body .modal-icon h3 { color: #1a2330; }

.modal-body .modal-icon p {
    color: #8ba0c0;
    font-size: 0.9rem;
    line-height: 1.6;
}

body.light-theme .modal-body .modal-icon p { color: #64748b; }

.modal-tabs {
    display: flex;
    gap: 4px;
    padding: 0 28px;
    border-bottom: 1px solid #1d2836;
    background: #10171f;
}

body.light-theme .modal-tabs {
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.modal-tabs .modal-tab {
    padding: 12px 18px;
    color: #8ba0c0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    margin-bottom: -1px;
}

body.light-theme .modal-tabs .modal-tab { color: #64748b; }

.modal-tabs .modal-tab:hover { color: #fff; }

body.light-theme .modal-tabs .modal-tab:hover { color: #1a2330; }

.modal-tabs .modal-tab.active {
    color: #f6b83e;
    border-bottom-color: #f6b83e;
}

body.light-theme .modal-tabs .modal-tab.active { color: #d97706; }

@media (max-width: 768px) {
    .modal-container { max-width: 90%; border-radius: 18px; }
    .modal-header { padding: 20px 24px 14px; }
    .modal-header h2 { font-size: 1.3rem; }
    .modal-body { padding: 20px 24px 18px; }
    .modal-footer { padding: 14px 24px 20px; }
    .modal-tabs { padding: 0 24px; }
}

@media (max-width: 360px) {
    .modal-container { max-width: 98%; border-radius: 14px; margin: 5px; }
    .modal-header { padding: 16px 16px 10px; }
    .modal-header h2 { font-size: 1.1rem; }
    .modal-close { font-size: 28px; }
    .modal-body { padding: 16px 16px 14px; }
    .modal-footer { padding: 12px 16px 16px; }
    .modal-body .form-group input,
    .modal-body .form-group textarea,
    .modal-body .form-group select { padding: 10px 12px; font-size: 0.9rem; }
    .modal-body .btn-submit,
    .modal-body .btn-danger { padding: 12px; font-size: 0.95rem; }
    .modal-tabs { padding: 0 16px; }
    .modal-tabs .modal-tab { padding: 10px 14px; font-size: 0.85rem; }
    .user-dropdown .dropdown-menu { right: -90px; min-width: 170px; }
    .user-dropdown .dropdown-toggle { padding: 4px 8px; font-size: 0.85rem; }
    .user-dropdown .dropdown-toggle .avatar { width: 28px; height: 28px; font-size: 0.7rem; }
}

@media (max-width: 768px) {
    .access-denied-overlay { padding: 24px; }
    .access-denied-overlay i { font-size: 3rem; }
    .access-denied-overlay h2 { font-size: 1.5rem; }
    .access-denied-overlay .btn-group { flex-direction: column; width: 100%; max-width: 280px; margin: 0 auto; }
    .access-denied-overlay .btn,
    .access-denied-overlay .btn-secondary { width: 100%; justify-content: center; }
}

@media (max-width: 500px) {
    .access-denied-overlay { padding: 16px; }
    .access-denied-overlay i { font-size: 2.5rem; margin-bottom: 14px; }
    .access-denied-overlay h2 { font-size: 1.2rem; margin-bottom: 8px; }
    .access-denied-overlay p { font-size: 0.85rem; margin-bottom: 16px; }
    .access-denied-overlay .btn,
    .access-denied-overlay .btn-secondary { padding: 10px 22px; font-size: 0.9rem; }
    .password-requirements { font-size: 0.75rem; }
    .password-requirements li { padding: 1px 0; }
}

.modal-body .form-group input.error,
.modal-body .form-group textarea.error,
.modal-body .form-group select.error {
    border-color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
}

.modal-body .form-group input.success,
.modal-body .form-group textarea.success,
.modal-body .form-group select.success {
    border-color: #2ecc71;
    background: rgba(46, 204, 113, 0.05);
}

.modal-body .form-group .form-hint {
    display: block;
    color: #6f89aa;
    font-size: 0.75rem;
    margin-top: 4px;
    line-height: 1.4;
}

body.light-theme .modal-body .form-group .form-hint { color: #94a3b8; }

.modal-body .form-group .form-error {
    display: block;
    color: #e74c3c;
    font-size: 0.75rem;
    margin-top: 4px;
    line-height: 1.4;
}

.modal-body .social-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.modal-body .social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px;
    background: #1f2a36;
    border: 1px solid #2e3b4a;
    border-radius: 10px;
    color: #eef2f7;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

body.light-theme .modal-body .social-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a2330;
}

.modal-body .social-btn:hover {
    background: #2a3848;
    border-color: #f6b83e;
}

body.light-theme .modal-body .social-btn:hover { background: #f1f5f9; }

.modal-body .social-btn i { font-size: 1.1rem; }
.modal-body .social-btn.google i { color: #db4437; }
.modal-body .social-btn.facebook i { color: #4267b2; }
.modal-body .social-btn.twitter i { color: #1da1f2; }

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

@keyframes modalSlideOut {
    from { transform: translateY(0) scale(1); opacity: 1; }
    to { transform: translateY(-30px) scale(0.95); opacity: 0; }
}

.modal-overlay.closing { animation: modalFadeOut 0.3s ease forwards; }
.modal-overlay.closing .modal-container { animation: modalSlideOut 0.3s ease forwards; }

body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

@media (prefers-color-scheme: light) {
    /* Keep dark theme as intended - no overrides */
}

/* ============================================
   MISSING FROM EPG PAGE STYLES
   ============================================ */

/* ---------- CHANNEL NAV / DROPDOWN ---------- */
.channel-nav {
    background: #10171f;
    padding: 12px 0;
    border-bottom: 1px solid #212b36;
}

body.light-theme .channel-nav {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.channel-nav .container {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}
.channel-nav .channel-dropdown {
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}
.channel-nav .channel-dropdown select {
    width: 100%;
    padding: 10px 16px;
    background: #1f2a36;
    border: 1px solid #2e3b4a;
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
    transition: 0.2s;
    cursor: pointer;
}

body.light-theme .channel-nav .channel-dropdown select {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1a2330;
}

.channel-nav .channel-dropdown select:focus {
    border-color: #f6b83e;
}
.channel-nav .channel-dropdown select option {
    background: #141a24;
    color: #eef2f7;
    padding: 8px;
}

body.light-theme .channel-nav .channel-dropdown select option {
    background: #ffffff;
    color: #1a2330;
}

.channel-nav .channel-label {
    color: #8ba0c0;
    font-size: 0.9rem;
    white-space: nowrap;
}

body.light-theme .channel-nav .channel-label { color: #64748b; }

.channel-nav .channel-name-display {
    color: #f6b83e;
    font-weight: 600;
    font-size: 1rem;
}

body.light-theme .channel-nav .channel-name-display { color: #d97706; }

/* ---------- TOAST CONTAINER (top-right variant) ---------- */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

/* ---------- EPG SECTION ---------- */
.epg-section {
    padding: 30px 0 50px;
}
.epg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
}
.epg-header h1 {
    font-size: 2rem;
    font-weight: 700;
}

body.light-theme .epg-header h1 { color: #1a2330; }

.epg-header h1 small {
    font-size: 1rem;
    font-weight: 400;
    color: #8ba0c0;
    margin-left: 14px;
}

body.light-theme .epg-header h1 small { color: #64748b; }

.epg-header .date-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}
.epg-header .date-nav .date-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #2e3b4a;
    background: #1f2a36;
    color: #bccbdf;
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
}

body.light-theme .epg-header .date-nav .date-btn {
    border: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #475569;
}

.epg-header .date-nav .date-btn:hover {
    background: #2a3848;
    border-color: #f6b83e;
}

body.light-theme .epg-header .date-nav .date-btn:hover {
    background: #e2e8f0;
    color: #1a2330;
}

.epg-header .date-nav .date-btn.active {
    background: #f6b83e;
    color: #0b0e14;
    border-color: #f6b83e;
}

body.light-theme .epg-header .date-nav .date-btn.active { color: #ffffff; }

.epg-header .date-nav .date-display {
    color: #eef2f7;
    font-weight: 500;
    min-width: 120px;
    text-align: center;
}

body.light-theme .epg-header .date-nav .date-display { color: #1a2330; }

.epg-header .date-nav .current-time {
    color: #6f89aa;
    font-size: 0.85rem;
    padding: 8px 12px;
    background: #1f2a36;
    border-radius: 8px;
    border: 1px solid #2e3b4a;
}

body.light-theme .epg-header .date-nav .current-time {
    color: #94a3b8;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

/* ---------- CURRENT PROGRAM ---------- */
.current-program {
    background: #141a24;
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid #25303e;
    margin-bottom: 24px;
    border-left: 4px solid #f6b83e;
}

body.light-theme .current-program {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #f6b83e;
}

.current-program .now-label {
    color: #f6b83e;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

body.light-theme .current-program .now-label { color: #d97706; }

.current-program .now-label .current-time-badge {
    background: #f6b83e;
    color: #0b0e14;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    margin-left: 8px;
}

body.light-theme .current-program .now-label .current-time-badge { color: #ffffff; }

.current-program .program-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 4px 0;
}

body.light-theme .current-program .program-title { color: #1a2330; }

.current-program .program-time {
    color: #8ba0c0;
    font-size: 0.9rem;
}

body.light-theme .current-program .program-time { color: #64748b; }

.current-program .program-desc {
    color: #bccbdf;
    margin-top: 8px;
    line-height: 1.6;
}

body.light-theme .current-program .program-desc { color: #475569; }

.current-program .program-progress {
    margin-top: 12px;
    background: #1f2a36;
    border-radius: 4px;
    height: 4px;
    overflow: hidden;
}

body.light-theme .current-program .program-progress { background: #e2e8f0; }

.current-program .program-progress .progress-bar {
    height: 100%;
    background: #f6b83e;
    transition: width 0.5s ease;
}
.no-program {
    color: #6f89aa;
    text-align: center;
    padding: 20px;
}

body.light-theme .no-program { color: #94a3b8; }

.no-program i {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

/* ---------- PROGRAM LIST ---------- */
.program-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.program-item {
    background: #141a24;
    border-radius: 10px;
    padding: 12px 18px;
    border: 1px solid #1d2836;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

body.light-theme .program-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.program-item:hover {
    border-color: #f6b83e;
    background: #1a2330;
}

body.light-theme .program-item:hover { background: #f8fafc; }

.program-item .program-info {
    flex: 1;
}
.program-item .program-title {
    font-weight: 500;
}

body.light-theme .program-item .program-title { color: #1a2330; }

.program-item .program-time {
    color: #8ba0c0;
    font-size: 0.85rem;
}

body.light-theme .program-item .program-time { color: #64748b; }

.program-item .program-category {
    background: #2c3b4e;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #bccfe6;
    margin-left: 8px;
}

body.light-theme .program-item .program-category {
    background: #e2e8f0;
    color: #475569;
}

.program-item .program-rating {
    color: #f6b83e;
    font-weight: 600;
    font-size: 0.8rem;
    margin-left: 8px;
}
.program-item.past {
    opacity: 0.5;
}
.program-item.current {
    border-left: 3px solid #f6b83e;
    background: #1a2a24;
}

body.light-theme .program-item.current { background: #f0fdf4; }

.program-item .program-actions {
    display: flex;
    gap: 8px;
}
.program-item .program-actions .btn-sm {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}
.btn-sm.btn-edit {
    background: #3498db;
    color: #fff;
}
.btn-sm.btn-edit:hover {
    background: #2980b9;
}
.btn-sm.btn-delete {
    background: #e74c3c;
    color: #fff;
}
.btn-sm.btn-delete:hover {
    background: #c0392b;
}

/* ---------- EPG LINKS ---------- */
.epg-links {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.epg-links a {
    color: #9aafca;
    font-size: 0.9rem;
    border-bottom: 1px dashed #3f4d61;
    padding-bottom: 2px;
}

body.light-theme .epg-links a {
    color: #64748b;
    border-bottom-color: #cbd5e1;
}

.epg-links a:hover {
    color: #f6b83e;
}

/* ---------- AD CONTAINERS ---------- */
.header-ad-container,
.content-ad-container,
.sidebar-ad-container,
.footer-ad-container {
    padding: 10px 0;
    text-align: center;
}
.header-ad-container .container,
.content-ad-container .container,
.sidebar-ad-container .container,
.footer-ad-container .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.header-ad-container {
    background: #10171f;
    border-bottom: 1px solid #1d2836;
}

body.light-theme .header-ad-container {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
}

.content-ad-container {
    background: #0f161f;
    border-radius: 12px;
    margin: 20px 0;
    padding: 20px;
}

body.light-theme .content-ad-container { background: #f8fafc; }

.sidebar-ad-container {
    background: #0f161f;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
}

body.light-theme .sidebar-ad-container { background: #f8fafc; }

.footer-ad-container {
    background: #10171f;
    border-top: 1px solid #1d2836;
    margin-top: 20px;
}

body.light-theme .footer-ad-container {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
}

/* ---------- EPG PAGE RESPONSIVE ---------- */
@media (max-width: 768px) {
    .epg-header { flex-direction: column; align-items: stretch; }
    .epg-header .date-nav { justify-content: center; flex-wrap: wrap; }
    .program-item { flex-wrap: wrap; gap: 8px; }
    .program-item .program-actions { width: 100%; justify-content: flex-end; }
    .channel-nav .container { flex-direction: column; align-items: stretch; }
    .channel-nav .channel-dropdown { max-width: 100%; }
    .current-program .program-title { font-size: 1.1rem; }
    .epg-header .date-nav .current-time { font-size: 0.75rem; padding: 4px 10px; }
}

@media (max-width: 500px) {
    .epg-header h1 { font-size: 1.4rem; }
    .epg-header .date-nav .date-btn { padding: 6px 10px; font-size: 0.8rem; }
}

/* ============================================================
   EPG HEADER LAYOUT FIX - DESKTOP
   ============================================================ */
@media (min-width: 769px) {

    .header .container {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .header .container .logo {
        flex: 0 0 auto;
        margin-right: auto;
    }

    .header .container .theme-selector {
        flex: 0 0 auto;
        order: 1;
    }

    .header .container .language-selector {
        flex: 0 0 auto;
        order: 2;
    }

    .header .container > div:last-child {
        flex: 0 0 auto;
        order: 3;
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: nowrap;
    }

    .language-selector {
        padding: 4px 8px;
    }

    .language-selector a {
        padding: 4px 10px;
        font-size: 0.78rem;
    }
}

/* ============================================================
   EPG DATE NAV - MOBILE OPTIMIZED
   ============================================================ */
@media (max-width: 768px) {

    .epg-header .date-nav {
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
            "prev date next"
            "today today time";
        gap: 8px;
        align-items: center;
        width: 100%;
    }

    .epg-header .date-nav .date-btn:nth-of-type(1) {
        grid-area: prev;
        padding: 10px 14px;
        font-size: 0.9rem;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .epg-header .date-nav .date-display {
        grid-area: date;
        text-align: center;
        font-size: 1rem;
        font-weight: 600;
        padding: 4px 0;
        min-width: 0;
        white-space: nowrap;
    }

    .epg-header .date-nav .date-btn:nth-of-type(2) {
        grid-area: next;
        padding: 10px 14px;
        font-size: 0.9rem;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .epg-header .date-nav .date-btn.active,
    .epg-header .date-nav .date-btn:nth-of-type(3) {
        grid-area: today;
        width: 100%;
        padding: 10px 14px;
        font-size: 0.85rem;
        text-align: center;
        justify-content: center;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .epg-header .date-nav .current-time {
        grid-area: time;
        width: 100%;
        text-align: center;
        font-size: 0.8rem;
        padding: 10px 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }
}

/* ============================================================
   SMALL PHONES (500px) - tighter date nav
   ============================================================ */
@media (max-width: 500px) {

    .epg-header .date-nav {
        gap: 6px;
    }

    .epg-header .date-nav .date-btn:nth-of-type(1),
    .epg-header .date-nav .date-btn:nth-of-type(2) {
        padding: 9px 12px;
        min-width: 40px;
        font-size: 0.85rem;
    }

    .epg-header .date-nav .date-display {
        font-size: 0.95rem;
    }

    .epg-header .date-nav .date-btn.active,
    .epg-header .date-nav .date-btn:nth-of-type(3) {
        padding: 9px 12px;
        font-size: 0.8rem;
    }

    .epg-header .date-nav .current-time {
        padding: 8px 10px;
        font-size: 0.75rem;
    }
}

/* ============================================================
   VERY SMALL (360px)
   ============================================================ */
@media (max-width: 360px) {

    .epg-header .date-nav .date-btn:nth-of-type(1),
    .epg-header .date-nav .date-btn:nth-of-type(2) {
        padding: 8px 10px;
        min-width: 36px;
        font-size: 0.8rem;
    }

    .epg-header .date-nav .date-display {
        font-size: 0.85rem;
    }

    .epg-header .date-nav .date-btn.active,
    .epg-header .date-nav .date-btn:nth-of-type(3) {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .epg-header .date-nav .current-time {
        padding: 7px 8px;
        font-size: 0.7rem;
    }
}

/* ============================================
   CONTACT PAGE STYLES
   ============================================ */
.contact-page {
    padding: 40px 0 60px;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

/* ---------- Contact Info Panel ---------- */
.contact-info {
    background: #141a24;
    border-radius: 16px;
    border: 1px solid #2a3340;
    padding: 30px;
}

body.light-theme .contact-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.contact-info h3 {
    color: #f6b83e;
    font-size: 1.3rem;
    margin-bottom: 16px;
}

body.light-theme .contact-info h3 {
    color: #d97706;
}

.contact-info p {
    color: #bccbdf;
    line-height: 1.8;
    margin-bottom: 24px;
}

body.light-theme .contact-info p {
    color: #475569;
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #1d2836;
}

body.light-theme .contact-info .info-item {
    border-bottom: 1px solid #e2e8f0;
}

.contact-info .info-item:last-child {
    border-bottom: none;
}

.contact-info .info-item .icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #1a2330;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f6b83e;
    font-size: 1.1rem;
    flex-shrink: 0;
}

body.light-theme .contact-info .info-item .icon {
    background: #f1f5f9;
    color: #d97706;
}

.contact-info .info-item .text {
    flex: 1;
}

.contact-info .info-item .text .label {
    font-size: 0.75rem;
    color: #6f89aa;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.light-theme .contact-info .info-item .text .label {
    color: #94a3b8;
}

.contact-info .info-item .text .value {
    color: #eef2f7;
    font-weight: 500;
}

body.light-theme .contact-info .info-item .text .value {
    color: #1a2330;
}

.contact-info .info-item .text .value a {
    color: #f6b83e;
    text-decoration: none;
}

body.light-theme .contact-info .info-item .text .value a {
    color: #d97706;
}

.contact-info .info-item .text .value a:hover {
    text-decoration: underline;
}

/* ---------- Contact Form Panel ---------- */
.contact-form-wrapper {
    background: #141a24;
    border-radius: 16px;
    border: 1px solid #2a3340;
    padding: 30px;
}

body.light-theme .contact-form-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.contact-form-wrapper h3 {
    color: #f6b83e;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

body.light-theme .contact-form-wrapper h3 {
    color: #d97706;
}

.contact-form-wrapper .form-subtitle {
    color: #8ba0c0;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

body.light-theme .contact-form-wrapper .form-subtitle {
    color: #64748b;
}

.contact-form-wrapper .form-group {
    margin-bottom: 18px;
}

.contact-form-wrapper .form-group label {
    display: block;
    color: #bccbdf;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.9rem;
}

body.light-theme .contact-form-wrapper .form-group label {
    color: #475569;
}

.contact-form-wrapper .form-group label .required {
    color: #e74c3c;
}

.contact-form-wrapper .form-group input,
.contact-form-wrapper .form-group textarea,
.contact-form-wrapper .form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #1f2a36;
    border: 2px solid #2e3b4a;
    border-radius: 10px;
    color: #eef2f7;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    box-sizing: border-box;
    font-family: inherit;
}

body.light-theme .contact-form-wrapper .form-group input,
body.light-theme .contact-form-wrapper .form-group textarea,
body.light-theme .contact-form-wrapper .form-group select {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    color: #1a2330;
}

.contact-form-wrapper .form-group input:focus,
.contact-form-wrapper .form-group textarea:focus,
.contact-form-wrapper .form-group select:focus {
    border-color: #f6b83e;
    background: #1a2632;
    box-shadow: 0 0 0 4px rgba(246, 184, 62, 0.08);
}

body.light-theme .contact-form-wrapper .form-group input:focus,
body.light-theme .contact-form-wrapper .form-group textarea:focus,
body.light-theme .contact-form-wrapper .form-group select:focus {
    background: #ffffff;
}

.contact-form-wrapper .form-group input::placeholder,
.contact-form-wrapper .form-group textarea::placeholder {
    color: #4a5a6a;
}

body.light-theme .contact-form-wrapper .form-group input::placeholder,
body.light-theme .contact-form-wrapper .form-group textarea::placeholder {
    color: #94a3b8;
}

.contact-form-wrapper .form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.contact-form-wrapper .form-group .helper-text {
    color: #6f89aa;
    font-size: 0.75rem;
    margin-top: 4px;
}

body.light-theme .contact-form-wrapper .form-group .helper-text {
    color: #94a3b8;
}

.contact-form-wrapper .captcha-wrapper {
    display: flex;
    justify-content: center;
    margin: 16px 0;
    min-height: 65px;
}

.contact-form-wrapper .cf-turnstile {
    display: flex;
    justify-content: center;
}

.contact-form-wrapper .cf-turnstile iframe {
    border-radius: 8px;
}

.contact-form-wrapper .form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0 16px;
    display: none;
    font-size: 0.95rem;
}

.contact-form-wrapper .form-message.error {
    display: block;
    background: rgba(255, 107, 107, 0.12);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.2);
}

body.light-theme .contact-form-wrapper .form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.contact-form-wrapper .form-message.success {
    display: block;
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

body.light-theme .contact-form-wrapper .form-message.success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.contact-form-wrapper .btn-submit {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #f6b83e, #f05a28);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.contact-form-wrapper .btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(246, 184, 62, 0.3);
}

.contact-form-wrapper .btn-submit:active {
    transform: translateY(0);
}

.contact-form-wrapper .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-form-wrapper .btn-submit.loading .btn-text {
    display: none;
}

.contact-form-wrapper .btn-submit.loading .btn-spinner {
    display: inline-block;
    animation: spin 0.8s linear infinite;
}

.contact-form-wrapper .btn-spinner {
    display: none;
}

/* ---------- SEO Breadcrumb ---------- */
.seo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.85rem;
    color: #8ba0c0;
    flex-wrap: wrap;
}

body.light-theme .seo-breadcrumb {
    color: #64748b;
}

.seo-breadcrumb a {
    color: #8ba0c0;
    text-decoration: none;
    transition: 0.2s;
}

body.light-theme .seo-breadcrumb a {
    color: #64748b;
}

.seo-breadcrumb a:hover {
    color: #f6b83e;
}

body.light-theme .seo-breadcrumb a:hover {
    color: #d97706;
}

.seo-breadcrumb .separator {
    color: #4a5a6a;
}

body.light-theme .seo-breadcrumb .separator {
    color: #cbd5e1;
}

.seo-breadcrumb .current {
    color: #eef2f7;
}

body.light-theme .seo-breadcrumb .current {
    color: #1a2330;
}

/* ---------- Contact Page Section Title ---------- */
.contact-page .section-title {
    margin-bottom: 20px;
}

.contact-page .section-title h1 {
    color: #f6b83e;
    font-size: 2rem;
    font-weight: 700;
}

body.light-theme .contact-page .section-title h1 {
    color: #d97706;
}

.contact-page .section-title p {
    color: #8ba0c0;
    margin-top: 8px;
    font-size: 1.05rem;
}

body.light-theme .contact-page .section-title p {
    color: #64748b;
}

/* ---------- Contact Page Responsive ---------- */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 500px) {
    .contact-page {
        padding: 20px 0 40px;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 20px;
    }

    .contact-info .info-item {
        padding: 10px 0;
    }

    .contact-info .info-item .icon {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .contact-form-wrapper .form-group input,
    .contact-form-wrapper .form-group textarea,
    .contact-form-wrapper .form-group select {
        padding: 10px 14px;
        font-size: 0.95rem;
    }

    .contact-form-wrapper .btn-submit {
        padding: 12px;
        font-size: 0.95rem;
    }

    .contact-page .section-title h1 {
        font-size: 1.3rem;
    }
}

/* ============================================
   ABOUT PAGE STYLES
   ============================================ */
.about-page {
    padding: 40px 0 60px;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 30px;
}

/* ---------- About Hero ---------- */
.about-hero {
    background: linear-gradient(135deg, #1a2330, #0f1a24);
    border-radius: 16px;
    border: 1px solid #2a3340;
    padding: 40px;
    text-align: center;
}

body.light-theme .about-hero {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
}

.about-hero h1 {
    color: #f6b83e;
    font-size: 2.5rem;
    margin-bottom: 16px;
}

body.light-theme .about-hero h1 {
    color: #d97706;
}

.about-hero .about-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 12px;
    margin: 16px 0;
}

/* ---------- About Content ---------- */
.about-content {
    background: #141a24;
    border-radius: 16px;
    border: 1px solid #2a3340;
    padding: 40px;
    line-height: 1.8;
}

body.light-theme .about-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.about-content h2 {
    color: #f6b83e;
    font-size: 1.8rem;
    margin-top: 24px;
    margin-bottom: 12px;
}

body.light-theme .about-content h2 {
    color: #d97706;
}

.about-content h2:first-child {
    margin-top: 0;
}

.about-content h3 {
    color: #bccbdf;
    font-size: 1.3rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

body.light-theme .about-content h3 {
    color: #475569;
}

.about-content p {
    color: #dce4ed;
    margin-bottom: 16px;
}

body.light-theme .about-content p {
    color: #334155;
}

.about-content ul,
.about-content ol {
    color: #dce4ed;
    margin: 12px 0 16px 24px;
}

body.light-theme .about-content ul,
body.light-theme .about-content ol {
    color: #334155;
}

.about-content ul li,
.about-content ol li {
    margin-bottom: 8px;
}

.about-content a {
    color: #f6b83e;
    text-decoration: none;
}

body.light-theme .about-content a {
    color: #d97706;
}

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

.about-content .highlight-box {
    background: #1a2330;
    border-left: 4px solid #f6b83e;
    padding: 20px 24px;
    border-radius: 8px;
    margin: 20px 0;
}

body.light-theme .about-content .highlight-box {
    background: #f8fafc;
    border-left: 4px solid #d97706;
}

.about-content .highlight-box strong {
    color: #f6b83e;
}

body.light-theme .about-content .highlight-box strong {
    color: #d97706;
}

/* ---------- About Stats ---------- */
.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.about-stats .stat-item {
    background: #1a2330;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid #2a3340;
}

body.light-theme .about-stats .stat-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.about-stats .stat-item .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #f6b83e;
}

body.light-theme .about-stats .stat-item .stat-number {
    color: #d97706;
}

.about-stats .stat-item .stat-label {
    color: #8ba0c0;
    font-size: 0.85rem;
    margin-top: 4px;
}

body.light-theme .about-stats .stat-item .stat-label {
    color: #64748b;
}

/* ---------- About Page Section Title ---------- */
.about-page .section-title {
    margin-bottom: 20px;
}

.about-page .section-title h1 {
    color: #f6b83e;
    font-size: 2rem;
    font-weight: 700;
}

body.light-theme .about-page .section-title h1 {
    color: #d97706;
}

.about-page .section-title p {
    color: #8ba0c0;
    margin-top: 8px;
    font-size: 1.05rem;
}

body.light-theme .about-page .section-title p {
    color: #64748b;
}

/* ---------- About Page Responsive ---------- */
@media (max-width: 768px) {
    .about-hero {
        padding: 24px;
    }

    .about-hero h1 {
        font-size: 1.8rem;
    }

    .about-content {
        padding: 24px;
    }

    .about-content h2 {
        font-size: 1.4rem;
    }

    .about-content h3 {
        font-size: 1.1rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-page .section-title h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 500px) {
    .about-hero {
        padding: 16px;
    }

    .about-hero h1 {
        font-size: 1.4rem;
    }

    .about-content {
        padding: 16px;
    }

    .about-stats {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .about-stats .stat-item {
        padding: 14px;
    }

    .about-stats .stat-item .stat-number {
        font-size: 1.5rem;
    }

    .about-page .section-title h1 {
        font-size: 1.3rem;
    }
}
/* ============================================================
   FINAL FIX: STRICT CARD ALIGNMENT FOR ALL PAGES
   ============================================================ */

@media (max-width: 500px) {
    /* Force the card to be a flex container with strict boundaries */
    .channel-card {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 230px; /* Ensures consistent height even if content is short */
        padding: 12px 8px 10px;
    }

    /* Make the card-link stretch to fill the card so content pushes to the bottom */
    .channel-card .card-link {
        display: flex;
        flex-direction: column;
        flex: 1;
        justify-content: space-between;
        height: 100%;
        min-height: 0; /* Prevents flex items from overflowing */
    }

    /* 1. Logo stays fixed at the top */
    .channel-card .channel-logo {
        width: 60px;
        height: 60px;
        margin: 0 auto 8px;
        flex-shrink: 0;
    }

    /* 2. Channel Name: Force ONE line with ellipsis */
    .channel-card h4 {
        font-size: 0.8rem; /* Slightly smaller to fit long names */
        font-weight: 600;
        margin: 6px 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        max-width: 100%;
        min-height: 1.2em; /* Prevents jumping if name is empty */
    }

    /* 3. Category Tag: Force ONE line with ellipsis */
    .channel-card .category-tag {
        font-size: 0.55rem;
        padding: 2px 8px;
        margin-top: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    /* 4. Bottom info (Live + Views) anchored to bottom */
    .channel-card .live-badge {
        font-size: 0.6rem;
        margin-top: auto; /* Pushes this to the bottom */
        padding-top: 6px;
    }

    .channel-card .view-count {
        font-size: 0.6rem;
        margin-top: 2px;
    }

    /* 5. Favorite button stays fixed in corner */
    .channel-card .favorite-btn {
        top: 6px;
        right: 6px;
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
}

/* ============================================================
   EXTRA SAFETY FOR VERY SMALL SCREENS (360px)
   ============================================================ */
@media (max-width: 360px) {
    .channel-card {
        min-height: 210px;
        padding: 10px 6px;
    }

    .channel-card h4 {
        font-size: 0.75rem;
    }

    .channel-card .channel-logo {
        width: 50px;
        height: 50px;
    }
    
    .channel-card .category-tag {
        font-size: 0.5rem;
        padding: 1px 6px;
    }
}