/* NURHD TV - Modern Premium Theme */

:root {
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary-color: #10b981;
    --accent-color: #06b6d4;
    --accent-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 50%, #0891b2 100%);
    --bg-dark: #0c1222;
    --bg-darker: #060b14;
    --bg-card: rgba(20, 28, 45, 0.9);
    --bg-card-solid: #141c2d;
    --bg-card-hover: rgba(30, 42, 65, 0.95);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(14, 165, 233, 0.35);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* ===== LIGHT THEME ===== */
.light-theme {
    --bg-dark: #f1f5f9;
    --bg-darker: #e2e8f0;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-card-solid: #ffffff;
    --bg-card-hover: rgba(241, 245, 249, 0.98);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-glow: rgba(14, 165, 233, 0.2);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 30px rgba(14, 165, 233, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.06);
}

.light-theme body {
    background: var(--bg-dark);
    background-image:
        radial-gradient(ellipse at top, rgba(14, 165, 233, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.04) 0%, transparent 50%);
}

.light-theme .top-header {
    background: rgba(241, 245, 249, 0.9);
}

.light-theme .top-header.scrolled {
    background: rgba(241, 245, 249, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.light-theme .bottom-nav {
    background: rgba(241, 245, 249, 0.95);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
}

.light-theme .channel-badge.free {
    background: rgba(16, 185, 129, 0.1);
}

.light-theme .channel-badge.vip {
    background: rgba(251, 191, 36, 0.1);
}

.light-theme .channel-lock {
    background: rgba(255, 255, 255, 0.8);
}

.light-theme .btn-icon {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #334155;
}

.light-theme .logo {
    color: white;
}

.light-theme #splashScreen {
    background: #f1f5f9;
}

.light-theme .splash-title {
    color: #0f172a;
}

.light-theme .nhd-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .nhd-title {
    color: #0f172a;
}

.light-theme .nhd-text {
    color: #64748b;
}

.light-theme #swipeRefreshIndicator .sr-content {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-dark);
    background-image: 
        radial-gradient(ellipse at top, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 90px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(14, 165, 233, 0.25); }
    50% { box-shadow: 0 0 40px rgba(14, 165, 233, 0.4); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.5s ease-out forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.4s ease-out forwards;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===== TOP HEADER - MODERN GLASS ===== */
.top-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 15, 26, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 14px;
    transition: all 0.3s ease;
}

.top-header.scrolled {
    background: rgba(15, 15, 26, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 4px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    background: var(--accent-gradient);
    background-size: 200% 200%;
    animation: gradientShift 3s ease infinite;
    padding: 10px 20px;
    border-radius: 16px;
    box-shadow: var(--shadow-glow);
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo:hover {
    transform: scale(1.02);
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.35);
}

.logo-icon {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.btn-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 2;
    transition: transform 0.3s ease;
}

.btn-icon:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.35);
}

.btn-icon:hover svg {
    transform: scale(1.1);
}

.btn-icon:active {
    transform: translateY(0) scale(0.95);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px 12px 24px;
}

/* ===== CATEGORY SECTION - NAME ON TOP, HORIZONTAL CHANNELS ===== */
.category-section {
    margin-bottom: 42px;
    animation: fadeInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
}

.category-section:nth-child(1) { animation-delay: 0.08s; }
.category-section:nth-child(2) { animation-delay: 0.16s; }
.category-section:nth-child(3) { animation-delay: 0.24s; }
.category-section:nth-child(4) { animation-delay: 0.32s; }
.category-section:nth-child(5) { animation-delay: 0.4s; }
.category-section:nth-child(n+6) { animation-delay: 0.45s; }

/* Row: category name on top */
.category-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding: 0 4px 0 0;
    flex-wrap: wrap;
    gap: 10px;
}

.category-name {
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(14, 165, 233, 0.25);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(4px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.3);
}

.view-all-link svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.view-all-link:hover svg {
    transform: translateX(3px);
}

