/* CSS Variables */
:root {
    --background: hsl(230, 25%, 5%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(230, 20%, 8%);
    --card-foreground: hsl(210, 40%, 98%);
    --primary: hsl(190, 100%, 50%);
    --primary-foreground: hsl(230, 25%, 5%);
    --secondary: hsl(230, 15%, 15%);
    --secondary-foreground: hsl(210, 40%, 98%);
    --muted: hsl(230, 15%, 12%);
    --muted-foreground: hsl(220, 15%, 55%);
    --accent: hsl(270, 80%, 60%);
    --accent-foreground: hsl(210, 40%, 98%);
    --destructive: hsl(0, 84%, 60%);
    --border: hsl(230, 15%, 18%);
    --neon-cyan: hsl(190, 100%, 50%);
    --neon-purple: hsl(270, 80%, 60%);
    --surface-dark: hsl(230, 25%, 7%);
    --surface-darker: hsl(230, 25%, 4%);
    --radius: 0.75rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(ellipse at top, hsla(190, 100%, 50%, 0.03) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, hsla(270, 80%, 60%, 0.03) 0%, transparent 50%);
}

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

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--surface-darker);
}

::-webkit-scrollbar-thumb {
    background: hsla(190, 100%, 50%, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsla(190, 100%, 50%, 0.7);
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-cyan {
    box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.4), 0 0 40px hsla(190, 100%, 50%, 0.2);
}

.glass {
    background: hsla(230, 20%, 8%, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
}

.glass-dark {
    background: hsla(230, 25%, 5%, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid hsla(230, 15%, 18%, 0.3);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: hsla(230, 25%, 5%, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid hsla(230, 15%, 18%, 0.3);
}

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

@media (min-width: 768px) {
    .nav-container {
        height: 80px;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background);
    box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.4);
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .logo-text {
        font-size: 1.5rem;
    }
}

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    transition: color 0.3s;
}

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

.nav-search {
    display: none;
}

@media (min-width: 768px) {
    .nav-search {
        display: block;
    }
}

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

.search-input {
    width: 250px;
    padding: 0.625rem 2.5rem 0.625rem 1rem;
    background: hsla(230, 15%, 15%, 0.5);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
    border-radius: 8px;
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s;
}

.search-input::placeholder {
    color: var(--muted-foreground);
}

.search-input:focus {
    border-color: hsla(190, 100%, 50%, 0.5);
    background: var(--secondary);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    padding: 0.25rem;
    color: var(--muted-foreground);
    transition: color 0.3s;
}

.search-btn:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: block;
    padding: 0.5rem;
    color: var(--muted-foreground);
    transition: color 0.3s;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    display: none;
    padding: 1rem;
    border-top: 1px solid hsla(230, 15%, 18%, 0.5);
}

.mobile-menu.active {
    display: block;
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
    }
}

.mobile-search-form {
    position: relative;
    margin-bottom: 1rem;
}

.mobile-search-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    background: hsla(230, 15%, 15%, 0.5);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
    border-radius: 8px;
    color: var(--foreground);
    font-size: 0.875rem;
    outline: none;
}

.mobile-search-input::placeholder {
    color: var(--muted-foreground);
}

.mobile-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem;
    color: var(--muted-foreground);
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: var(--muted-foreground);
    transition: all 0.3s;
}

.mobile-link:hover {
    background: hsla(230, 15%, 15%, 0.5);
    color: var(--primary);
}

/* Main Content */
#app {
    flex: 1;
    padding-top: 64px;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    #app {
        padding-top: 0;
    }
}

/* Hero Carousel */
.hero {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 320px;
    overflow: hidden;
}

@media (min-width: 480px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }
}

@media (min-width: 768px) {
    .hero {
        height: 75vh;
        min-height: 500px;
    }
}

@media (min-width: 1024px) {
    .hero {
        height: 80vh;
    }
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background), hsla(230, 25%, 5%, 0.6) 50%, transparent);
}

.hero-overlay-left {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, hsla(230, 25%, 5%, 0.8), transparent);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5rem;
}

