:root {
    /* Light theme variables */
    --primary-color: #ffffff;
    --secondary-color: #f5f5f5;
    --accent-color: #e50914;
    --text-color: #333333;
    --text-secondary: #666666;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --primary-color: #1a1a1a;
    --secondary-color: #2a2a2a;
    --accent-color: #e50914;
    --text-color: #ffffff;
    --text-secondary: #b3b3b3;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--primary-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

header {
    background-color: var(--secondary-color);
    padding: 1rem 2rem;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.login-form, .user-greeting {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.hidden {
    display: none !important;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    font-size: 1.2rem;
    padding: 0.3rem 0.6rem;
}

.main-nav {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--shadow-color);
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-link:hover {
    background-color: var(--shadow-color);
}

.nav-link.active {
    background-color: var(--accent-color);
    color: white;
}

h1 {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.search-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

input, select {
    padding: 0.8rem 1.2rem;
    border: none;
    border-radius: 4px;
    background-color: var(--primary-color);
    color: var(--text-color);
    font-size: 1rem;
}

input:focus, select:focus {
    outline: 2px solid var(--accent-color);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.movie-card {
    position: relative;
    background-color: var(--secondary-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.4s;
    cursor: pointer;
    opacity: 0;
    animation: fadeInCard 0.6s forwards;
}

@keyframes fadeInCard {
    from { opacity: 0; transform: translateY(30px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.movie-poster {
    width: 100%;
    height: 375px;
    object-fit: cover;
}

.movie-info {
    padding: 1rem;
}

.movie-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.movie-genre {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.movie-rating {
    color: var(--accent-color);
    font-weight: bold;
}

.back-button {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.1rem;
    display: inline-block;
    margin-top: 1rem;
    transition: color 0.3s ease;
}

.back-button:hover {
    color: var(--accent-color);
}

.movie-details-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.movie-details-poster {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.movie-details-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.movie-details-title {
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.movie-details-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.movie-details-rating {
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.movie-details-description {
    line-height: 1.8;
    color: var(--text-secondary);
}

.favorite-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.favorite-button:hover {
    transform: scale(1.2);
    opacity: 1;
}

.favorite-button.active {
    color: var(--accent-color);
}

.no-favorites {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.browse-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.browse-link:hover {
    transform: translateY(-2px);
}

.movie-details-extra {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--shadow-color);
}

.movie-details-extra p {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.movie-details-extra strong {
    color: var(--text-color);
    margin-right: 0.5rem;
}

.no-results, .error-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1.2rem;
    grid-column: 1 / -1;
}

.error-message {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        gap: 1rem;
    }

    .user-controls {
        width: 100%;
        justify-content: center;
    }

    .search-container {
        flex-direction: column;
        padding: 0 1rem;
    }
    
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }

    .movie-details-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .movie-details-title {
        font-size: 2rem;
    }
}

@media (max-width: 600px) {
    .movie-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    .movie-card {
        min-width: 0;
    }
}

.centered-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
} 