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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f5f7fa;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
}

/* Header */
.main-header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo h1 {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.site-logo a {
    text-decoration: none;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 80px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto;
}

.search-bar form {
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-bar input {
    flex: 1;
    padding: 15px 25px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-bar button {
    padding: 15px 30px;
    border: none;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.search-bar button:hover {
    opacity: 0.9;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 30px;
}

/* Filters */
.filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 600;
}

.filter-group select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

/* Movies Grid */
.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.movie-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.movie-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.movie-link {
    text-decoration: none;
    color: inherit;
}

.movie-poster {
    position: relative;
    padding-bottom: 150%;
    overflow: hidden;
    background: #f0f0f0;
}

.movie-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.movie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 15px;
    opacity: 0;
    transition: opacity 0.3s;
}

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

.rating-badge {
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-dark);
    align-self: flex-start;
}

.view-details {
    color: white;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

.movie-info {
    padding: 20px;
}

.movie-info h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.movie-meta {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 8px;
}

.movie-genre {
    display: inline-block;
    background: var(--bg-light);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.movie-stats {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-light);
}

/* Movie Header */
.movie-header {
    background-size: cover;
    background-position: center;
    padding: 60px 0;
    color: white;
}

.movie-header-content {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 40px;
    align-items: start;
}

.movie-poster-large img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.movie-header-info h1 {
    font-size: 42px;
    margin-bottom: 15px;
}

.movie-meta-large {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.rating-display {
    margin-bottom: 25px;
}

.rating-score {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rating-score .score {
    font-size: 48px;
    font-weight: bold;
}

.rating-score .stars {
    font-size: 24px;
}

.rating-count {
    font-size: 14px;
    opacity: 0.8;
}

.movie-description {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 25px;
    opacity: 0.95;
}

.movie-details {
    margin-bottom: 25px;
}

.detail-item {
    margin-bottom: 10px;
    font-size: 15px;
}

.detail-item strong {
    margin-right: 10px;
}

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

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #f5576c 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Trailer Section */
.trailer-section {
    margin-bottom: 40px;
}

.trailer-section h2 {
    font-size: 28px;
    margin-bottom: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Reviews Section */
.reviews-section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 28px;
}

.no-reviews {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    color: var(--text-light);
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.review-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.review-date {
    font-size: 13px;
    color: var(--text-light);
}

.review-rating .star {
    font-size: 18px;
    opacity: 0.3;
}

.review-rating .star.filled {
    opacity: 1;
}

.review-title {
    font-size: 18px;
    margin-bottom: 10px;
}

.review-text {
    color: var(--text-dark);
    margin-bottom: 15px;
    line-height: 1.8;
}

.review-actions {
    display: flex;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.vote-btn, .comment-btn {
    padding: 8px 16px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

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

.vote-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.comment-btn:hover {
    background: var(--bg-light);
}

/* Comments */
.comments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.comments-list {
    margin-bottom: 20px;
}

.comment-item {
    background: var(--bg-light);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
}

.comment-date {
    font-size: 12px;
    color: var(--text-light);
}

.comment-text {
    font-size: 14px;
    color: var(--text-dark);
}

.comment-form {
    display: grid;
    gap: 10px;
}

.comment-form input,
.comment-form textarea {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.comment-form textarea {
    min-height: 80px;
    resize: vertical;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-content h2 {
    margin-bottom: 25px;
    font-size: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
}

.form-group textarea {
    resize: vertical;
}

.star-rating {
    display: flex;
    gap: 10px;
    font-size: 32px;
}

.star-input {
    cursor: pointer;
    opacity: 0.3;
    transition: opacity 0.3s;
}

.star-input:hover,
.star-input.selected {
    opacity: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-btn {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
}

.page-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: transparent;
}

.page-btn:hover:not(.active) {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Footer */
.main-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 60px;
}

.main-footer p {
    margin-bottom: 10px;
}

.main-footer a {
    color: var(--accent-color);
    text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 32px;
    }

    .movies-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 15px;
    }

    .movie-header-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .movie-poster-large {
        max-width: 250px;
        margin: 0 auto;
    }

    .movie-header-info h1 {
        font-size: 28px;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-content {
        padding: 25px;
    }
}