@media (min-width: 768px) {
    .hero-content {
        padding-bottom: 8rem;
    }
}

.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

.hero-info {
    max-width: 600px;
    animation: fadeIn 0.5s ease;
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-series {
    background: hsla(190, 100%, 50%, 0.2);
    color: var(--primary);
    border: 1px solid hsla(190, 100%, 50%, 0.3);
}

.badge-movie {
    background: hsla(270, 80%, 60%, 0.2);
    color: var(--accent);
    border: 1px solid hsla(270, 80%, 60%, 0.3);
}

.hero-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

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

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.3);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px hsla(190, 100%, 50%, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--primary);
    border: 2px solid hsla(190, 100%, 50%, 0.5);
}

.btn-ghost:hover {
    background: hsla(190, 100%, 50%, 0.1);
    border-color: var(--primary);
}

.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsla(230, 20%, 8%, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
    color: var(--foreground);
    transition: all 0.3s;
    opacity: 0;
}

@media (min-width: 768px) {
    .hero-nav {
        opacity: 1;
    }
}

.hero-nav:hover {
    background: hsla(190, 100%, 50%, 0.2);
    color: var(--primary);
}

.hero-nav.prev {
    left: 1rem;
}

.hero-nav.next {
    right: 1rem;
}

.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.hero-indicator {
    height: 8px;
    border-radius: 4px;
    transition: all 0.3s;
    background: hsla(210, 40%, 98%, 0.3);
    width: 8px;
}

.hero-indicator:hover {
    background: hsla(210, 40%, 98%, 0.5);
}

.hero-indicator.active {
    width: 32px;
    background: var(--primary);
    box-shadow: 0 0 10px hsla(190, 100%, 50%, 0.5);
}

/* Search Bar on Home */
.home-search {
    position: relative;
    z-index: 20;
    padding: 0 1rem;
    margin-top: -2rem;
    margin-bottom: 2rem;
}

.home-search-form {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.home-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    transition: color 0.3s;
}

.home-search-input {
    width: 100%;
    padding: 1.25rem 1rem 1.25rem 3rem;
    background: hsla(230, 20%, 8%, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
    border-radius: 16px;
    color: var(--foreground);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.home-search-input::placeholder {
    color: var(--muted-foreground);
}

.home-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(190, 100%, 50%, 0.2);
}

.home-search-input:focus + .home-search-icon {
    color: var(--primary);
}

/* Sections */
.section {
    padding: 2rem 1rem;
    max-width: 1280px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.section-icon {
    color: var(--primary);
}

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

/* Anime Grid */
.anime-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .anime-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .anime-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .anime-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1280px) {
    .anime-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Anime Card */
.anime-card {
    display: block;
    transition: transform 0.3s ease;
}

.anime-card:hover {
    transform: translateY(-8px);
}

.anime-card:hover .card-inner {
    box-shadow: 0 20px 40px hsla(190, 100%, 50%, 0.15);
}

.card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid hsla(230, 15%, 18%, 0.3);
    transition: box-shadow 0.3s ease;
}

.card-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.625rem;
    font-weight: 600;
}

.card-image-container {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.anime-card:hover .card-image {
    transform: scale(1.1);
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background), hsla(230, 25%, 5%, 0.5) 50%, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.anime-card:hover .card-overlay {
    opacity: 1;
}

.card-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: hsla(190, 100%, 50%, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.5);
    transform: scale(0);
    transition: transform 0.3s ease;
}

.anime-card:hover .card-play-btn {
    transform: scale(1);
}

.card-content {
    padding: 1rem;
}

.card-title {
    font-weight: 600;
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

.anime-card:hover .card-title {
    color: var(--primary);
}

.card-meta {
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Loading Spinner - Enhanced */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    gap: 1.5rem;
}

.loading-container.fullscreen {
    min-height: 70vh;
    padding-top: 80px;
}

.spinner {
    position: relative;
    width: 64px;
    height: 64px;
}

.spinner::before,
.spinner::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.spinner::before {
    border: 4px solid hsla(190, 100%, 50%, 0.15);
}

.spinner::after {
    border: 4px solid transparent;
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.3), 0 0 40px hsla(190, 100%, 50%, 0.1);
    }
    50% {
        box-shadow: 0 0 40px hsla(190, 100%, 50%, 0.5), 0 0 80px hsla(190, 100%, 50%, 0.2);
    }
}

