/* Main CSS */
:root {
    --normal-color: #2faa67;
    --woke-color: #ff69b4;
    --header-gradient: linear-gradient(to right, #2faa67 50%, #ff0000 50%, #ff0000 55%, #ff7f00 60%, #ffff00 65%, #00ff00 70%, #0000ff 75%, #4b0082 80%, #9400d3 85%);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

header {
    background: var(--header-gradient);
    padding: 1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    height: 60px;
    margin-right: 15px;
}

h1 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.main-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu li {
    margin-right: 1.5rem;
    position: relative;
}

.main-menu li a {
    color: white;
    text-decoration: none;
    font-family: 'Bangers', cursive;
    font-size: 1.2rem;
    padding: 0.5rem;
    transition: all 0.3s ease;
}

.main-menu li a:hover {
    color: #ff69b4;
}

.main-menu li.active a {
    border-bottom: 3px solid white;
}

.auth-buttons button {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-family: 'Bangers', cursive;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.auth-buttons button:hover {
    background-color: white;
    color: #2faa67;
}

.tagline {
    background-color: #333;
    color: white;
    padding: 1rem;
    text-align: center;
    font-size: 1rem;
}

main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.filter-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    display: flex;
}

.search-box input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    width: 250px;
}

.search-box button {
    background-color: #2faa67;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 8px 16px;
    cursor: pointer;
}

.filter-dropdown select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

.movie-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.movie-poster {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.movie-info {
    padding: 1rem;
}

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

.movie-year {
    color: #777;
    font-size: 0.9rem;
    margin: 0 0 0.5rem 0;
}

.movie-rating {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.rating-slider {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, var(--normal-color), var(--woke-color));
    border-radius: 4px;
    margin-bottom: 5px;
    position: relative;
}

.rating-pointer {
    width: 15px;
    height: 15px;
    background-color: white;
    border: 2px solid #333;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    left: var(--rating-position);
}

.rating-label {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.8rem;
}

.rating-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--rating-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 2rem;
}

.pagination button {
    background-color: #2faa67;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    cursor: pointer;
    margin: 0 10px;
}

.pagination button:disabled {
    background-color: #ddd;
    cursor: not-allowed;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

form button {
    background-color: #2faa67;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
}

/* Detail page styles */
.movie-detail {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.detail-poster {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.detail-info h2 {
    margin-top: 0;
    font-size: 2rem;
}

.detail-meta {
    color: #777;
    margin-bottom: 1rem;
}

.detail-rating {
    margin: 1.5rem 0;
}

.category-list {
    margin: 1.5rem 0;
}

.category-item {
    background-color: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.user-rating {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
}

.user-rating h3 {
    margin-top: 0;
}

.rating-input {
    width: 100%;
    margin: 1rem 0;
}

.rating-slider {
    background: linear-gradient(to right, hsl(120, 100%, 50%), hsl(0, 100%, 50%));
    height: 10px;
    position: relative;
    border-radius: 5px;
}

.rating-pointer {
    position: absolute;
    width: 10px;
    height: 10px;
    background: white;
    border: 2px solid black;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    left: var(--rating-position);
}

/* Loading */
.loading {
    text-align: center;
    font-size: 1.2rem;
    color: #777;
    grid-column: 1 / -1;
    padding: 2rem;
}

footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: white;
    margin-top: 2rem;
}

/* Responsive */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-menu {
        margin-bottom: 1rem;
        flex-wrap: wrap;
    }
    
    .filter-controls {
        flex-direction: column;
    }
    
    .search-box, .filter-dropdown {
        margin-bottom: 1rem;
        width: 100%;
    }
    
    .movie-detail {
        grid-template-columns: 1fr;
    }
}
