/* Reset e estilos gerais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #0d1117;
    color: #e6edf3;
    line-height: 1.6;
}

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

/* Header */
header {
    background-color: #161b22;
    padding: 15px 0;
    border-bottom: 1px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #58a6ff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #e6edf3;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #58a6ff;
}

.search-bar {
    display: flex;
    align-items: center;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 5px 10px;
    width: 250px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: #e6edf3;
    width: 100%;
    outline: none;
}

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 30px;
}

/* Film grid */
.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.films-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.film-card {
    background-color: #161b22;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.film-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.film-poster {
    width: 100%;
    height: 270px;
    object-fit: cover;
}

.film-info {
    padding: 10px;
}

.film-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.film-year {
    font-size: 12px;
    color: #8b949e;
}

.film-rating {
    display: flex;
    align-items: center;
    margin-top: 5px;
    font-size: 12px;
}

.stars {
    color: #ffd700;
    margin-right: 5px;
}

/* Sidebar */
.sidebar {
    background-color: #161b22;
    border-radius: 8px;
    padding: 20px;
    height: fit-content;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #58a6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
    margin-right: 15px;
}

.user-info h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.user-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #8b949e;
}

.recent-activity {
    margin-top: 20px;
}

.activity-item {
    display: flex;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #30363d;
}

.activity-poster {
    width: 40px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.activity-details {
    flex: 1;
}

.activity-user {
    font-weight: bold;
    font-size: 14px;
}

.activity-film {
    font-size: 12px;
    margin: 2px 0;
}

.activity-rating {
    font-size: 12px;
    color: #ffd700;
}

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

.modal-content {
    background-color: #161b22;
    margin: 50px auto;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    overflow: hidden;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #30363d;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-modal {
    background: none;
    border: none;
    color: #e6edf3;
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.modal-poster {
    width: 100%;
    border-radius: 8px;
}

.film-details h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.film-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #8b949e;
}

.film-overview {
    margin-bottom: 20px;
    line-height: 1.6;
}

.review-section {
    margin-top: 20px;
}

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

.rating-input {
    margin-bottom: 10px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #ffd700;
}

textarea {
    width: 100%;
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    padding: 10px;
    color: #e6edf3;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 10px;
}

button {
    background-color: #238636;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #2ea043;
}

.reviews-list {
    margin-top: 20px;
}

.review-item {
    background-color: #0d1117;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

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

.review-user {
    font-weight: bold;
}

.review-rating {
    color: #ffd700;
}

/* Reviews na página principal */
.recent-reviews {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-review-item {
    background-color: #161b22;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
}

.main-review-poster {
    width: 60px;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

.main-review-content {
    flex: 1;
}

.main-review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.main-review-film {
    font-weight: bold;
    color: #58a6ff;
}

.main-review-user {
    font-size: 14px;
    color: #8b949e;
}

.main-review-text {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
}

.main-review-footer {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #8b949e;
}

/* Footer */
footer {
    background-color: #161b22;
    padding: 30px 0;
    margin-top: 50px;
    border-top: 1px solid #30363d;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    flex: 1;
    min-width: 200px;
    margin-bottom: 20px;
}

.footer-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #58a6ff;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #8b949e;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #58a6ff;
}

.copyright {
    text-align: center;
    margin-top: 30px;
    font-size: 14px;
    color: #8b949e;
}

/* Responsividade */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: -1;
        margin-bottom: 30px;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-bar {
        width: 100%;
    }
    
    .films-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}