/* ==========================================================
   DOOM theme — dark stone + green backlit stained glass
   Effect: neumorphism ("soft UI") on dark stone +
           neon glow (layered box-shadow / text-shadow)
   ========================================================== */
:root {
    --doom-bg: #070a08;
    --doom-stone1: #161c18;
    --doom-stone2: #090c0a;
    --doom-light: rgba(150, 230, 120, .07);   /* soft top-left highlight */
    --doom-dark: #000;                         /* soft bottom-right shadow */
    --doom-glow: #9dff7a;
    --doom-text: #d4f9bf;
    --fc5: #9dff7a;
}

/* smooth switching between themes */
body, section {
    transition: background-color .6s ease;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url(doom-glass.svg) center / cover no-repeat;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    z-index: -2;
}
/* big letter shadow */
body::after {
    content: 'A';
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Satisfy', cursive;
    font-weight: 400;
    font-size: min(120vh, 110vw);
    line-height: 1;
    padding-top: 0;
    color: rgba(0, 0, 0, .28);
    -webkit-text-stroke: 1px rgba(157, 255, 122, .05);
    text-shadow: 0 0 40px rgba(0, 0, 0, .35), 0 0 120px rgba(0, 0, 0, .25);
    filter: blur(1.5px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease;
    z-index: -1;
}
body.doom::after {
    opacity: 1;
}

/* ---------- background ---------- */
body.doom, .doom section {
    background-color: var(--doom-bg);
}
.doom section {
    background-color: transparent;
}
body.doom::before {
    opacity: 1;
    animation: doomBreath 7s ease-in-out infinite;
}
body.doom > img {
    display: none;
}
@keyframes doomBreath {
    0%, 100% { filter: brightness(.85); }
    50%      { filter: brightness(1.08); }
    52%      { filter: brightness(.95); }
    54%      { filter: brightness(1.06); }
}

/* ---------- fonts ---------- */
.doom section h2,
.doom section h2 *,
.doom .countdown div,
.doom .text,
.doom h4 {
    font-family: 'Orbitron', sans-serif;
}

/* ---------- the big circle (neumorphic stone) ---------- */
.doom section .box:before {
    opacity: .35;
}
.doom section .circle {
    background: linear-gradient(135deg, var(--doom-stone1), var(--doom-stone2));
    box-shadow:
        -10px -10px 24px var(--doom-light),
         14px  14px 34px var(--doom-dark),
         0 0 60px rgba(120, 230, 90, .18),
         inset 0 0 0 1px rgba(160, 255, 120, .08);
    transition: box-shadow .3s ease;
}
.doom section .circle:before {
    background: linear-gradient(315deg, #141a16, #080b09);
    box-shadow:
        inset 0 0 0 1px rgba(160, 255, 120, .06),
        inset 0 0 40px rgba(0, 0, 0, .7);
    transition: .2s;
}
.doom section .circle.poppuf:before {
    background: linear-gradient(135deg, #141a16, #080b09);
}
.doom section .circle:hover {
    box-shadow:
        -10px -10px 24px var(--doom-light),
         14px  14px 34px var(--doom-dark),
         0 0 90px rgba(140, 255, 100, .28),
         inset 0 0 0 1px rgba(160, 255, 120, .14);
}

/* ---------- glowing text ---------- */
.doom section h2 {
    color: var(--doom-text);
    font-size: 2.3em;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    line-height: 1.5;
    text-shadow:
        0 0 4px var(--doom-glow),
        0 0 14px rgba(120, 240, 80, .7),
        0 0 32px rgba(90, 210, 60, .45);
    transition: font-size .2s;
}
.doom section .poppuf h2 {
    font-size: 2.4em;
}
.doom span#year {
    font-size: 1.2em;
    letter-spacing: .25em;
}
.doom span#year em,
.doom .countdown #second {
    color: transparent;
    -webkit-text-fill-color: transparent;
    -webkit-text-stroke: 1px var(--doom-glow);
    text-shadow: 0 0 12px rgba(140, 255, 100, .55);
}
.doom .countdown div {
    color: var(--doom-text);
    -webkit-text-fill-color: var(--doom-text);
    -webkit-text-stroke-width: 0;
    font-size: 1.6em;
    font-weight: 500;
    text-shadow:
        0 0 4px var(--doom-glow),
        0 0 12px rgba(120, 240, 80, .55);
}
.doom .countdown div:before,
.doom .countdown #second:before {
    font-size: .55rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(190, 240, 170, .65);
    -webkit-text-fill-color: rgba(190, 240, 170, .65);
    -webkit-text-stroke-width: 0;
    text-shadow: none;
    bottom: -30px;
}

