/* ============================================
   FLOXFLIX UI REMASTER
   Refined, smooth, less "AI modern"
   Professional blue theme with natural animations
   ============================================ */

:root {
    /* Refined color palette - deeper, richer blues */
    --primary-bg: #0b0f1a;
    --secondary-bg: #131824;
    --tertiary-bg: #1c2333;
    --card-bg: #1a2235;
    
    /* Sophisticated blue accents */
    --accent-blue: #3b82f6;
    --accent-blue-light: #60a5fa;
    --accent-blue-dark: #2563eb;
    --accent-cyan: #06b6d4;
    --accent-indigo: #6366f1;
    
    /* Text colors */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);
    
    /* Smooth transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Smooth scrolling === */
html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: linear-gradient(135deg, #0b0f1a 0%, #131824 50%, #0b0f1a 100%);
    background-attachment: fixed;
}

/* === Refined Navbar === */
.navbar {
    background: rgba(11, 15, 26, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(11, 15, 26, 0.95);
    border-bottom-color: rgba(59, 130, 246, 0.2);
    box-shadow: var(--shadow-md);
}

.logo {
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all var(--transition-base);
}

.logo:hover {
    transform: scale(1.02);
    filter: brightness(1.2);
}

.nav-link {
    position: relative;
    color: var(--text-secondary);
    transition: color var(--transition-base);
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* === Refined Buttons === */
.btn {
    position: relative;
    overflow: hidden;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue-light);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.btn-secondary:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: var(--shadow-glow);
}

.btn-icon {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    transition: all var(--transition-base);
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

/* === Refined Hero Section === */
.hero {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(11, 15, 26, 0.7) 0%,
        rgba(19, 24, 36, 0.85) 50%,
        rgba(11, 15, 26, 0.9) 100%
    );
    z-index: 1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--primary-bg), transparent);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-description {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

.hero-buttons {
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Refined Cards === */
.series-card {
    position: relative;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid rgba(59, 130, 246, 0.1);
    box-shadow: var(--shadow-sm);
}

.series-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(6, 182, 212, 0.1));
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 1;
}

.series-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.2);
}

.series-card:hover::before {
    opacity: 1;
}

.series-card img {
    transition: transform var(--transition-slow);
}

.series-card:hover img {
    transform: scale(1.05);
}

.series-card-title {
    position: relative;
    z-index: 2;
    font-weight: 700;
    background: transparent;
    transition: all var(--transition-base);
}

.series-card:hover .series-card-title {
    background: transparent;
}

/* === Refined Episode Cards === */
.episode-card {
    background: var(--card-bg);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 14px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.episode-card:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
    transform: translateX(8px);
}

.episode-number {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
}

.episode-play-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.episode-play-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4);
    transform: scale(1.05) translateY(-2px);
}

/* === Refined Like Button === */
.like-btn {
    background: rgba(59, 130, 246, 0.08);
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    transition: all var(--transition-base);
    backdrop-filter: blur(8px);
}

.like-btn:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.like-btn.liked {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.2));
    border-color: rgba(239, 68, 68, 0.4);
}

.like-btn.liked .like-icon {
    fill: #ef4444;
    stroke: #ef4444;
    animation: heartPulse 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
}

/* === Refined Video Controls === */
.custom-controls {
    background: linear-gradient(to top, rgba(11, 15, 26, 0.95), transparent);
    backdrop-filter: blur(12px);
    transition: opacity var(--transition-base);
}

.control-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 10px;
    transition: all var(--transition-fast);
}

.control-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.progress-bar {
    background: rgba(59, 130, 246, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.progress-filled {
    background: linear-gradient(90deg, #3b82f6, #06b6d4);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    transition: width 0.1s linear;
}

.progress-handle {
    background: white;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.8), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: transform var(--transition-fast);
}

.progress-handle:hover {
    transform: scale(1.3);
}

/* === Refined Search === */
.search-input {
    background: rgba(59, 130, 246, 0.08);
    border: 1.5px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    transition: all var(--transition-base);
    backdrop-filter: blur(8px);
}

.search-input:focus {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* === Refined Tags === */
.hero-tag,
.series-tag {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    transition: all var(--transition-base);
}

.hero-tag:hover,
.series-tag:hover {
    background: rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.5);
    transform: translateY(-2px);
}

/* === Smooth Page Transitions === */
.fade-in {
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* === Loading States === */
.loading {
    border-color: rgba(59, 130, 246, 0.2);
    border-top-color: #3b82f6;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === Refined Footer === */
.footer {
    background: linear-gradient(to top, rgba(11, 15, 26, 0.95), rgba(19, 24, 36, 0.8));
    border-top: 1px solid rgba(59, 130, 246, 0.15);
    backdrop-filter: blur(12px);
}

/* === Coming Soon Badge === */
.coming-soon-badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(6, 182, 212, 0.15));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 14px;
    animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 20px 5px rgba(59, 130, 246, 0);
    }
}

/* === Refined Scrollbar === */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--secondary-bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #06b6d4);
    border-radius: 6px;
    border: 2px solid var(--secondary-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

/* === Selection === */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}
