/* ==========================================================================
   1. CORE RESET & BASE
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    line-height: 1.6;
    padding: 20px;
}

/* ==========================================================================
   2. HEADER & LAYOUT
   ========================================================================== */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

header h1 {
    font-size: 1.6rem;
    color: #ff9800;
}

#homeButton {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

#movieList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   3. MOVIE CARD STYLING
   ========================================================================== */
.movie-item {
    background: #1e1e1e;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.movie-item:hover {
    transform: translateY(-5px);
}

.poster-container {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background: #000;
    aspect-ratio: 2 / 3;
}

.poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nomination-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff9800;
    color: #000;
    font-weight: 700;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

/* ==========================================================================
   4. RATING & ACTIONS
   ========================================================================== */
.movie-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.movie-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #ff9800;
}

.view-details-link {
    margin-left: auto;
    color: #2196f3;
    text-decoration: none;
    font-size: 0.85rem;
}

.rating-wrapper {
    background: #252525;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* SIMPLE 5-STAR SYSTEM */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
    font-size: 32px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    cursor: pointer;
    color: #444;
    transition: color 0.1s;
}

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

.clear-rating {
    background: transparent;
    border: 1px solid #444;
    color: #777;
    font-size: 10px;
    padding: 4px 12px;
    border-radius: 4px;
    margin-top: 10px;
    cursor: pointer;
}

/* ==========================================================================
   5. NOMINATION PILLS
   ========================================================================== */
.nominations-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin-top: auto;
}

.nominations-pills li {
    background: #333;
    color: #ff9800;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #444;
}

.status-msg, .no-movies, .error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px;
    color: #888;
}

@media (max-width: 600px) {
    #movieList { grid-template-columns: 1fr; }
}
