:root {
    --bg-color: #000000;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.08);
    /* Slightly more visible */
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shine: rgba(255, 255, 255, 0.05);
}

/* Dynamic Month Colors */
.month-1 {
    --theme-color: #007aff;
}

.month-2 {
    --theme-color: #5856d6;
}

.month-3 {
    --theme-color: #af52de;
}

.month-4 {
    --theme-color: #ff2d55;
}

.month-5 {
    --theme-color: #ff9500;
}

.month-6 {
    --theme-color: #ffcc00;
}

.month-7 {
    --theme-color: #28cd41;
}

.month-8 {
    --theme-color: #5ac8fa;
}

.month-9 {
    --theme-color: #32ade6;
}

.month-10 {
    --theme-color: #30b0c7;
}

.month-11 {
    --theme-color: #a2845e;
}

.month-12 {
    --theme-color: #ff3b30;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(20, 20, 30, 1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(20, 20, 30, 1) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem;
    padding-top: 1rem;
    /* Less padding top since nav is high */
}

#app {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
}

.logo {
    max-width: 120px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.15));
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #aaa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-secondary);
}

/* Navigation - Month Selector */
#month-nav {
    display: flex;
    flex-wrap: wrap;
    /* Wrap on desktop check? No, maybe scroll on mobile */
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--theme-color);
    color: #fff;
    border-color: var(--theme-color);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5), 0 0 10px var(--theme-color);
    transform: scale(1.05);
}

/* Sections */
.month-section {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, var(--glass-bg) 0%, transparent 100%);
    padding: 1rem;
    border-radius: 16px;
    border-left: 4px solid var(--theme-color);
}

.month-title {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.print-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.print-btn:hover {
    background: #fff;
    color: #000;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Cards */
.person-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.person-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--theme-color);
}

.date-badge {
    width: 55px;
    height: 55px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--theme-color), rgba(255, 255, 255, 0.1));
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.4rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.person-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
}

.person-year {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Media Queries for Nav scrolling */
@media (max-width: 768px) {
    #month-nav {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 1rem;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .nav-btn {
        flex: 0 0 auto;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .print-btn {
        width: 100%;
        justify-content: center;
    }
}

/* PRINT STYLES */
@media print {
    body {
        background: #fff !important;
        color: #000 !important;
        padding: 0;
    }

    header,
    #month-nav {
        display: none !important;
    }

    /* We don't need 'printing' class logic anymore if we only render one month at a time! */
    /* But we will keep it simple: Hide everything that is NOT the main content */

    #app {
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .section-header {
        border: none;
        border-bottom: 2px solid #000;
        background: none;
        padding: 0;
        margin-bottom: 20px;
        color: #000;
        border-radius: 0;
    }

    .month-title {
        color: #000 !important;
        text-shadow: none;
    }

    .print-btn {
        display: none !important;
    }

    .cards-grid {
        display: block;
        /* List view for print usually better? Or Grid? Grid is fine. */
        grid-template-columns: 1fr 1fr;
        /* 2 columns for print */
    }

    .person-card {
        background: #fff !important;
        border: 1px solid #ddd !important;
        color: #000 !important;
        page-break-inside: avoid;
        box-shadow: none;
        margin-bottom: 10px;
    }

    .person-name {
        color: #000 !important;
    }

    .person-year {
        color: #555 !important;
    }

    .date-badge {
        color: #000 !important;
        background: #eee !important;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}