.loading-logo {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--background);
    animation: pulse-glow 2s ease-in-out infinite;
}

.loading-text {
    color: var(--muted-foreground);
    font-size: 1rem;
    text-align: center;
    max-width: 300px;
    line-height: 1.5;
}

.loading-text-small {
    font-size: 0.75rem;
    color: hsla(220, 15%, 45%, 1);
    margin-top: -0.5rem;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, 
        hsla(230, 15%, 12%, 1) 0%, 
        hsla(230, 15%, 18%, 1) 50%, 
        hsla(230, 15%, 12%, 1) 100%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

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

.skeleton-card {
    aspect-ratio: 2/3;
    border-radius: 12px;
}

.skeleton-text {
    height: 1rem;
    margin-top: 0.75rem;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
    margin-top: 0.5rem;
}

/* Error State */
.error-container {
    text-align: center;
    padding: 4rem 1rem;
}

.error-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--destructive);
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

/* Anime Detail Page */
.anime-hero {
    position: relative;
    padding-top: 64px;
}

@media (min-width: 768px) {
    .anime-hero {
        padding-top: 80px;
    }
}

.anime-backdrop {
    position: absolute;
    inset: 0;
    height: 500px;
    overflow: hidden;
}

.anime-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: blur(4px);
}

.anime-backdrop-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--background), hsla(230, 25%, 5%, 0.8) 50%, hsla(230, 25%, 5%, 0.5));
}

.anime-content {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
    transition: color 0.3s;
}

.back-btn:hover {
    color: var(--primary);
}

.anime-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .anime-details {
        flex-direction: row;
    }
}

.anime-poster {
    flex-shrink: 0;
}

.anime-poster img {
    width: 256px;
    border-radius: 12px;
    box-shadow: 0 10px 40px hsla(230, 25%, 0%, 0.5);
    border: 1px solid hsla(230, 15%, 18%, 0.3);
}

@media (min-width: 768px) {
    .anime-poster img {
        width: 320px;
    }
}

.anime-info {
    flex: 1;
}

.anime-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .anime-title {
        font-size: 2.25rem;
    }
}

.anime-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.anime-description {
    color: var(--muted-foreground);
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* Episodes Section */
.episodes-section {
    flex: 1;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.episodes-header {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.season-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.season-btn {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    background: hsla(230, 15%, 15%, 0.5);
    color: var(--muted-foreground);
    transition: all 0.3s;
}

.season-btn:hover {
    background: var(--secondary);
    color: var(--foreground);
}

.season-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.4);
}

.episodes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 640px) {
    .episodes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .episodes-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .episodes-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.episode-card {
    display: block;
    transition: transform 0.3s ease;
}

.episode-card:hover {
    transform: translateY(-4px);
}

.episode-inner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid hsla(230, 15%, 18%, 0.3);
}

.episode-image-container {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.episode-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.episode-card:hover .episode-image {
    transform: scale(1.1);
}

.episode-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, hsla(230, 25%, 5%, 0.9), transparent);
}

.episode-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.episode-card:hover .episode-play-btn {
    opacity: 1;
}

.episode-play-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: hsla(190, 100%, 50%, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-foreground);
    box-shadow: 0 0 20px hsla(190, 100%, 50%, 0.5);
}

.episode-badges {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    display: flex;
    gap: 0.25rem;
}

.episode-badge {
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 4px;
}

.episode-badge-season {
    background: hsla(190, 100%, 50%, 0.8);
    color: var(--primary-foreground);
}

.episode-badge-ep {
    background: hsla(270, 80%, 60%, 0.8);
    color: var(--accent-foreground);
}

.episode-content {
    padding: 0.75rem;
}

