/* ====== BASE STYLES ====== */
:root {
    /* Primary Colors */
    --primary: #0f0f23;
    --primary-dark: #0a0a15;
    --primary-light: #1a1a2e;
    
    /* Accent Colors */
    --accent: #00c6ff;
    --accent-gradient: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    --accent-hover: #0099ff;
    
    /* Secondary Colors */
    --secondary: #ff3366;
    --secondary-gradient: linear-gradient(135deg, #ff3366 0%, #ff758c 100%);
    
    /* Background Colors */
    --bg-dark: #0a0a15;
    --bg-card: #121228;
    --bg-card-light: #1a1a36;
    --bg-hover: #1e1e3a;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #b0b0d0;
    --text-muted: #8a8ab3;
    
    /* Border & Shadow */
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.2);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 100%);
    --gradient-card: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(18, 18, 40, 0.9) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(0, 198, 255, 0.1) 0%, rgba(0, 114, 255, 0.05) 100%);
    
    /* Effects */
    --glow: 0 0 30px rgba(0, 198, 255, 0.3);
    --glow-secondary: 0 0 30px rgba(255, 51, 102, 0.3);
    
    /* Spacing */
    --section-spacing: 60px;
    --card-spacing: 20px;
    
    /* Safe Area */
    --safe-area-inset-top: env(safe-area-inset-top, 0px);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-inset-left: env(safe-area-inset-left, 0px);
    --safe-area-inset-right: env(safe-area-inset-right, 0px);
}

