:root {
    --bg-color: #050505;
    --surface-color: #121212;
    --surface-hover: #1e1e1e;
    --primary: #e50914;
    --primary-hover: #f40612;
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: linear-gradient(to bottom, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
    transition: background-color 0.3s ease;
}

.navbar.scrolled {
    background-color: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 8px 15px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    width: 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.search-input.active {
    width: 200px;
    opacity: 1;
    visibility: visible;
}

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

.search-btn {
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.user-profile img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.user-profile img:hover {
    border-color: var(--primary);
}

/* Hero Section */
.hero {
    height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background-image: url('assets/Poster/incantation.avif');
    background-color: #1a1a1a; /* Backup color kalau gambar belum ada */
    background-size: cover;
    background-position: center top;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(5,5,5,0.9) 0%, rgba(5,5,5,0.4) 50%, rgba(5,5,5,0) 100%),
                linear-gradient(0deg, rgba(5,5,5,1) 0%, rgba(5,5,5,0) 30%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
}

.badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: inline-block;
}

.badge.quality {
    background: #e5a00d;
    color: #000;
    border: none;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    text-shadow: 2px 2px 20px rgba(0,0,0,0.5);
    background: linear-gradient(to right, #fff, #b3b3b3);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-meta {
    display: flex;
    gap: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    align-items: center;
}

.hero-meta span:first-child {
    color: #f5c518;
    font-weight: 600;
}

.hero-desc {
    font-size: 1.1rem;
    color: #d1d1d1;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(229, 9, 20, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.6);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Movies Section */
.container {
    padding: 20px 5% 50px;
    position: relative;
    z-index: 5;
    margin-top: -50px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
}

.see-all {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.see-all:hover {
    color: var(--primary);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.movie-card {
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.movie-card:hover {
    transform: scale(1.05) translateY(-5px);
}

.movie-card:hover .movie-poster {
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.movie-card:hover .poster-overlay {
    opacity: 1;
}

.movie-poster {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 2/3;
    position: relative;
    margin-bottom: 12px;
    background-color: var(--surface-color);
}

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

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

.poster-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
}

.play-icon {
    font-size: 3rem;
    color: white;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.movie-card:hover .play-icon {
    transform: scale(1);
}

.rating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    color: #f5c518;
}

.movie-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1.1rem;
    width: 80%;
    margin-bottom: 8px;
}

.skeleton-text-short {
    height: 0.85rem;
    width: 50%;
}

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

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: var(--surface-color);
    width: 90%;
    max-width: 900px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    transition: color 0.2s ease;
}

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

.video-container {
    width: 100%;
    aspect-ratio: 16/9;
    background-color: #000;
}

.video-container video {
    width: 100%;
    height: 100%;
}

.modal-details {
    padding: 25px;
}

.modal-details h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-meta {
    display: flex;
    gap: 15px;
    color: var(--text-muted);
    margin-bottom: 15px;
    align-items: center;
}

#modal-desc {
    color: #ccc;
    line-height: 1.6;
}

/* Fullscreen Player */
.fullscreen-player {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.fullscreen-player.hidden {
    display: none;
}

.fullscreen-player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.back-btn:hover {
    background: rgba(0,0,0,0.8);
}

.add-to-list-card-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.2);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.add-to-list-card-btn:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.toast {
    position: fixed;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 3000;
    transition: bottom 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast.show {
    bottom: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .nav-links {
        display: none; /* Add hamburger menu for real app */
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}
