:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --card-bg: #111111;
    --border-color: #333333;
    --primary-color: #ff9800;
    --secondary-text: #999999;
}



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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    background-image: radial-gradient(circle at center 40%, rgba(255, 152, 0, 0.18) 0%, rgba(255, 152, 0, 0.08) 35%, transparent 65%);
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-position: top center;
    background-size: 100% 120vh;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex-grow: 1;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Header & Main Event */
header {
    text-align: center;
    min-height: calc(100vh - 4rem); /* Push other content below fold */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.main-event {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.main-event h1 {
    font-size: 2.2rem;
    color: var(--secondary-text);
    font-weight: normal;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.main-timer {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.days-wrapper, .hms-wrapper {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.colon {
    font-family: 'DSEG7-Classic', monospace;
    font-size: 7rem;
    font-weight: bold;
    margin-top: -0.3rem; /* Optical vertical alignment */
    text-shadow: 0 0 15px rgba(255, 152, 0, 0.25);
}

.time-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time-box .number {
    font-family: 'DSEG7-Classic', monospace;
    font-size: 7rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    text-shadow: 0 0 15px rgba(255, 152, 0, 0.25);
}
.orange-digit {
    color: var(--primary-color);
    text-shadow: 0 0 25px rgba(255, 152, 0, 0.6);
}

.time-box .label {
    font-size: 1.2rem;
    color: var(--secondary-text);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 1rem;
}

/* Secondary Events */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.event-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s ease;
}

.event-card:hover {
    transform: translateY(-2px);
}

.event-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.event-info p {
    font-size: 0.85rem;
    color: var(--secondary-text);
}

.event-timer {
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.8rem;
    color: var(--secondary-text);
    border-top: 1px solid var(--border-color);
}

footer a {
    color: var(--secondary-text);
    text-decoration: none;
}

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

/* Admin Styles */
.admin-login {
    max-width: 400px;
    margin: 10vh auto;
    text-align: center;
}

.admin-login input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-color);
    color: var(--text-color);
}

.admin-login button, .btn {
    width: 100%;
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

.admin-login button:hover, .btn:hover {
    opacity: 0.8;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-panel {
    display: none; /* hidden until logged in */
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input {
    width: auto;
}

.admin-event-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--card-bg);
}

.admin-actions button {
    margin-left: 0.5rem;
    padding: 4px 8px;
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    border-radius: 4px;
    cursor: pointer;
}

.admin-actions button:hover {
    background: var(--border-color);
}

/* Celebration Effect */
.celebrate {
    animation: pulse 1s infinite alternate;
    color: #ff3b30;
}

@keyframes pulse {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

 
/* Mobile Warning Bar */
.mobile-warning {
    display: none; /* Hidden by default */
}

/* Mobile Responsiveness */
@media (max-width: 800px) {
    .container {
        padding: 1rem;
    }
    
    .main-timer {
        flex-wrap: wrap;
        gap: 0;
    }
    
    .days-wrapper {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .hms-wrapper {
        width: 100%;
        gap: 0.5rem;
    }
    
    .days-wrapper .number {
        font-size: 5rem; /* Massive days on mobile */
    }
    
    .hms-wrapper .time-box .number, .hms-wrapper .colon {
        font-size: 2.5rem; /* Just enough to fit 390px screens */
    }
    
    .main-event h1 {
        font-size: 1.5rem;
    }
    
    .time-box .label {
        font-size: 0.9rem;
    }
    
    .event-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .mobile-warning {
        display: flex;
    }
}

/* Display Toggles for Mobile/Desktop separation */
body.is-mobile-device .desktop-only {
    display: none !important;
}
body:not(.is-mobile-device) .mobile-only {
    display: none !important;
}

body.is-mobile-device .mobile-warning {
    display: flex;
}

body.is-mobile-device .mobile-warning, .mobile-warning {
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffeb3b;
    color: #000;
    padding: 16px 40px;
    z-index: 9999;
    text-align: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-warning .close-btn {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #000;
    padding: 0 5px;
    line-height: 1;
}

.mobile-warning p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: bold;
}

/* --- APOD Random Reveal Section --- */
.apod-section {
    position: relative;
    min-height: 100vh;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6rem 2rem;
}

.apod-container {
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.apod-container.visible {
    opacity: 1;
    transform: translateY(0);
}

.apod-image {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 12px;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    transition: opacity 0.5s ease-in-out;
}

.apod-content {
    text-align: center;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.apod-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #F5F5F7;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.apod-desc {
    font-size: 1.1rem;
    color: #86868B;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-align: justify;
    text-justify: inter-word;
}

.apod-year {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background-color: rgba(255, 152, 0, 0.1);
    color: var(--primary-color);
    border-radius: 2rem;
    font-weight: bold;
    font-family: monospace;
    font-size: 1.1rem;
    border: 1px solid rgba(255, 152, 0, 0.3);
}