/* ==========================================================================
   WRITEBETTER.ME - FRESH & MODERN CINEMATIC THEME
   Version: 3.0 - Neon Glass Edition
   ========================================================================== */

/* CSS Variables - Fresh Palette */
:root {
    --bg-primary: #0a0c10;
    --bg-secondary: #0f1117;
    --bg-card: rgba(18, 22, 35, 0.7);
    --bg-card-solid: #121623;
    --bg-overlay: rgba(0, 0, 0, 0.65);
    
    /* Gradien segar */
    --gradient-1: linear-gradient(135deg, #667eea 0%, #e9e1f2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #ffffff 0%, #ae00fe82 100%);
    --gradient-accent: linear-gradient(120deg, #a6c0fe 0%, #f68084 100%);
    --gradient-glow: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.4), transparent 70%);
    
    /* Warna aksen */
    --accent-primary: #7c3aed;
    --accent-secondary: #ec4899;
    --accent-tertiary: #06b6d4;
    --accent-success: #10b981;
    
    /* Text colors */
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Border & Shadows */
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.4);
    
    /* Rating */
    --rating-color: #fbbf24;
    
    /* Spacing */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ==================== GLASS BACKGROUND EFFECT ==================== */
.glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==================== TYPOGRAPHY FRESH ==================== */
h1, h2, h3, .hero-title {
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 0%, #a6c0fe 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    display: inline-block;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    border-left: 4px solid var(--accent-primary);
    padding-left: 1rem;
}

/* ==================== NAVBAR - GLASS & NEON ==================== */
.navbar-cinematic {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar-cinematic.scrolled {
    background: rgba(10, 12, 16, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    margin: 0 0.25rem;
    border-radius: 50px;
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: white;
    background: rgba(124, 58, 237, 0.2);
    text-shadow: 0 0 5px rgba(124, 58, 237, 0.5);
}

/* Search Bar */
.search-cinematic {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    padding: 0.7rem 1.5rem;
    color: white;
    width: 280px;
    transition: all 0.3s;
}

.search-cinematic:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
    background: rgba(0, 0, 0, 0.6);
}

.search-btn {
    background: var(--gradient-1);
    border: none;
    border-radius: 60px;
    padding: 0.7rem 1.5rem;
    color: white;
    font-weight: bold;
    transition: 0.2s;
}

.search-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(102, 126, 234, 0.5);
}

/* ==================== HERO SECTION - PARALLAX + GLOW ==================== */
.hero-cinematic {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center 30%;
    background-attachment: fixed;
}

.hero-cinematic::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #0a0c10 0%, rgba(10, 12, 16, 0.7) 50%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 2rem;
    backdrop-filter: blur(4px);
    border-radius: var(--radius-lg);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--gradient-2);
    padding: 0.4rem 1rem;
    border-radius: 60px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 1rem;
    color: white;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 1rem;
}

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

.hero-rating {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.8rem;
    border-radius: 60px;
    border-left: 3px solid #fbbf24;
}

.hero-overview {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Buttons with neon glow */
.btn-cinematic-primary {
    background: var(--gradient-1);
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 60px;
    font-weight: bold;
    color: white;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-cinematic-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    color: white;
}

.btn-cinematic-secondary {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 0.9rem 2rem;
    border-radius: 60px;
    font-weight: bold;
    color: white;
    transition: 0.3s;
}

.btn-cinematic-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-3px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* ==================== CATEGORY NAVIGATION (CHIP STYLE) ==================== */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 2rem 0;
    justify-content: center;
}

.category-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 60px;
    padding: 0.6rem 1.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.2s;
}

.category-btn i {
    margin-right: 0.5rem;
}

.category-btn:hover, .category-btn.active {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

/* ==================== MOVIE GRID - FRESH CARDS ==================== */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.movie-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(124, 58, 237, 0.5);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,58,237,0.3);
}

.movie-card-poster {
    position: relative;
    height: 380px;
    overflow: hidden;
}

.movie-card-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.movie-card:hover .movie-card-poster img {
    transform: scale(1.08);
}

.movie-card-rating {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.7rem;
    border-radius: 60px;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--rating-color);
    z-index: 2;
}

.movie-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    transform: translateY(100%);
    transition: transform 0.3s;
    z-index: 2;
}

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

.movie-card-overlay-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.movie-card-overlay-btn {
    display: inline-block;
    background: var(--gradient-1);
    padding: 0.4rem 1rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    margin-top: 0.5rem;
    transition: 0.2s;
}

.movie-card-body {
    padding: 1rem;
}

.movie-card-title {
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.25rem;
}

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

/* ==================== PAGINATION NEON ==================== */
.pagination-cinematic {
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-link {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-secondary);
    border-radius: 12px !important;
    padding: 0.6rem 1.2rem;
    transition: 0.2s;
}

.page-link:hover {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
}

.page-item.active .page-link {
    background: var(--gradient-1);
    border-color: transparent;
    color: white;
    box-shadow: 0 0 10px rgba(102,126,234,0.5);
}

/* ==================== MOVIE DETAIL PAGE - FRESH ==================== */
.movie-detail-hero {
    min-height: 70vh;
    background-size: cover;
    background-position: center 20%;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding-bottom: 3rem;
}

.movie-detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0c10 0%, rgba(10,12,16,0.6) 100%);
}

.movie-detail-poster {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 35px -10px black;
    border: 2px solid rgba(255,255,255,0.1);
}

.rating-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.8rem;
    color: white;
    box-shadow: 0 0 20px rgba(124,58,237,0.5);
}

.genre-badge {
    background: rgba(255,255,255,0.08);
    border-radius: 40px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: 0.2s;
}

.genre-badge:hover {
    background: var(--gradient-1);
    color: white;
}

/* Player Section */
.player-section {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    overflow: hidden;
    margin: 2rem 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.player-container iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
}

/* Tabs */
.nav-tabs-cinematic {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    gap: 0.5rem;
}

.nav-tabs-cinematic .nav-link {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.8rem 1.5rem;
    border-radius: 40px;
    font-weight: 600;
}

.nav-tabs-cinematic .nav-link.active {
    background: var(--gradient-1);
    color: white;
}

/* Cast & Similar Cards */
.cast-card, .similar-card {
    background: var(--bg-card-solid);
    border-radius: 16px;
    overflow: hidden;
    transition: 0.25s;
}

.cast-card:hover, .similar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
}

/* Footer */
.footer-cinematic {
    background: #05070a;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 4rem 0 2rem;
    margin-top: 5rem;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    z-index: 99;
    cursor: pointer;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

/* Responsive */
@media (max-width: 768px) {
    .movies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .movie-card-poster {
        height: 280px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .btn-cinematic-primary, .btn-cinematic-secondary {
        text-align: center;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}