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

:root {
    --deep-navy: #1a3a5c;
    --darker-navy: #253350;
    --module-bg: #3a4565;
    --indigo-accent: #4b3d8f;
    --frost: #e8edf5;
    --muted-steel: #9ba8bc;
    --chochin-gold: #e8a630;
    --torii-red: #c4463a;
    --warm-parchment: #f5e6c8;
    --copper: #cd853f;
}

html, body {
    height: 100%;
    overflow: hidden;
    background: var(--darker-navy);
    font-family: 'Space Grotesk', sans-serif;
    color: var(--frost);
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 4px;
    height: 100vh;
    width: 100vw;
    padding: 4px;
    background: var(--deep-navy);
}

.module {
    background: var(--darker-navy);
    border: 1px solid rgba(155, 168, 188, 0.15);
    border-radius: 2px;
    padding: 1.2rem;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.4s ease;
}

.module:hover {
    border-color: rgba(232, 166, 48, 0.4);
}

.module-label {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--muted-steel);
    margin-bottom: 0.8rem;
    opacity: 0.7;
}

/* Hero Module */
.module-hero {
    grid-column: 1 / 8;
    grid-row: 1 / 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-counter {
    font-family: 'Caveat', cursive;
    font-size: clamp(4rem, 10vw, 9rem);
    font-weight: 700;
    color: var(--chochin-gold);
    letter-spacing: -0.02em;
    line-height: 1;
}

.hero-sublabel {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 300;
    color: var(--muted-steel);
    margin-top: 0.5rem;
    letter-spacing: 0.1em;
}

.waveform {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    opacity: 0.6;
}

/* Time Module */
.module-time {
    grid-column: 8 / 13;
    grid-row: 1 / 3;
}

.time-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    flex: 1;
    align-content: center;
}

.time-unit {
    display: flex;
    flex-direction: column;
}

.time-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--frost);
}

.time-label {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 0.6rem;
    color: var(--muted-steel);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Pulse Module */
.module-pulse {
    grid-column: 8 / 13;
    grid-row: 3 / 5;
}

#pulse-canvas {
    flex: 1;
    width: 100%;
}

/* Progress Module */
.module-progress {
    grid-column: 1 / 5;
    grid-row: 5 / 7;
}

.progress-bar-container {
    flex: 1;
    display: flex;
    align-items: center;
}

.progress-bar {
    height: 3px;
    background: var(--chochin-gold);
    border-radius: 1px;
    width: 0%;
    transition: width 1s ease;
    box-shadow: 0 0 8px rgba(232, 166, 48, 0.3);
}

.progress-text {
    font-size: 0.7rem;
    color: var(--muted-steel);
    margin-top: 0.5rem;
}

/* Season Module */
.module-season {
    grid-column: 5 / 8;
    grid-row: 5 / 7;
    align-items: center;
    justify-content: center;
}

.season-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.season-kanji {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--warm-parchment);
}

.season-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.75rem;
    color: var(--muted-steel);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.season-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
    margin-top: 0.5rem;
}

/* Binary Module */
.module-binary {
    grid-column: 8 / 13;
    grid-row: 5 / 7;
}

.binary-display {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3px;
    flex: 1;
    align-content: center;
}

.binary-bit {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--module-bg);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.binary-bit.on {
    background: var(--indigo-accent);
    box-shadow: 0 0 6px rgba(75, 61, 143, 0.6);
}

/* Year Module */
.module-year {
    grid-column: 1 / 5;
    grid-row: 7 / 9;
    align-items: center;
    justify-content: center;
}

.era-year {
    font-family: 'Caveat', cursive;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--torii-red);
    line-height: 1;
}

.era-western {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--muted-steel);
    margin-top: 0.3rem;
}

/* Stream Module */
.module-stream {
    grid-column: 5 / 13;
    grid-row: 7 / 9;
}

#stream-canvas {
    flex: 1;
    width: 100%;
}

/* Subtle ambient animation */
@keyframes glow-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hero-counter {
    animation: glow-pulse 4s ease-in-out infinite;
}
