:root {
    /* Dark Theme (Default) */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --accent: #e50914;
    --accent-hover: #f40612;
    --border: #333;
    --shadow: rgba(0, 0, 0, 0.8);
    --gradient-start: #0a0a0a;
    --gradient-end: #1a1a1a;
}

[data-theme="midnight"] {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a3a;
    --bg-tertiary: #2a2a4a;
    --accent: #4a90e2;
    --accent-hover: #5ba0f2;
    --gradient-start: #0f0f23;
    --gradient-end: #2a2a4a;
}

[data-theme="cosmic"] {
    --bg-primary: #0a0a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #1a1a4e;
    --accent: #9d4edd;
    --accent-hover: #a663cc;
    --gradient-start: #0a0a2e;
    --gradient-end: #2a2a5e;
}

[data-theme="neon"] {
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #1a1a1a;
    --accent: #00ffff;
    --accent-hover: #00e5e5;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --gradient-start: #000000;
    --gradient-end: #0a0a0a;
}

[data-theme="jackpot"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #8A126C;
    --bg-tertiary: #BD731A;
    --accent: #BD731A;
    --accent-hover: #8A126C;
    --gradient-start: #0a0a0a;
    --gradient-end: #8A126C;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, var(--bg-primary) 0%, transparent 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { filter: drop-shadow(0 0 5px var(--accent)); }
    to { filter: drop-shadow(0 0 20px var(--accent-hover)); }
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.search-container {
    position: relative;
}

.search-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 25px;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    color: var(--text-primary);
    width: 200px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    width: 250px;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.theme-selector {
    position: relative;
}

.theme-icon {
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.theme-icon:hover {
    color: var(--accent);
}

.theme-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    display: none;
    min-width: 120px;
    box-shadow: 0 4px 20px var(--shadow);
}

.theme-selector:hover .theme-dropdown {
    display: block;
}

.theme-option {
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.theme-option:hover, .theme-option.active {
    background: var(--accent);
    color: white;
}

.user-profile img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile img:hover {
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--accent);
}

.main-content {
    margin-top: 80px;
    min-height: 100vh;
}

.hero-section {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    padding: 0 2rem;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--bg-primary) 0%, transparent 50%, transparent 100%);
}

.hero-content {
    max-width: 600px;
    z-index: 1;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: slideInLeft 1s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    animation: slideInLeft 1s ease-out 0.4s both;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.3);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.content-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

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

.section-controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.content-row {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    scroll-behavior: smooth;
}

.content-row::-webkit-scrollbar {
    height: 0;
}

.content-card {
    flex: 0 0 auto;
    width: 200px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.content-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px var(--shadow);
}

.content-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, var(--bg-primary) 0%, transparent 100%);
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.content-card:hover .content-overlay {
    transform: translateY(0);
}

.content-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.content-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.search-results {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 2000;
    display: none;
    overflow-y: auto;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.video-container {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
}

#videoPlayer {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.video-controls {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.video-interface {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--accent);
}

.video-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-bottom: 1px solid var(--accent);
    position: relative;
}

.video-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    flex: 1;
    margin: 0 3rem;
    text-shadow: 0 0 20px var(--accent);
    letter-spacing: 0.5px;
}

.back-btn {
    margin-right: 1rem;
}

.close-btn {
    margin-left: 1rem;
}

#videoPlayer {
    width: 100%;
    height: calc(100% - 120px);
    border: none;
    background: #000;
}

.episode-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-top: 1px solid var(--accent);
    flex-wrap: wrap;
}

.season-select, .episode-select {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--accent);
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 150px;
}

.season-select:focus, .episode-select:focus {
    outline: none;
    border-color: var(--accent-hover);
    box-shadow: 0 0 20px rgba(var(--accent), 0.5);
}

.load-episode-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.load-episode-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(var(--accent), 0.3);
}

.footer {
    background: var(--bg-secondary);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

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

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .content-card {
        width: 150px;
    }
    
    .search-input {
        width: 150px;
    }
    
    .search-input:focus {
        width: 180px;
    }
    
    /* Mobile responsive for video interface */
    .episode-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .video-header {
        padding: 0.75rem;
    }
    
    .video-title {
        font-size: 1.1rem;
        margin: 0 2rem;
    }
    
    .episode-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .season-select, .episode-select {
        min-width: 100%;
    }
}