/* Legacy: keep for any old markup */
.category-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding: 0 4px; }
.category-title-wrapper { display: flex; align-items: center; gap: 12px; }
.category-icon { width: 40px; height: 40px; background: var(--accent-gradient); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.category-icon svg { width: 22px; height: 22px; color: white; stroke-width: 2; }
.category-title { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.category-count { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.view-all-btn { display: flex; align-items: center; gap: 6px; color: var(--primary-color); font-size: 14px; font-weight: 600; text-decoration: none; padding: 8px 16px; border-radius: 10px; background: rgba(14, 165, 233, 0.1); border: 1px solid rgba(14, 165, 233, 0.2); transition: all 0.3s ease; }
.view-all-btn:hover { background: var(--primary-color); color: white; transform: translateX(4px); }
.view-all-btn svg { width: 18px; height: 18px; }
.view-all-btn:hover svg { transform: translateX(4px); }

/* Channels Horizontal Scroll Container - left/right scroll */
.channels-scroll-container {
    position: relative;
    margin: 0 -12px;
    padding: 0 12px;
}
/* No gradient overlay – kivuli haifuniki channel cards */
.channels-scroll-container::before,
.channels-scroll-container::after {
    display: none;
}

.channels-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 0 24px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.channels-scroll::-webkit-scrollbar {
    display: none;
}

.channel-card-animate {
    animation: cardSlideIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    animation-delay: calc(0.04s * var(--card-i, 1));
    scroll-snap-align: start;
}
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll Navigation Buttons */
.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
}

.channels-scroll-container:hover .scroll-btn {
    opacity: 1;
    pointer-events: auto;
}

.scroll-btn.prev { left: 8px; }
.scroll-btn.next { right: 8px; }

.scroll-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.scroll-btn svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Channel Card - Modern Design */
.channel-card {
    flex-shrink: 0;
    width: 140px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.channel-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(14, 165, 233, 0.15);
}

.channel-card:active {
    transform: translateY(-4px) scale(0.98);
}

.channel-thumbnail {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.channel-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4) 100%);
}

.channel-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1;
}

.channel-card:hover .channel-thumbnail img {
    transform: scale(1.1);
}

.channel-thumbnail svg {
    width: 50px;
    height: 50px;
    color: white;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.channel-info {
    padding: 14px 12px;
    text-align: center;
}

.channel-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.channel-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.channel-badge.free {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.channel-badge.vip {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* Lock Icon Overlay */
.channel-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.channel-lock svg {
    width: 16px;
    height: 16px;
    color: #fbbf24;
}

/* ===== LEGACY CATEGORY CARD (For backward compatibility) ===== */
.category-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }

.category-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-4px) scale(1.01);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.category-thumbnail {
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-darker);
    position: relative;
}

.category-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-thumbnail img {
    transform: scale(1.1);
}

.thumbnail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-gradient);
    color: white;
}

.thumbnail-placeholder svg {
    width: 60px;
    height: 60px;
    opacity: 0.7;
}

.category-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.tag {
    background: rgba(14, 165, 233, 0.15);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(14, 165, 233, 0.25);
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

.pin-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

.btn-open {
    background: var(--accent-gradient);
    background-size: 200% 200%;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-open svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.btn-open:hover {
    animation: gradientShift 1s ease infinite;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
}

.btn-open:hover svg {
    transform: translateX(4px);
}

/* ===== BOTTOM NAVIGATION - PREMIUM GLASS ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 26, 0.9);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: flex;
    justify-content: space-around;
    padding: 12px 20px 20px;
    z-index: 100;
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 12px;
    font-weight: 600;
    position: relative;
}

.nav-item svg {
    width: 26px;
    height: 26px;
    stroke-width: 2;
    transition: all 0.3s ease;
}

.nav-item.active {
    color: white;
    background: var(--accent-gradient);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35);
}

.nav-item:not(.active):hover {
    color: var(--primary-color);
    background: rgba(14, 165, 233, 0.1);
}

.nav-item:not(.active):hover svg {
    transform: translateY(-2px);
}

/* ===== WHATSAPP FLOAT - MODERN ===== */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    z-index: 99;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 3s ease-in-out infinite;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 10px 40px rgba(37, 211, 102, 0.5);
    animation: none;
}

.whatsapp-float:hover svg {
    transform: scale(1.1);
}

/* ===== SLIDESHOW - HERO, BREATHING ROOM ===== */
.slideshow-container {
    width: 100%;
    max-width: 1600px;
    margin: 24px auto 32px;
    padding: 0 12px;
    position: relative;
    animation: scaleIn 0.6s ease-out forwards;
}

.slideshow-wrapper {
    position: relative;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    aspect-ratio: 16 / 9;
    max-height: 420px;
    background: var(--bg-darker);
}

.slideshow-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    width: 100%;
}

