*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    background: #fafaf9;
    color: #111827;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }

.page { max-width: 1100px; margin: 0 auto; padding: 3rem 1.5rem; flex: 1; }

.modules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 0; }
.modules-grid .onthisday-card,
.modules-grid .onthisday-empty,
.modules-grid .birthdays-card { margin-bottom: 0; }

@media (max-width: 680px) {
    .modules-grid { grid-template-columns: 1fr; }
}

.site-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.5rem; }
.site-logo img { height: 3rem; display: block; }
.date-nav { display: flex; align-items: center; gap: 1rem; }
.date-label { font-size: 1.5rem; color: #111827; text-align: center; }
.date-arrow { font-size: 1.5rem; color: #111827; text-decoration: none; line-height: 1; padding: 0 0.25rem; opacity: 0.4; transition: opacity 0.15s; }
.date-arrow:hover { opacity: 1; text-decoration: none; }
.date-arrow-disabled { opacity: 0.15; pointer-events: none; }

.onthisday-card {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
}
.card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-bottom: 0.75rem;
}
.onthisday-list { list-style: none; margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.onthisday-item { display: flex; gap: 0.75rem; align-items: baseline; }
.onthisday-year { font-size: 1rem; font-weight: 700; opacity: 0.7; min-width: 2.5rem; flex-shrink: 0; }
.onthisday-text { font-size: 1rem; line-height: 1.6; }
.onthisday-link {
    display: block;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    padding-bottom: 1px;
    margin-top: 0.15rem;
}
.onthisday-link:hover { color: white; border-bottom-color: white; text-decoration: none; }
.onthisday-empty {
    background: #f3f4f6;
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
    color: #9ca3af;
    font-size: 0.9rem;
}

.birthdays-card {
    background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.75rem;
    margin-bottom: 2rem;
}
.birthday-list { list-style: none; margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.75rem; }
.birthday-item { display: flex; gap: 0.75rem; align-items: baseline; }
.birthday-year { font-size: 1rem; font-weight: 700; opacity: 0.7; min-width: 2.5rem; flex-shrink: 0; }
.birthday-text { font-size: 1rem; line-height: 1.6; }
.birthday-link { color: rgba(255,255,255,0.8); font-size: 1rem; border-bottom: 1px solid rgba(255,255,255,0.3); padding-bottom: 1px; text-decoration: none; }
.birthday-link:hover { color: white; border-bottom-color: white; text-decoration: none; }
.birthday-meta { display: block; font-size: 0.75rem; opacity: 0.65; margin-top: 0.15rem; }

.sky-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.75rem;
}
.sky-moon { font-size: 1rem; line-height: 1.6; margin-top: 0.75rem; }
.sky-sun { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.75rem; font-size: 0.9rem; opacity: 0.9; }

.horoscope-card {
    background: linear-gradient(135deg, #3b0764 0%, #7e22ce 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.75rem;
}
.horoscope-text { font-size: 1rem; line-height: 1.6; margin-top: 0.75rem; }

.word-card {
    background: linear-gradient(135deg, #78350f 0%, #d97706 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.75rem;
}
.word-title { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 0.75rem; }
.word-phonetic { font-size: 0.85rem; opacity: 0.7; margin-top: 0.15rem; }
.word-pos { font-size: 0.75rem; font-style: italic; opacity: 0.75; margin-top: 0.5rem; text-transform: capitalize; }
.word-def { font-size: 1rem; line-height: 1.6; margin-top: 0.4rem; }

.fact-card {
    background: linear-gradient(135deg, #134e4a 0%, #0d9488 100%);
    color: white;
    border-radius: 1rem;
    padding: 1.75rem;
}
.fact-text { font-size: 1rem; line-height: 1.6; margin-top: 0.75rem; }

.site-footer {
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: #000;
    a {
        color: #e8612a;
        text-decoration: underline;
    }
}
.footer-version { font-size: 0.65rem; color: #aaa; margin-top: 0.25rem; }

@media (max-width: 480px) {
    .page { padding: 2rem 1rem; }
    .site-header h1 { font-size: 1.6rem; }
    .onthisday-year { font-size: 2rem; }
}