.episode-title {
    font-weight: 500;
    font-size: 0.875rem;
}

.episode-subtitle {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.load-more-btn {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

/* Episode Player Page */
.player-page {
    padding-top: 80px;
    padding-bottom: 2rem;
}

.player-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.player-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .player-title {
        font-size: 1.875rem;
    }
}

.video-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    width: 100%;
    max-width: 1024px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card);
    border: 1px solid hsla(230, 15%, 18%, 0.3);
    box-shadow: 0 10px 40px hsla(230, 25%, 0%, 0.5);
}

.video-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.player-controls {
    max-width: 1024px;
    margin: 1rem auto 0;
}

.episode-nav {
    background: hsla(230, 20%, 8%, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
    border-radius: 12px;
    padding: 1rem;
}

.episode-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn-prev {
    background: hsla(230, 15%, 15%, 0.5);
    color: var(--foreground);
}

.nav-btn-prev:not(:disabled):hover {
    background: hsla(190, 100%, 50%, 0.2);
    color: var(--primary);
}

.nav-btn-next {
    background: var(--primary);
    color: var(--primary-foreground);
}

.nav-btn-next:not(:disabled):hover {
    background: hsla(190, 100%, 50%, 0.9);
}

.episodes-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    background: hsla(190, 100%, 50%, 0.2);
    color: var(--primary);
    transition: all 0.3s;
}

.episodes-toggle:hover {
    background: hsla(190, 100%, 50%, 0.3);
}

.episodes-counter {
    font-size: 0.75rem;
    background: hsla(190, 100%, 50%, 0.3);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.episodes-dropdown {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid hsla(230, 15%, 18%, 0.3);
    display: none;
}

.episodes-dropdown.active {
    display: block;
}

.ep-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    max-height: 192px;
    overflow-y: auto;
}

@media (min-width: 640px) {
    .ep-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 768px) {
    .ep-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 1024px) {
    .ep-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

.ep-btn {
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    background: hsla(230, 15%, 15%, 0.5);
    color: var(--muted-foreground);
    transition: all 0.3s;
}

.ep-btn:hover {
    background: hsla(190, 100%, 50%, 0.2);
    color: var(--primary);
}

.ep-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 10px hsla(190, 100%, 50%, 0.4);
}

.server-section {
    margin-top: 1rem;
    background: hsla(230, 20%, 8%, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid hsla(230, 15%, 18%, 0.5);
    border-radius: 12px;
    padding: 1rem;
}

.server-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.server-header span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
}

.server-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.server-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    background: hsla(230, 15%, 15%, 0.5);
    color: var(--muted-foreground);
    transition: all 0.3s;
}

.server-btn:hover {
    background: var(--secondary);
    color: var(--foreground);
}

.server-btn.active {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 0 10px hsla(190, 100%, 50%, 0.4);
}

.server-badge {
    font-size: 0.625rem;
    background: hsla(270, 80%, 60%, 0.3);
    color: var(--accent);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Search Results Page */
.search-page {
    padding-top: 96px;
    padding-bottom: 2rem;
}

.search-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-header {
    margin-bottom: 2rem;
}

.search-header-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.search-header-icon {
    color: var(--primary);
}

.search-header-title {
    font-size: 1.5rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .search-header-title {
        font-size: 1.875rem;
    }
}

.search-query {
    color: var(--muted-foreground);
}

.no-results {
    text-align: center;
    padding: 5rem 1rem;
}

.no-results-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: hsla(230, 15%, 12%, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
}

.no-results-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.no-results-text {
    color: var(--muted-foreground);
}

/* Footer */
.footer {
    margin-top: auto;
    border-top: 1px solid hsla(230, 15%, 18%, 0.3);
    background: var(--surface-darker);
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr;
    }
}

.footer-brand .logo {
    margin-bottom: 1rem;
}

.footer-desc {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    max-width: 400px;
}

.footer-links h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links a {
    display: block;
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid hsla(230, 15%, 18%, 0.3);
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
    }
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 0.5s ease;
}
