:root {
    --color-neon-pink: #ff0080;
    --color-neon-cyan: #00f5ff;
    --color-neon-yellow: #ffe600;
    --color-neon-purple: #bf00ff;
    --color-void: #06001a;
}

body {
    background-color: #06001a;
    color: #e0e0ff;
    font-family: "Courier New", monospace;
    min-height: 100vh;
    margin: 0;
}
body::before {
    content: "";
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    height: 30vh;
    pointer-events: none;
    z-index: 10000;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 245, 255, 0.05) 20%,
        rgba(160, 255, 255, 0.13) 45%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(160, 255, 255, 0.13) 55%,
        rgba(0, 245, 255, 0.05) 80%,
        transparent 100%
    );
    opacity: 0;
    animation: crt-scan 4s linear infinite;
}
body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background:
        radial-gradient(
            ellipse at center,
            transparent 55%,
            rgba(0, 0, 0, 0.7) 100%
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(0, 0, 0, 0.18) 2px,
            rgba(0, 0, 0, 0.18) 4px
        );
}

@keyframes neon-pulse {
    0%,
    100% {
        box-shadow:
            0 0 4px #ff0080,
            0 0 8px #ff0080,
            0 0 16px #ff0080;
    }
    50% {
        box-shadow:
            0 0 8px #ff0080,
            0 0 20px #ff0080,
            0 0 40px #ff0080,
            0 0 60px rgba(255, 0, 128, 0.4);
    }
}
@keyframes crt-scan {
    0% {
        transform: translateY(-30vh);
        opacity: 0;
    }
    2% {
        opacity: 1;
    }
    30% {
        transform: translateY(100vh);
        opacity: 0;
    }
    31% {
        transform: translateY(-30vh);
        opacity: 0;
    }
    100% {
        transform: translateY(-30vh);
        opacity: 0;
    }
}
@keyframes flicker {
    0%,
    95%,
    100% {
        opacity: 1;
    }
    96% {
        opacity: 0.85;
    }
    97% {
        opacity: 1;
    }
    98% {
        opacity: 0.7;
    }
}
@keyframes matrix-reveal {
    0% {
        opacity: 0;
        background-color: #00ff41;
        border-color: #00ff41;
        box-shadow:
            0 0 8px #00ff41,
            0 0 16px rgba(0, 255, 65, 0.8);
    }
    15% {
        opacity: 1;
        background-color: #00ff41;
        border-color: #00ff41;
        box-shadow:
            0 0 12px #00ff41,
            0 0 24px rgba(0, 255, 65, 0.6);
    }
    55% {
        background-color: rgba(0, 255, 65, 0.12);
        border-color: rgba(0, 255, 65, 0.25);
        box-shadow: none;
    }
    100% {
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
    }
}
@keyframes shimmer-pulse {
    0%, 100% { opacity: 0; transform: scale(0.4); }
    50%       { opacity: 1; transform: scale(1.6); }
}
@keyframes completed-glow {
    0%,
    100% {
        box-shadow:
            0 0 4px #00f5ff,
            0 0 10px rgba(0, 245, 255, 0.6),
            0 0 20px rgba(0, 245, 255, 0.3);
    }
    50% {
        box-shadow:
            0 0 6px #00f5ff,
            0 0 14px rgba(0, 245, 255, 0.75),
            0 0 26px rgba(0, 245, 255, 0.45);
    }
}

/* Day grid cells */
.day.completed,
.day.today {
    position: relative;
    cursor: pointer;
    transition: transform 0.1s ease-out;
}
.day.completed:is(:hover, :active),
.day.today:is(:hover, :active) {
    transform: scale(1.5);
    z-index: 2;
}
.day.completed:is(:hover, :active)::after,
.day.today:is(:hover, :active)::after {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    pointer-events: none;
    animation: shimmer-pulse 0.6s ease-in-out infinite;
}
.day.completed:is(:hover, :active)::after {
    background: radial-gradient(circle, rgba(0, 245, 255, 0.8) 0%, transparent 65%);
}
.day.today:is(:hover, :active)::after {
    background: radial-gradient(circle, rgba(255, 0, 128, 0.8) 0%, transparent 65%);
}

.day {
    display: block;
    height: 8px;
    width: 8px;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
    animation: matrix-reveal 0.6s var(--d, 0s) ease-out backwards;
}
.day.completed {
    background-color: #00f5ff;
    border-color: #00f5ff;
    animation:
        matrix-reveal 0.6s var(--d, 0s) ease-out backwards,
        completed-glow 3s calc(-1 * var(--d, 0s)) ease-in-out infinite;
}
.day.today {
    background-color: #ff0080;
    border-color: #ff0080;
    animation:
        matrix-reveal 0.6s var(--d, 0s) ease-out backwards,
        neon-pulse 1.4s calc(-1 * var(--d, 0s)) ease-in-out infinite;
}

/* Year laid out as 12 month columns */
.year-grid {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    align-items: flex-start;
}
.month-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}
.month-col-label {
    font-family: "Press Start 2P", monospace;
    font-size: 0.4rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    letter-spacing: 0.05em;
    min-height: 1.8rem;
}
.month-col-label--past {
    color: #00f5ff;
    text-shadow: 0 0 4px rgba(0, 245, 255, 0.6);
}
.month-col-label--current {
    color: #ff0080;
    text-shadow:
        0 0 6px #ff0080,
        0 0 12px rgba(255, 0, 128, 0.4);
    animation: flicker 5s infinite;
}
.month-col-label--future {
    color: rgba(255, 255, 255, 0.2);
}
.month-col-days {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Pixel heading */
.heading-pixel {
    font-family: "Press Start 2P", monospace;
    font-size: 0.7rem;
    line-height: 1.8;
    color: #00f5ff;
    text-shadow:
        0 0 8px #00f5ff,
        0 0 20px rgba(0, 245, 255, 0.5);
    letter-spacing: 0.05em;
    margin: 0;
}

/* Cycling phrase display */
@keyframes phrase-cycle {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    85%  { opacity: 1; }
    100% { opacity: 0; }
}
.phrase-display {
    animation: phrase-cycle 4s ease-in-out infinite;
    color: #ffe600;
    font-family: "Press Start 2P", monospace;
    font-size: 1.5rem;
    letter-spacing: 0.1em;
    text-shadow:
        0 0 6px #ffe600,
        0 0 12px rgba(255, 230, 0, 0.5);
}

/* Background cell grid */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, 0.5rem);
    gap: 0.5rem;
    padding: 0.5rem;
    pointer-events: none;
    overflow: hidden;
}
.bg-cell {
    display: block;
    height: 0.5rem;
    width: 0.5rem;
    border-radius: 2px;
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.casio-time {
    font-family: "Press Start 2P", monospace;
    font-size: 1.5rem;
    color: #00f5ff;
    text-shadow:
        0 0 6px #00f5ff,
        0 0 14px rgba(0, 245, 255, 0.4);
    letter-spacing: 0.08em;
}

/* Decorative scatter characters */
.deco-scatter {
    pointer-events: none;
    user-select: none;
    color: #ff0080;
    text-shadow: 0 0 8px #ff0080;
    font-size: 0.6rem;
    opacity: 0.7;
}

/* Main page layout */
.page {
    min-height: 100vh;
    width: 100%;
    padding: 1rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}