.slide {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    pointer-events: none;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(12px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.35s ease;
    opacity: 0;
}

.slideshow-container:hover .slideshow-nav {
    opacity: 1;
}

.slideshow-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.slideshow-nav.prev { left: 24px; }
.slideshow-nav.next { right: 24px; }

.slideshow-nav svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

.slideshow-dots {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    border-radius: 30px;
    z-index: 5;
}

.dot {
    cursor: pointer;
    height: 10px;
    width: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.dot.active {
    background-color: var(--primary-color);
    width: 32px;
    border-radius: 5px;
    box-shadow: 0 0 12px var(--primary-color);
}

.dot:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.85);
}

/* ===== CHANNEL LIST - MODERN ===== */
.channel-list-modern {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 10px 0;
}

.channel-item-modern {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 18px;
    border: 1px solid var(--border-color);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 18px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.channel-item-modern::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.channel-item-modern:hover::before {
    opacity: 1;
}

.channel-item-modern:hover {
    background: var(--bg-card-hover);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateX(8px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 0 30px rgba(14, 165, 233, 0.1);
}

.channel-icon-modern {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--accent-gradient);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s ease;
}

.channel-item-modern:hover .channel-icon-modern {
    transform: scale(1.05) rotate(-3deg);
}

.channel-icon-modern img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
}

.channel-icon-modern svg {
    width: 32px;
    height: 32px;
    color: white;
    opacity: 0.9;
}

.channel-name-modern {
    flex: 1;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
}

.channel-lock-modern {
    width: 40px;
    height: 40px;
    background: rgba(251, 191, 36, 0.15);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.channel-lock-modern svg {
    width: 20px;
    height: 20px;
    color: #fbbf24;
    stroke: #fbbf24;
}

/* ===== FORMS - MODERN GLASS ===== */
/* Login page: card katikati ya skrini (horizontal + vertical) */
/* Fomu katikati ya skrini (login) */
body.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.form-container {
    max-width: 480px;
    margin: 40px auto;
    padding: 40px 30px;
    background: var(--bg-card);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
    animation: scaleIn 0.5s ease-out forwards;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--bg-darker);
    border: 2px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--accent-gradient);
    background-size: 200% 200%;
    color: white;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary:hover {
    animation: gradientShift 1.5s ease infinite;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(14, 165, 233, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    animation: none;
    background: var(--text-muted);
}

/* Spinner kwenye kitufe (fomu ya malipo) */
.btn-primary .loader {
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: none;
    vertical-align: middle;
    margin-right: 8px;
    animation: rotation 1s linear infinite;
}
@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ujumbe wa hitilafu kwenye fomu - inafanana na theme */
.form-error {
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.4);
    color: #fca5a5;
    padding: 14px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

/* ===== SEARCH FORM ===== */
.channel-search-form {
    padding: 0 4px;
    margin-bottom: 20px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 18px;
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 16px 50px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 18px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

.clear-search {
    position: absolute;
    right: 14px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    z-index: 1;
}

.clear-search:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

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

.pagination-btn {
    padding: 12px 20px;
    background: var(--bg-card);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 48px;
    text-align: center;
}

.pagination-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.35);
}

/* ===== PROFILE STYLES ===== */
.profile-header {
    text-align: center;
    padding: 50px 20px;
    animation: fadeInUp 0.5s ease-out forwards;
}

