:root {
    /* Color Palette */
    --bg-main: #000000;
    --bg-secondary: #0a0a0a;
    --accent-color: #00ff00;
    /* Green */
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --glass-bg: rgba(0, 20, 0, 0.75);
    --glass-border: rgba(0, 255, 0, 0.2);

    /* Gradients */
    --gradient-hero: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(15, 16, 20, 1) 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);

    /* Spacing */
    --nav-height: 60px;
    --bottom-nav-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    padding-bottom: var(--bottom-nav-height);
    /* Space for bottom nav */
}

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

#app-root {
    padding-top: var(--nav-height);
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.grid {
    display: grid;
}

.text-center {
    text-align: center;
}

/* Glassmorphism Classes */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* --- COMPONENTS --- */

/* Navbar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 100;
    padding: 0 20px;
    background: linear-gradient(90deg, #023d02 0%, #011d01 50%, #001200 100%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: background 0.3s ease;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--accent-color);
    letter-spacing: -1px;
}

/* Category Cards (REMOVED - Replaced by Slider) */
/* .category-hero { display: none; } */

/* NEW: Hero Slider */
.hero-slider-container {
    width: 100%;
    height: 45vh;
    /* Takes up decent screen space */
    max-height: 500px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    /* Nav sits on top */
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    background-size: cover;
    background-position: center;
}

.hero-slide.active {
    opacity: 1;
}

.slider-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, var(--bg-main) 5%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.slide-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease 0.3s;
}

.slide-content p {
    font-size: 0.9rem;
    color: #eee;
    margin-bottom: 15px;
    max-width: 80%;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s ease 0.4s;
}

.hero-slide.active h2,
.hero-slide.active p {
    transform: translateY(0);
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--accent-color);
    width: 20px;
    border-radius: 4px;
}


/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 10px;
}

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

.see-all {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-weight: 500;
    cursor: pointer;
}

/* Horizontal Scroll Containers */
.media-scroller {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 10px 20px;
    scrollbar-width: none;
    /* Firefox */
}

.media-scroller::-webkit-scrollbar {
    display: none;
    /* Chrome */
}

.media-card {
    min-width: 140px;
    width: 140px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.poster {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    background-color: #222;
    border-radius: 8px;
}

.media-info {
    padding-top: 8px;
}

.media-title {
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.media-cat {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

/* Price / Free badges on cards */
.card-price-badge {
    background: #111;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 3px;
    border: 1px solid #333;
}

.card-free-badge {
    background: #fff;
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 6px;
    border-radius: 6px;
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--bottom-nav-height);
    background: #0f1014;
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 300;
    /* Ensure it stays on top */
    padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 8px 16px;
    cursor: pointer;
}

.nav-item.active {
    color: var(--accent-color);
}

.nav-item ion-icon {
    font-size: 1.4rem;
}

/* Modals / Pages */
.full-page-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 200;
    overflow-y: auto;
    padding-bottom: 80px;
    /* Space for Nav */
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 210;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* 18+ Warning */
.age-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gate-content {
    background: var(--bg-secondary);
    border: 1px solid var(--accent-color);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
}

.gate-btns {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-secondary {
    background: #333;
    color: white;
}

/* Video Player */
.video-container {
    width: 100%;
    background: #000;
    position: sticky;
    top: 0;
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 150;
    padding: 20px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.search-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.search-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    background: #222;
    border: none;
    padding: 15px;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    padding-bottom: 20px;
}

.search-close {
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
}

/* Payment popup slide animation */
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}