/* ---------- clock hands ---------- */
.doom .clock:before {
    background-color: var(--doom-glow);
    box-shadow: 0 0 10px var(--doom-glow), 0 0 24px rgba(120, 240, 80, .6);
}
.doom .hr:before,
.doom .mn:before {
    background: linear-gradient(to top, #0d120f, #1e2a21);
    border: 1px solid rgba(157, 255, 122, .55);
    box-shadow:
        0 0 6px rgba(157, 255, 122, .55),
        inset 0 0 4px rgba(157, 255, 122, .25);
}
.doom .sc:before {
    background-color: var(--doom-glow);
    box-shadow: 0 0 8px var(--doom-glow), 0 0 16px rgba(120, 240, 80, .6);
}

/* ---------- floating embers ---------- */
.doom section i {
    background-color: var(--doom-glow);
    border: none;
    box-shadow: 0 0 8px var(--doom-glow), 0 0 16px rgba(120, 240, 80, .5);
    animation: animate linear infinite, doomFlicker 2.4s ease-in-out infinite;
}
.doom section i:nth-child(3n+1) {
    background-color: transparent;
    border: 1px solid rgba(157, 255, 122, .7);
    box-shadow: 0 0 6px rgba(157, 255, 122, .4);
}
.doom section i:nth-child(n+90) {
    display: none;
}
@keyframes doomFlicker {
    0%, 100% { filter: brightness(1); }
    50%      { filter: brightness(.45); }
}

/* ---------- theme buttons (radio indicators) ---------- */
.doom .label {
    color: var(--doom-text);
}
.doom .indicator {
    background-color: #0d110e;
    box-shadow: -4px -4px 8px 0 rgba(150, 230, 120, .06), 4px 4px 12px 0 #000;
}
.doom .indicator::before {
    box-shadow: -4px -2px 4px 0 #000, 4px 2px 8px 0 rgba(150, 230, 120, .07);
}
.doom .indicator::after {
    background-color: #0d110e;
    box-shadow: -3px -3px 4px 0 rgba(150, 230, 120, .07), 5px 5px 8px 0 #000;
}
.doom .state:checked ~ .label .indicator {
    box-shadow:
        -4px -4px 8px 0 rgba(150, 230, 120, .06),
         4px 4px 12px 0 #000,
         0 0 14px rgba(157, 255, 122, .45),
         inset 0 0 0 1px rgba(157, 255, 122, .35);
}
.doom .text {
    letter-spacing: .1em;
    text-shadow: 0 0 6px rgba(157, 255, 122, .6);
}

.wrapper:nth-child(4) .indicator {
    animation: lefting .4s ease;
    animation-iteration-count: 1;
    animation-delay: 2.6s;
    animation-fill-mode: forwards;
    transform: scale(1.2);
}

/* ---------- signature ---------- */
.doom h4 {
    color: var(--doom-text);
    font-size: .7em;
    letter-spacing: .3em;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(157, 255, 122, .6);
}
.doom #touch {
    display: none;
}