.profile-phone {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subscription-badge {
    display: inline-block;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.subscription-badge.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}

.subscription-badge.inactive {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

.subscription-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    margin: 20px;
    border: 1px solid var(--border-color);
    animation: fadeInUp 0.6s ease-out forwards;
}

.subscription-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.subscription-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.subscription-days {
    text-align: center;
    margin: 30px 0;
}

.days-number {
    font-size: 64px;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    line-height: 1;
}

.days-label {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 600;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
}

.detail-value.active {
    color: #10b981;
}

.detail-value.inactive {
    color: #ef4444;
}

/* ===== DEVICE LIST (Simamia Vifaa) - inafanana na subscription-card ===== */
.device-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.device-item {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: fadeInUp 0.4s ease-out forwards;
}

.device-item .device-name {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 15px;
}

.device-item .device-meta {
    color: var(--text-secondary);
    font-size: 13px;
    margin-top: 4px;
}

.device-item .btn-remove {
    padding: 10px 18px;
    border-radius: 12px;
    border: none;
    background: #dc2626;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.device-item .btn-remove:hover {
    background: #b91c1c;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* Alert (success/error) - inafanana na kurasa zingine */
.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10b981;
    padding: 14px 18px;
    border-radius: 14px;
    margin: 20px;
    font-size: 14px;
    font-weight: 500;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    animation: fadeIn 0.5s ease-out forwards;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 18px;
}

.empty-state-inline {
    padding: 24px 20px;
    border-radius: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
}

.empty-state-inline p {
    font-size: 14px;
    margin: 0;
}

/* ===== LOADING SKELETON ===== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .top-header {
        padding: 10px 12px;
    }
    
    .logo {
        font-size: 16px;
        padding: 8px 14px;
        border-radius: 12px;
    }
    
    .logo-icon {
        width: 20px;
        height: 20px;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    
    .main-content {
        padding: 16px 12px;
    }
    
    .category-card {
        flex-direction: column;
        padding: 16px;
    }
    
    .category-thumbnail {
        width: 100%;
        height: 180px;
    }
    
    .slideshow-container {
        padding: 0 12px;
        margin-bottom: 24px;
    }
    
    .slideshow-wrapper {
        max-height: 220px;
        border-radius: 20px;
    }
    
    .slideshow-nav {
        width: 44px;
        height: 44px;
    }
    
    .slideshow-nav.prev { left: 12px; }
    .slideshow-nav.next { right: 12px; }
    
    .slideshow-dots {
        padding: 10px 18px;
        bottom: 16px;
    }
    
    .channel-card {
        width: 120px;
    }
    
    .channel-thumbnail {
        height: 80px;
    }
    
    .channel-info {
        padding: 10px 8px;
    }
    
    .channel-name {
        font-size: 12px;
    }
    
    .category-title {
        font-size: 18px;
    }
    
    .category-icon {
        width: 36px;
        height: 36px;
    }
    
    .category-icon svg {
        width: 18px;
        height: 18px;
    }
    
    .bottom-nav {
        padding: 10px 12px 18px;
    }
    
    .nav-item {
        padding: 8px 16px;
        font-size: 11px;
    }
    
    .nav-item svg {
        width: 22px;
        height: 22px;
    }
    
    .form-container {
        margin: 20px 12px;
        padding: 30px 20px;
    }
    
    .whatsapp-float {
        width: 54px;
        height: 54px;
        bottom: 95px;
        right: 16px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .slideshow-wrapper {
        max-height: 320px;
    }
    
    .channel-card {
        width: 130px;
    }
}

@media (min-width: 1200px) {
    .channel-card {
        width: 160px;
    }
    
    .channel-thumbnail {
        height: 120px;
    }
}

/* ===== SWIPE REFRESH / PULL-TO-REFRESH ===== */
#swipeRefreshIndicator {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%) translateY(-70px);
    z-index: 99999;
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    pointer-events: none;
}

#swipeRefreshIndicator .sr-content {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(20, 28, 45, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(14, 165, 233, 0.3);
    padding: 12px 22px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(14, 165, 233, 0.15);
    color: white;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

#swipeRefreshIndicator .sr-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: transform 0.2s ease;
}

#swipeRefreshIndicator .sr-spinner {
    display: none;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    animation: srSpin 0.8s linear infinite;
}

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

#swipeRefreshIndicator.sr-ready .sr-content {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 25px rgba(16, 185, 129, 0.2);
}

#swipeRefreshIndicator.sr-ready .sr-arrow,
#swipeRefreshIndicator.sr-ready .sr-text {
    color: var(--secondary-color);
}

#swipeRefreshIndicator.sr-refreshing .sr-content {
    border-color: rgba(14, 165, 233, 0.5);
    animation: srPulse 1.5s ease-in-out infinite;
}

@keyframes srPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(14, 165, 233, 0.15); }
    50% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 35px rgba(14, 165, 233, 0.3); }
}

#swipeRefreshIndicator.sr-done .sr-content {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 25px rgba(16, 185, 129, 0.25);
}

#swipeRefreshIndicator.sr-done .sr-text {
    color: var(--secondary-color);
}

