:root {
    --bg-color: #0d0d12;
    --card-bg: rgba(255, 255, 255, 0.05);
    --accent-color: #e50914;
    --accent-glow: rgba(229, 9, 20, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

/* Background Gradients */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(229, 9, 20, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(70, 130, 255, 0.05) 0%, transparent 40%);
    z-index: -1;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-speed);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

nav ul li a {
    font-weight: 500;
    color: var(--text-secondary);
}

nav ul li a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, var(--bg-color), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* Search Bar */
.search-container {
    margin: 40px auto;
    max-width: 600px;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 15px 50px 15px 25px;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
    background: var(--card-bg);
    color: white;
    font-size: 1.1rem;
    backdrop-filter: blur(5px);
    outline: none;
    transition: var(--transition-speed);
}

.search-container input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Grid Layout */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Movie Card */
.movie-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: 1px solid var(--glass-border);
    cursor: pointer;
    position: relative;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}

.movie-card img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
}

.movie-info {
    padding: 15px;
}

.movie-title {
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.movie-meta {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
}

/* Rating Badge */
.rating {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Quiz Section */
.quiz-container {
    max-width: 800px;
    margin: 100px auto;
    background: var(--card-bg);
    padding: 60px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    text-align: center;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

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

.btn {
    padding: 12px 30px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition-speed);
    display: inline-block;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background: #ff0b17;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.05);
}

/* Movie Card Improvements */
.movie-card {
    position: relative;
}

.toggle-watched {
    font-size: 1.2rem;
    line-height: 1;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.toggle-watched:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.8);
}

.toggle-watched.active {
    background: var(--accent-color) !important;
}

/* Modal Styling */
#new-cat-modal {
    display: none;
    backdrop-filter: blur(10px);
}

/* Footer */
footer {
    margin-top: 100px;
    padding: 60px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    color: var(--text-secondary);
}