/* ---------- fireworks in green ---------- */
body.doom #fireworks:before, body.doom #fireworks:after {
    animation: 1s bang ease-out infinite backwards,
               1s gravity ease-in infinite backwards,
               5s position linear infinite backwards;
    box-shadow: -120px 0 var(--fc5), 120px 0 var(--fc5), 0 120px var(--fc5), 0 -120px var(--fc5),
                45px 45px var(--fc5), -45px 45px var(--fc5), 85px 85px var(--fc5), -85px 85px var(--fc5),
                45px -45px var(--fc5), -45px -45px var(--fc5), 85px -85px var(--fc5), -85px -85px var(--fc5),
                65px 0 var(--fc5), -65px 0 var(--fc5), 0 65px var(--fc5), 0 -65px var(--fc5),
                100px 45px var(--fc5), -100px 45px var(--fc5), -50px 100px var(--fc5), 50px 100px var(--fc5),
                100px -45px var(--fc5), -100px -45px var(--fc5), -50px -100px var(--fc5), 50px -100px var(--fc5),
                5px 10px var(--fc5);
    filter: drop-shadow(0 0 4px var(--fc5));
}
body.doom #fireworks:after {
    animation-delay: 1.25s, 1.25s, 1.25s;
    animation-duration: 1.25s, 1.25s, 6.25s;
}

/* ---------- mobile: room for 4 buttons ---------- */
@media only screen and (max-width: 600px) {
    .radiogroup {
        width: 100%;
        max-width: 420px;
        padding: 24px 56px 24px 16px; /* room for the last label */
    }
    .wrapper {
        margin: 12px 10px;
    }
    .doom section h2 {
        font-size: 1.8em;
    }
}

/* ==========================================================
   DOOM clock screen: flat countdown row, no circle
   ========================================================== */
.dm-count { display: none; }
.doom #circle2 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}
.doom #circle2:before { display: none; }
.doom #circle2 .clock,
.doom #circle2 .timer-box { opacity: 0; }
.doom #box2:before { display: none; }
.doom .dm-count {
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--doom-text);
    font-family: 'Orbitron', 'Arial Black', sans-serif;
    pointer-events: none;
    white-space: nowrap;
}
/* soft dark haze so the numbers read clearly over the glass */
.doom .dm-count::before {
    content: '';
    position: absolute;
    inset: -110px -160px;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(2, 5, 3, .82) 0%, rgba(2, 5, 3, .55) 45%, transparent 72%);
}
.dm-cap {
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .5em;
    text-transform: uppercase;
    color: rgba(190, 240, 170, .75);
    margin-bottom: 26px;
    text-shadow: 0 0 8px rgba(120, 240, 80, .45);
}
.dm-row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.dm-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 2.2ch;
}
.dm-num {
    font-size: 88px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
    color: var(--doom-text);
    text-shadow:
        0 0 4px var(--doom-glow),
        0 0 16px rgba(120, 240, 80, .55),
        0 0 40px rgba(90, 210, 60, .35);
}
.dm-sep {
    font-size: 68px;
    font-weight: 700;
    line-height: 1.15;
    margin: 0 .2em;
    color: rgba(190, 240, 170, .6);
    text-shadow: 0 0 10px rgba(120, 240, 80, .4);
    animation: dmBlink 1s steps(1) infinite;
}
@keyframes dmBlink { 50% { opacity: .4; } }
.dm-lbl {
    margin-top: 16px;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: .38em;
    margin-right: -.38em;
    text-transform: uppercase;
    color: rgba(190, 240, 170, .7);
}
.doom #circle2.popbig .dm-count { transform: translate(-50%, -50%) scale(.98); }

@media only screen and (max-width: 600px) {
    .dm-num { font-size: 46px; }
    .dm-sep { font-size: 34px; margin: 0 .15em; }
    .dm-lbl { font-size: 11px; letter-spacing: .25em; margin-right: -.25em; margin-top: 10px; }
    .dm-cap { font-size: 12px; letter-spacing: .35em; margin-bottom: 18px; }
}

/* fixed-width digit slots (Orbitron digits have different widths) */
.dm-num { display: flex; justify-content: center; letter-spacing: 0; }
.dm-num b { display: inline-block; width: .8em; text-align: center; font-weight: 900; }
@media only screen and (min-width: 601px) and (max-width: 1150px) {
    .dm-num { font-size: 70px; }
    .dm-sep { font-size: 54px; }
    .dm-lbl { font-size: 13px; }
}
