:root {
    --primary-color: #4f46e5;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.subtitle a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.subtitle a:hover {
    text-decoration: underline;
}

.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-card {
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

.target-year-form {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    text-align: center;
}

h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.dropdown {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: var(--card-bg);
    transition: all 0.2s;
    margin-bottom: 0.5rem;
}

.dropdown:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.year-slider {
    width: 60%;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    margin: 15px auto;
    display: block;
}

.year-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.year-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    transition: all 0.2s;
}

.year-slider:hover::-webkit-slider-thumb {
    transform: scale(1.1);
}

.year-slider:hover::-moz-range-thumb {
    transform: scale(1.1);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    width: 60%;
    margin: -10px auto 0;
    color: var(--text-light);
    font-size: 0.8rem;
}

#targetYearValue {
    font-weight: 600;
    color: var(--primary-dark);
    margin-left: 5px;
}

.age-display {
    font-size: 0.9rem;
    color: var(--primary-dark);
    font-weight: 500;
    text-align: center;
    margin-top: 0.5rem;
}

.results-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
}

.oscar-row,
.people-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    align-items: start;
    margin-bottom: 1.5rem;
}

.result-card {
    height: 100%;
}

.result-content {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.placeholder {
    color: var(--text-light);
    text-align: center;
    font-style: italic;
    font-size: 0.9rem;
}

.name-list {
    list-style-type: none;
}

.name-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
}

.name-list li:last-child {
    border-bottom: none;
}

.name-rank {
    font-weight: 600;
    color: var(--primary-dark);
}

.oscar-winner,
.time-person,
.people-winner {
    text-align: center;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.oscar-film,
.people-age {
    text-align: center;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.85rem;
}

.loading {
    color: var(--text-light);
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}

.source {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
}

.error {
    color: #dc2626;
    text-align: center;
    font-size: 0.9rem;
}

.error-details {
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
}

footer {
    margin-top: auto;
    text-align: center;
    padding-top: 2rem;
    color: var(--text-light);
    font-size: 0.8rem;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .container {
        padding: 1.25rem;
    }
    
    .results-container,
    .oscar-row,
    .people-row {
        grid-template-columns: 1fr;
    }
    
    .year-slider {
        width: 80%;
    }
    
    .slider-labels {
        width: 80%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .year-slider {
        width: 90%;
    }
    
    .slider-labels {
        width: 90%;
    }
}