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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: #0a0a1a;
    color: #e0e0e8;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem 1rem;
    line-height: 1.5;
}

.container {
    max-width: 640px;
    width: 100%;
}

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

h1 {
    font-size: 2.4rem;
    font-weight: 300;
    letter-spacing: 0.04em;
    background: linear-gradient(135deg, #7eb8da, #c49bdb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: #8888a0;
    font-size: 1rem;
}

/* Birthday input */
.birthday-section {
    text-align: center;
    margin-bottom: 2rem;
}

.birthday-section label {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8888a0;
    margin-bottom: 0.5rem;
}

.birthday-section input[type="date"] {
    font-family: inherit;
    font-size: 1.2rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid #2a2a40;
    border-radius: 8px;
    background: #12122a;
    color: #e0e0e8;
    outline: none;
    transition: border-color 0.2s;
    color-scheme: dark;
}

.birthday-section input[type="date"]:focus {
    border-color: #7eb8da;
}

/* Result area */
.result {
    transition: opacity 0.4s ease;
}

.result.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Mirror visual */
.mirror-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.date-card {
    flex: 1;
    background: #12122a;
    border: 1px solid #2a2a40;
    border-radius: 12px;
    padding: 1.2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.date-card .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #8888a0;
}

.date-card .date {
    font-size: 1.15rem;
    font-weight: 600;
}

.date-card .relative {
    font-size: 0.8rem;
    color: #6a6a80;
}

.date-card.past {
    border-color: #3a2a50;
}

.date-card.past .date {
    color: #c49bdb;
}

.date-card.present {
    border-color: #1a3a50;
}

.date-card.present .date {
    color: #7eb8da;
}

.mirror-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 60px;
}

.birthday-marker {
    font-size: 0.65rem;
    color: #8888a0;
    background: #1a1a30;
    border: 1px solid #2a2a40;
    border-radius: 6px;
    padding: 0.25rem 0.4rem;
    white-space: nowrap;
    text-align: center;
    line-height: 1.3;
}

/* Stats row */
.stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat {
    flex: 1;
    background: #12122a;
    border: 1px solid #2a2a40;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 600;
    color: #e0e0e8;
}

.stat-label {
    font-size: 0.75rem;
    color: #6a6a80;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Events section */
.events-section {
    background: #12122a;
    border: 1px solid #2a2a40;
    border-radius: 12px;
    padding: 1.5rem;
}

.events-section.hidden {
    display: none;
}

.events-section h2 {
    font-size: 1rem;
    font-weight: 500;
    color: #c49bdb;
    margin-bottom: 1rem;
}

.loading {
    color: #6a6a80;
    font-style: italic;
    font-size: 0.9rem;
}

.events-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.events-list li {
    padding: 0.7rem 0;
    border-bottom: 1px solid #1a1a30;
    font-size: 0.9rem;
    line-height: 1.6;
}

.events-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.events-list .event-year {
    font-weight: 600;
    color: #7eb8da;
    margin-right: 0.3em;
}

.events-list a {
    color: #9bbbdb;
    text-decoration: none;
}

.events-list a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 500px) {
    .mirror-visual {
        flex-direction: column;
    }

    .mirror-line {
        width: auto;
    }

    .stats {
        flex-direction: column;
    }

    h1 {
        font-size: 1.8rem;
    }
}
