
body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    text-align: center;
    background: #101116;
    color: #f1f1f4;
}

h1 {
    margin: 0 0 24px;
}


.game-title img {
    display: block;
    width: min(100%, 360px);
    height: auto;
    margin: 0 auto;
}


#navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
}

#navigation button {
    padding: 9px 16px;
    background: #292c36;
    border: 1px solid #515563;
    border-radius: 7px;
    color: #f1f1f4;
    cursor: pointer;
    font-size: 14px;
}

#navigation button:hover:not(:disabled) {
    background: #393d49;
}

#navigation button:disabled {
    opacity: 0.35;
    cursor: default;
}

#puzzle-number {
    min-width: 92px;
    font-weight: bold;
}

#score {
    margin-top: 20px;
    font-size: 34px;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    color: #f0c45a;
}

#score.finished {
    color: #62d68c;
}

#progress {
    margin-top: 6px;
    font-size: 14px;
    color: #aeb2be;
}


#board {
    display: grid;
    grid-template-columns: repeat(7, 48px);
    grid-template-rows: repeat(7, 48px);
    gap: 4px;
    width: max-content;
    margin: 28px auto 12px;
}

.cell, .torch {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 24px;
}

.cell {
    background: #292c35;
    transition: background 0.15s ease;
}

.cell.obstacle {
    background: #626674;
}

.cell.flower {
    background: #243b30;
}

.cell.bat {
    background: #392b46;
}


.torch {
    position: relative;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 24px;
}

/* Small dot marking an available torch position */
.torch::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #777d8d;
    transition: background 0.15s ease, transform 0.15s ease;
}

.torch:hover:not(.selected)::before {
    background: #f0c45a;
    transform: scale(1.5);
}

/* Hide the dot when a torch is placed */
.torch.selected::before {
    display: none;
}

.torch.selected.first {
    color: #f2a93b;
}

.torch.selected.second {
    color: #e3cc62;
}





/* Directional illumination */

.cell {
    position: relative;
    overflow: hidden;
}

.cell-symbol {
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.beam-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Feedback on illuminated objects */

.cell.flower-lit {
    outline: 2px solid #62d68c;
    outline-offset: -3px;
}

.cell.bat-lit {
    background: #a83238;
    outline: 2px solid #ff6262;
    outline-offset: -3px;
}




#status {
    margin-top: 18px;
    font-size: 18px;
    font-weight: bold;
    color: #c5c8d1;
}

#status.won {
    color: #62d68c;
}


/* Game artwork */

.cell-symbol {
    position: relative;
    z-index: 2;
    width: 88%;
    height: 88%;
    object-fit: contain;
    pointer-events: none;
}

.torch-image {
    width: 90%;
    height: 90%;
    object-fit: contain;
    pointer-events: none;
}

.torch.selected::before {
    display: none;
}


/* Numbered puzzle navigation */

#puzzle-selector {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 5px;
    width: min(100%, 440px);
    margin: 16px auto 0;
}

.puzzle-box {
    aspect-ratio: 1;
    padding: 0;
    background: #292c36;
    border: 1px solid #515563;
    border-radius: 5px;
    color: #f1f1f4;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    box-sizing: border-box;
}

.puzzle-box.started {
    background: #b48a23;
}

.puzzle-box.solved {
    background: #247b50;
}

.puzzle-box.current {
    border: 4px solid #ffffff;
}

.puzzle-box:hover {
    filter: brightness(1.2);
}

/* Personal Gauntlet statistics */

#statistics {
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Completion modal */

#statistics-dialog {
    width: min(440px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px;
    box-sizing: border-box;
    border: 2px solid #6aaf80;
    border-radius: 12px;
    background: #1e2028;
    color: #f1f1f4;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5);
}

#statistics-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}

#statistics h2 {
    font-size: 20px;
    margin-bottom: 8px;
}

#statistics-summary {
    font-size: 14px;
    margin-bottom: 18px;
}

.histogram-row {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr) 28px;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.histogram-label {
    font-size: 12px;
    line-height: 1.4;
}

.histogram-label strong {
    display: block;
}

.histogram-track {
    height: 20px;
    background: #292c36;
    border-radius: 4px;
    overflow: hidden;
}

.histogram-bar {
    height: 100%;
    background: #6aaf80;
    border-radius: 4px;
}

.histogram-count {
    font-size: 14px;
    text-align: right;
    font-weight: bold;
}

/* Countdown to the next daily Gauntlet */

#next-gauntlet {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #515563;
    text-align: center;
}

.next-gauntlet-label {
    font-size: 14px;
    color: #b5b8c3;
    margin-bottom: 8px;
}

#gauntlet-countdown {
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 3px;
    font-variant-numeric: tabular-nums;
    color: #6aaf80;
}