/* ====== LIGHT MODE ====== */
body.light-mode {
    /* Primary Colors - White theme */
    --primary: #ffffff;
    --primary-dark: #f5f7ff;
    --primary-light: #f0f4ff;
    
    /* Background Colors */
    --bg-dark: #ffffff;
    --bg-card: #ffffff;
    --bg-card-light: #f8faff;
    --bg-hover: #eef2ff;
    
    /* Text Colors */
    --text-primary: #121228;
    --text-secondary: #4a4a6e;
    --text-muted: #6b6b8a;
    
    /* Border & Shadow */
    --border-color: rgba(18, 18, 40, 0.1);
    --border-light: rgba(18, 18, 40, 0.05);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 5px 15px rgba(0, 0, 0, 0.05);
    
    /* Gradients - Light versions */
    --gradient-primary: linear-gradient(135deg, #ffffff 0%, #f5f7ff 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    --gradient-hero: linear-gradient(135deg, rgba(0, 198, 255, 0.05) 0%, rgba(0, 114, 255, 0.02) 100%);
    
    /* Effects - Subtle versions */
    --glow: 0 0 30px rgba(0, 198, 255, 0.1);
    --glow-secondary: 0 0 30px rgba(255, 51, 102, 0.1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* ====== PREMIUM HEADER ====== */
.premium-header {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

body.light-mode .premium-header {
    background: var(--gradient-card);
    border-bottom: 1px solid rgba(18, 18, 40, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
}

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

.brand-logo i {
    color: var(--accent);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 198, 255, 0.5));
}

.logo-pro {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 900;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: nowrap;
    width: auto;
}

.nav-features {
    display: flex;
    gap: 0.8rem;
}

.nav-feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    white-space: nowrap;
}

body.light-mode .nav-feature {
    background: rgba(18, 18, 40, 0.05);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.nav-feature i {
    color: var(--accent);
    font-size: 0.8rem;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.theme-toggle-btn i {
    color: var(--accent);
    font-size: 0.9rem;
}

/* ====== MAIN CONTENT ====== */
.main-content {
    padding-top: 70px;
    padding-bottom: var(--section-spacing);
}

/* ====== PREMIUM HERO SECTION ====== */
.premium-hero {
    position: relative;
    background: var(--gradient-primary);
    padding: 2rem 0 4rem;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

body.light-mode .premium-hero {
    background: var(--gradient-primary);
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--gradient-hero);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    box-shadow: var(--glow);
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.1;
    padding: 0 0.5rem;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 0.5rem;
    line-height: 1.4;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 0 0.5rem;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.hero-feature i {
    color: var(--accent);
    font-size: 1rem;
}

/* ====== SEARCH OVERLAY ====== */
.search-overlay {
    position: relative;
    z-index: 3;
    max-width: 900px;
    margin: -50px auto 0;
    padding: 0 1rem;
}

.search-container-premium {
    background: var(--gradient-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    z-index: 5;
}

body.light-mode .search-container-premium {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.search-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.search-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.search-title i {
    color: var(--accent);
}

.search-subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.4;
}

.search-box-premium {
    position: relative;
    z-index: 6;
}

.search-wrapper {
    position: relative;
}

.search-input-premium {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    background: var(--bg-card-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 7;
}

.search-input-premium:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.1);
}

.search-icon-premium {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 1.1rem;
    pointer-events: none;
    z-index: 8;
}

.search-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.6rem;
    padding-left: 0.5rem;
}

.search-hint i {
    color: var(--accent);
    font-size: 0.9rem;
}

/* ====== SEARCH RESULTS ====== */
.search-results-premium {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow-lg);
}

body.light-mode .search-results-premium {
    background: var(--bg-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 70px;
}

.search-result-item:hover {
    background: var(--bg-hover);
    transform: translateX(3px);
}

.result-poster {
    width: 50px;
    height: 75px;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 1rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

/* ====== CONTENT SECTION ====== */
.content-section {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
}

.container-fluid {
    width: 100%;
    padding: 0;
}

/* ====== SELECTED MEDIA CARD ====== */
.selected-media-card {
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: none;
    animation: slideInUp 0.5s ease;
    position: relative;
    z-index: 2;
}

body.light-mode .selected-media-card {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.selected-media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.selected-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-gradient);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.selected-actions {
    display: flex;
    gap: 0.8rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.8rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.selected-media-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: flex-start;
}

.selected-poster-container {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
}

.selected-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.selected-poster-container:hover .poster-overlay {
    opacity: 1;
}

.poster-overlay i {
    color: white;
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

.selected-details {
    flex: 1;
    width: 100%;
}

.media-meta {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.media-type, .media-year, .media-rating, .media-duration {
    padding: 0.3rem 0.6rem;
    background: var(--bg-card-light);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.media-rating {
    background: var(--secondary-gradient);
    color: white;
}

.selected-title {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.selected-overview {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.selected-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.info-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.info-label i {
    color: var(--accent);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
    word-break: break-word;
}

.stream-ready {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-gradient);
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--glow);
    margin-top: 1rem;
}

/* ====== SELECTION CONTAINER ====== */
.selection-container {
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: none;
    position: relative;
    z-index: 2;
}

body.light-mode .selection-container {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.selection-container.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.selection-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.selection-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.selection-title i {
    color: var(--accent);
}

.selection-stats {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.stat-item i {
    color: var(--accent);
}

.selection-grid-premium {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.selection-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.selection-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
}

.selection-label i {
    color: var(--accent);
}

.custom-select-wrapper {
    position: relative;
}

.custom-select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-card-light);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

.custom-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 198, 255, 0.1);
}

.select-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.9rem;
}

/* ====== LOADING CONTAINER ====== */
.loading-container {
    display: none;
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    z-index: 2;
}

body.light-mode .loading-container {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.loading-container.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.loading-content {
    max-width: 350px;
    margin: 0 auto;
}

.loading-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: spin 1s linear infinite;
}

.spinner-ring:nth-child(2) {
    border-top-color: var(--secondary);
    animation-delay: 0.2s;
}

.spinner-ring:nth-child(3) {
    border-top-color: var(--accent);
    animation-delay: 0.4s;
    opacity: 0.7;
}

.spinner-ring:nth-child(4) {
    border-top-color: var(--secondary);
    animation-delay: 0.6s;
    opacity: 0.5;
}

.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(8px);
    opacity: 0.3;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.loading-text p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ====== ACTION SECTION ====== */
.action-section {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.action-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.action-btn-primary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--accent-gradient);
    color: white;
    border: none;
    padding: 1.2rem 1.5rem;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    width: 100%;
}

.action-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-icon {
    font-size: 1.5rem;
}

.btn-content {
    flex: 1;
    text-align: left;
    padding: 0 1rem;
}

.btn-title {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.btn-subtitle {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 500;
}

.btn-arrow {
    font-size: 1.1rem;
}

.secondary-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
}

.action-btn-secondary {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.8rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-mode .action-btn-secondary {
    background: var(--bg-card-light);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.action-btn-secondary:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ====== PLAYER CONTAINER ====== */
.player-container-premium {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    display: none;
    position: relative;
    z-index: 2;
}

body.light-mode .player-container-premium {
    background: var(--bg-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.player-container-premium.active {
    display: block;
    animation: slideInUp 0.5s ease;
}

.player-header {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding: 1.2rem 1rem;
    background: var(--bg-card-light);
    border-bottom: 1px solid var(--border-color);
}

body.light-mode .player-header {
    background: var(--bg-card-light);
    border-bottom: 1px solid rgba(18, 18, 40, 0.1);
}

.player-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.player-title i {
    color: var(--accent);
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.quality-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-gradient);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.player-wrapper-premium {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
}

.player-frame-premium {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.player-info {
    padding: 0.8rem 1rem;
    background: var(--bg-card-light);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

body.light-mode .player-info {
    background: var(--bg-card-light);
    border-top: 1px solid rgba(18, 18, 40, 0.1);
}

.player-info .info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.8rem;
    justify-content: center;
}

.player-info i {
    color: var(--accent);
    font-size: 0.9rem;
}

/* ====== SERVER SECTION ====== */
.server-section {
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: none;
    position: relative;
    z-index: 2;
}

body.light-mode .server-section {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.server-section.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.section-header {
    margin-bottom: 1.5rem;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.section-title i {
    color: var(--accent);
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
}

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

.server-card {
    background: var(--bg-card-light);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.2rem;
    display: flex;
    gap: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: flex-start;
}

body.light-mode .server-card {
    background: var(--bg-card-light);
    border: 2px solid rgba(18, 18, 40, 0.1);
}

.server-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.server-card.active {
    border-color: var(--accent);
    background: linear-gradient(135deg, var(--bg-card-light) 0%, rgba(0, 198, 255, 0.05) 100%);
    box-shadow: var(--glow);
}

.server-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gradient);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.server-info {
    flex: 1;
    min-width: 0;
}

.server-name {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.server-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.server-stats {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.server-stats .stat {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
}

.server-stats .stat i {
    color: var(--accent);
    font-size: 0.8rem;
}

.server-status {
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 198, 255, 0.1);
    color: var(--accent);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.active {
    background: var(--accent-gradient);
    color: white;
}

/* ====== TRENDING SECTION ====== */
.trending-section {
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.trending-section .section-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.header-content {
    flex: 1;
}

.header-controls {
    display: flex;
    gap: 0.8rem;
    align-items: center;
    justify-content: flex-start;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

body.light-mode .refresh-btn {
    background: var(--bg-card-light);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

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

.view-toggle {
    display: flex;
    gap: 0.4rem;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.4rem;
}

body.light-mode .view-toggle {
    background: var(--bg-card-light);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.view-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.view-btn.active {
    background: var(--accent-gradient);
    color: white;
}

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

.loading-trending {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

.loading-spinner-small {
    width: 30px;
    height: 30px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 0.8rem;
}

body.light-mode .loading-spinner-small {
    border-color: rgba(18, 18, 40, 0.1);
}

.trending-item {
    background: var(--bg-card-light);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

body.light-mode .trending-item {
    background: var(--bg-card-light);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.trending-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.trending-poster {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.trending-info {
    padding: 0.8rem;
}

.trending-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ====== FEATURES SECTION ====== */
.features-section-premium {
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.features-grid-premium {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.feature-card-premium {
    background: var(--gradient-card);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

body.light-mode .feature-card-premium {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.feature-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.feature-icon-container {
    position: relative;
    width: 60px;
    height: 60px;
    margin: 0 auto 1.2rem;
}

.feature-icon-container i {
    position: relative;
    z-index: 2;
    font-size: 2rem;
    color: var(--accent);
}

.icon-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.3;
}

.feature-title {
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.feature-desc {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.2rem;
    font-size: 0.9rem;
}

.feature-stats {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.feature-stats span {
    background: var(--bg-card-light);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

body.light-mode .feature-stats span {
    background: var(--bg-card-light);
}

/* ====== PREMIUM FOOTER ====== */
.premium-footer {
    background: var(--gradient-primary);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

body.light-mode .premium-footer {
    background: var(--gradient-primary);
    border-top: 1px solid rgba(18, 18, 40, 0.1);
}

.footer-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

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

.footer-logo i {
    color: var(--accent);
    font-size: 1.3rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.social-link {
    width: 36px;
    height: 36px;
    background: var(--bg-card-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

body.light-mode .social-link {
    background: var(--bg-card-light);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.social-link:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

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

body.light-mode .footer-bottom {
    border-top: 1px solid rgba(18, 18, 40, 0.1);
}

.made-with-love {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
    flex-wrap: wrap;
}

.made-with-love i {
    color: var(--secondary);
    animation: heartbeat 1.5s ease-in-out infinite;
    font-size: 0.9rem;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-copyright p {
    margin-bottom: 0.5rem;
}

/* ====== NOTIFICATION ====== */
.notification-premium {
    position: fixed;
    bottom: max(1rem, var(--safe-area-inset-bottom));
    right: max(1rem, var(--safe-area-inset-right));
    background: var(--gradient-card);
    border-radius: 12px;
    padding: 1rem;
    z-index: 10000;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-width: 280px;
    display: none;
}

body.light-mode .notification-premium {
    background: var(--gradient-card);
    border: 1px solid rgba(18, 18, 40, 0.1);
}

.notification-premium.show {
    transform: translateX(0);
    opacity: 1;
    display: block;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.notification-content i {
    color: var(--accent);
    font-size: 1.5rem;
}

.notification-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.notification-text span:first-child {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.notification-sub {
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

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

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ====== RESPONSIVE DESIGN ====== */
@media (min-width: 375px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .trending-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .selected-poster-container {
        max-width: 280px;
    }
}

@media (min-width: 480px) {
    .header-container {
        padding: 0 1.2rem;
    }
    
    .premium-header {
        padding: 0.8rem 0;
    }
    
    .brand-logo {
        font-size: 1.5rem;
    }
    
    .brand-logo i {
        font-size: 1.8rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .search-container-premium {
        padding: 2rem;
    }
    
    .content-section {
        padding: 0 1.2rem;
    }
    
    .trending-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
    }
    
    .selected-media-content {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .selected-poster-container {
        max-width: 200px;
        margin: 0;
    }
    
    .selected-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 576px) {
    .header-container,
    .content-section,
    .footer-container {
        padding: 0 1.5rem;
    }
    
    .navbar {
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .trending-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .features-grid-premium {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .selection-grid-premium {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .server-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .selected-poster-container {
        max-width: 220px;
    }
}

@media (min-width: 768px) {
    .main-content {
        padding-top: 80px;
    }
    
    .premium-hero {
        padding: 3rem 0 5rem;
        margin-bottom: 3rem;
    }
    
    .search-overlay {
        margin: -70px auto 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .selected-media-content {
        display: grid;
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
    
    .selected-poster-container {
        max-width: 100%;
        margin: 0;
    }
    
    .selected-info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .trending-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .player-header {
        flex-direction: row;
        justify-content: space-between;
        padding: 1.2rem 1.5rem;
    }
    
    .trending-section .section-header {
        flex-direction: row;
        align-items: center;
    }
    
    .selection-header {
        flex-direction: row;
        align-items: center;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3.2rem;
    }
    
    .trending-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .features-grid-premium {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .nav-feature {
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .header-container,
    .content-section,
    .footer-container {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .trending-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

/* TOUCH DEVICE OPTIMIZATIONS */
@media (hover: none) and (pointer: coarse) {
    .action-btn,
    .search-result-item,
    .trending-item,
    .server-card {
        min-height: 44px;
    }
    
    .search-input-premium {
        font-size: 16px;
    }
    
    .action-btn-secondary {
        padding: 1rem 1.2rem;
    }
    
    .custom-select {
        padding: 1rem 1.2rem;
    }
    
    /* Increase touch targets */
    .hero-feature,
    .nav-feature,
    .theme-toggle-btn {
        min-height: 44px;
    }
}

/* ORIENTATION SPECIFIC */
@media (orientation: landscape) and (max-height: 600px) {
    .premium-hero {
        padding: 2rem 0 3rem;
    }
    
    .search-overlay {
        margin-top: -40px;
    }
    
    .main-content {
        padding-top: 70px;
    }
}

/* FIX FOR SELECT ELEMENTS ON MOBILE */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* ENSURE TEXT READABILITY */
.selected-overview,
.feature-desc,
.server-desc,
.search-subtitle,
.section-subtitle,
.hero-subtitle {
    line-height: 1.6;
    letter-spacing: 0.01em;
}

/* Safe area handling for notched phones */
@supports (padding: max(0px)) {
    .premium-header {
        padding-top: max(0.8rem, var(--safe-area-inset-top));
    }
    
    .main-content {
        padding-top: calc(70px + var(--safe-area-inset-top));
    }
}