.sr-text {
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

/* ===== CUSTOM DIALOG (replaces native confirm/alert) ===== */
.nhd-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nhd-overlay.nhd-visible {
    opacity: 1;
    visibility: visible;
}

.nhd-card {
    background: linear-gradient(135deg, #1a2236 0%, #0f1724 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 32px 28px;
    width: 100%;
    max-width: 360px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(14, 165, 233, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nhd-visible .nhd-card {
    transform: scale(1);
}

.nhd-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.nhd-icon svg {
    width: 32px;
    height: 32px;
}

.nhd-icon-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.nhd-icon-success {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.nhd-icon-question {
    background: rgba(14, 165, 233, 0.15);
    color: #0ea5e9;
}

.nhd-icon-info {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.nhd-title {
    font-size: 20px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
}

.nhd-text {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.nhd-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nhd-btn {
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.nhd-btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.nhd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(14, 165, 233, 0.4);
}

.nhd-btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nhd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
}

.nhd-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.nhd-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

/* ===== RECENT SEARCHES ===== */
#recentSearches {
    display: none;
    margin: 16px 0;
}

.rs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.rs-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.rs-clear {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.rs-clear:hover {
    background: rgba(14, 165, 233, 0.1);
}

.rs-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rs-item {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.rs-item:hover {
    border-color: var(--primary-color);
    background: var(--bg-card-hover);
}

.rs-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rs-link svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

.rs-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rs-remove:hover {
    color: #ef4444;
}

/* ===== OFFLINE OVERLAY ===== */
#offlineOverlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

#offlineOverlay.show {
    display: flex;
}

.offline-icon {
    width: 80px;
    height: 80px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    animation: offline-pulse 2s infinite;
}

@keyframes offline-pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.offline-title {
    font-size: 24px;
    font-weight: 800;
    color: white;
    margin-bottom: 12px;
}

.offline-text {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 32px;
}

/* ===== HORIZONTAL SECTIONS (Continue Watching & Favorites) ===== */
.horiz-section {
    margin: 24px 0;
}

.horiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    margin-bottom: 16px;
}

.horiz-title {
    font-size: 16px;
    font-weight: 800;
    color: white;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.horiz-scroll {
    display: flex;
    overflow-x: auto;
    gap: 16px;
    padding: 0 20px 10px 20px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.horiz-scroll::-webkit-scrollbar {
    display: none;
}

/* ===== CONTINUE WATCHING CARD ===== */
.cw-card {
    min-width: 170px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cw-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
}

.cw-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 0;
    margin-bottom: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.2);
    border-bottom: 1px solid var(--border-color);
}

.cw-thumbnail svg {
    width: 24px;
    height: 24px;
    opacity: 0.5;
}

.cw-name {
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cw-badge {
    position: absolute;
    top: 18px;
    right: 18px;
    background: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
}

/* ===== FAVORITE ICON ===== */
.fav-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
}

.fav-btn:active {
    transform: scale(0.8);
}

.fav-btn.active {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

.fav-btn svg {
    width: 18px;
    height: 18px;
    fill: rgba(255, 255, 255, 0.1);
    stroke: white;
    stroke-width: 2;
    transition: all 0.2s ease;
}

.fav-btn:hover svg {
    transform: scale(1.1);
    stroke-width: 2.5;
}

.fav-btn.active svg {
    fill: currentColor;
    stroke: currentColor;
}

/* Adjust modern cards for favorite btn */
.channel-item-modern {
    position: relative;
}

.light-theme .offline-title { color: #0f172a; }
.light-theme .offline-text { color: #475569; }
.light-theme #offlineOverlay { background: rgba(241, 245, 249, 0.95); }
.light-theme .horiz-title { color: #0f172a; }
.light-theme .cw-card { background: white; border-color: rgba(0,0,0,0.06); }
.light-theme .cw-name { color: #0f172a; }

/* ===== REFERRAL & MANAGE LINKS ===== */
.referral-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%) !important;
    border-color: rgba(16, 185, 129, 0.2) !important;
}

.referral-code-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(16, 185, 129, 0.4);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    margin: 15px 0;
}

.ref-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 5px;
}

.ref-code {
    font-size: 20px;
    font-weight: 800;
    color: #10b981;
    letter-spacing: 2px;
}

.manage-links {
    padding: 0 20px;
    margin-bottom: 20px;
}

.manage-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    text-decoration: none;
    color: white;
    transition: all 0.2s ease;
}

.manage-item:active {
    transform: scale(0.98);
}

.manage-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manage-info {
    flex: 1;
}

.manage-title {
    font-size: 14px;
    font-weight: 700;
}

.manage-subtitle {
    font-size: 11px;
    color: var(--text-secondary);
}

.light-theme .referral-code-box { background: rgba(0,0,0,0.03); }
.light-theme .manage-item { background: white; border-color: rgba(0,0,0,0.06); color: #0f172a; }

/* ===== PUSH NOTIFICATION PROMPT ===== */
#pushPrompt {
    display: none;
    margin: 20px;
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    border-radius: 20px;
    padding: 24px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

#pushPrompt .prompt-content {
    position: relative;
    z-index: 2;
}

#pushPrompt h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 8px;
}

#pushPrompt p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 20px;
    line-height: 1.5;
}

.prompt-btns {
    display: flex;
    gap: 10px;
}

.btn-white {
    background: white;
    color: #4f46e5;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.btn-secondary {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:active {
    transform: scale(0.98);
}
