/* =========================================================
ONE MORE SECOND
HARITHA'S BOREDOM LAB — GAME 006
========================================================= */

:root {
--game-bg: #03050a;
--game-surface: #080b12;

--game-text: #ffffff;
--game-muted: rgba(255, 255, 255, 0.4);
--game-faint: rgba(255, 255, 255, 0.18);

--game-blue: #4b8dff;
--game-blue-soft: rgba(75, 141, 255, 0.14);

--game-border: rgba(255, 255, 255, 0.1);

--instrument-glow:
rgba(75, 141, 255, 0.22);
}

/* =========================================================
RESET
========================================================= */

*,
*::before,
*::after {
box-sizing: border-box;
}

html,
body {
margin: 0;

width: 100%;
min-height: 100%;

background:
var(--game-bg);

color:
var(--game-text);

font-family:
Arial,
Helvetica,
sans-serif;
}

body {
overflow: hidden;
}

button,
a {
font: inherit;
}

/* =========================================================
SHELL
========================================================= */

.game-shell {
position: relative;

width: 100vw;
height: 100vh;

min-height: 650px;

overflow: hidden;

background:
radial-gradient(
circle at 50% 50%,
rgba(75, 141, 255, 0.045),
transparent 40%
),
var(--game-bg);
}

/* =========================================================
BACKGROUND GRID
========================================================= */

.game-shell::before {
content: "";

position: absolute;

inset: 0;

background-image:
linear-gradient(
rgba(255, 255, 255, 0.022) 1px,
transparent 1px
),
linear-gradient(
90deg,
rgba(255, 255, 255, 0.022) 1px,
transparent 1px
);

background-size:
60px 60px;

mask-image:
radial-gradient(
ellipse at center,
black 5%,
transparent 78%
);

pointer-events: none;
}

/* =========================================================
SCANLINES
========================================================= */

.game-shell::after {
content: "";

position: absolute;

inset: 0;

background:
repeating-linear-gradient(
to bottom,
transparent 0,
transparent 5px,
rgba(255, 255, 255, 0.01) 6px
);

opacity: 0.35;

pointer-events: none;
}

/* =========================================================
HEADER
========================================================= */

.game-header {
position: absolute;

z-index: 30;

top: 0;
left: 0;
right: 0;

height: 82px;

padding:
0 35px;

display: flex;

align-items: center;

justify-content: space-between;

border-bottom:
1px solid
var(--game-border);

background:
rgba(3, 5, 10, 0.72);

backdrop-filter:
blur(15px);
}

.game-brand {
display: flex;

align-items: center;

gap: 12px;

color: #ffffff;

text-decoration: none;

font-family: monospace;

font-size: 8px;

letter-spacing: 0.15em;
}

.brand-mark {
width: 34px;
height: 34px;

display: grid;

place-items: center;

border:
1px solid
rgba(255, 255, 255, 0.25);

font-size: 9px;

font-weight: 800;

letter-spacing: -0.08em;
}

.game-header-info {
position: absolute;

left: 50%;

transform:
translateX(-50%);

display: flex;

align-items: center;

gap: 12px;

font-family: monospace;

font-size: 7px;

letter-spacing: 0.16em;

color:
rgba(255, 255, 255, 0.3);
}

.separator {
color:
var(--game-blue);
}

.exit-game {
color:
rgba(255, 255, 255, 0.4);

text-decoration: none;

font-family: monospace;

font-size: 8px;

letter-spacing: 0.16em;

transition:
color 0.2s ease;
}

.exit-game:hover {
color: #ffffff;
}

/* =========================================================
MAIN
========================================================= */

.game-main {
position: relative;

z-index: 5;

width: 100%;
height: 100%;

display: grid;

place-items: center;
}

/* =========================================================
INTRO
========================================================= */

.timing-intro {
position: absolute;

z-index: 10;

width:
min(
800px,
90vw
);

text-align: center;

transition:
opacity 0.5s ease,
transform 0.5s ease,
visibility 0.5s ease;
}

.timing-intro.hidden {
opacity: 0;

transform:
translateY(-25px);

visibility: hidden;

pointer-events: none;
}

.game-label {
display: block;

margin-bottom: 28px;

font-family: monospace;

font-size: 8px;

letter-spacing: 0.22em;

color:
var(--game-blue);
}

.timing-intro h1 {
margin: 0;

font-size:
clamp(
4.5rem,
12vw,
11rem
);

line-height: 0.76;

letter-spacing: -0.1em;

font-weight: 800;
}

.timing-intro h1 em {
color: transparent;

-webkit-text-stroke:
1px
rgba(255, 255, 255, 0.4);

font-style: normal;

font-weight: 300;
}

.timing-intro p {
margin:
38px
auto
0;

font-size: 13px;

line-height: 1.9;

color:
var(--game-muted);
}

.timing-intro p strong {
color:
rgba(255, 255, 255, 0.8);

font-family: monospace;

font-weight: 400;
}

/* =========================================================
START BUTTON
========================================================= */

.start-button {
min-width: 170px;

margin-top: 40px;

padding:
17px
25px;

display: inline-flex;

align-items: center;

justify-content: center;

gap: 25px;

border:
1px solid
rgba(255, 255, 255, 0.22);

background: transparent;

color: #ffffff;

cursor: pointer;

font-family: monospace;

font-size: 8px;

letter-spacing: 0.18em;

transition:
background 0.25s ease,
border-color 0.25s ease,
transform 0.25s ease;
}

.start-button span {
color:
var(--game-blue);

font-size: 15px;

transition:
transform 0.25s ease;
}

.start-button:hover {
background:
var(--game-blue);

border-color:
var(--game-blue);

transform:
translateY(-3px);
}

.start-button:hover span {
color: #ffffff;

transform:
translateX(5px);
}

/* =========================================================
TIMING GAME
========================================================= */

.timing-game {
position: absolute;

inset: 0;

display: flex;

flex-direction: column;

align-items: center;

justify-content: center;

opacity: 0;

visibility: hidden;

transition:
opacity 0.5s ease,
visibility 0.5s ease;
}

.timing-game.active {
opacity: 1;

visibility: visible;
}

/* =========================================================
STATUS
========================================================= */

.timing-status {
position: absolute;

top: 122px;

left: 50%;

transform:
translateX(-50%);

font-family: monospace;

font-size: 8px;

letter-spacing: 0.2em;

color:
rgba(255, 255, 255, 0.4);

white-space: nowrap;
}

.timing-status::before {
content: "●";

margin-right: 8px;

color:
var(--game-blue);

font-size: 7px;
}

/* =========================================================
TARGET DISPLAY
========================================================= */

.target-display {
position: absolute;

top: 118px;

left: 40px;

display: flex;

flex-direction: column;

gap: 5px;
}

.target-display span {
font-family: monospace;

font-size: 6px;

letter-spacing: 0.16em;

color:
rgba(255, 255, 255, 0.2);
}

.target-display strong {
font-family: monospace;

font-size: 21px;

font-weight: 400;

letter-spacing: -0.04em;

color:
rgba(255, 255, 255, 0.72);
}

/* =========================================================
TIMER
========================================================= */

.timer-display {
position: relative;

font-family:
"Courier New",
Courier,
monospace;

font-size:
clamp(
5rem,
14vw,
12rem
);

line-height: 1;

letter-spacing: -0.08em;

font-weight: 300;

color:
rgba(255, 255, 255, 0.92);

text-shadow:
0 0 40px
rgba(75, 141, 255, 0.08);

font-variant-numeric:
tabular-nums;
}

.timer-display.running {
color:
#ffffff;
}

.timer-display.near-target {
color:
rgba(255, 255, 255, 0.95);

text-shadow:
0 0 45px
rgba(75, 141, 255, 0.18);
}

/* =========================================================
PRECISION SCALE
========================================================= */

.precision-scale {
width:
min(
620px,
75vw
);

margin-top: 25px;

display: flex;

align-items: center;

gap: 15px;

font-family: monospace;

font-size: 6px;

color:
rgba(255, 255, 255, 0.2);
}

.scale-start,
.scale-end {
flex: 0 0 auto;
}

.scale-track {
position: relative;

flex: 1;

height: 3px;

background:
rgba(255, 255, 255, 0.08);
}

.scale-progress {
position: absolute;

left: 0;
top: 0;
bottom: 0;

width: 0%;

background:
var(--game-blue);

box-shadow:
0 0 15px
rgba(75, 141, 255, 0.35);

transition:
width 0.05s linear;
}

.target-marker {
position: absolute;

top: 50%;

right: 0;

width: 1px;

height: 12px;

transform:
translateY(-50%);

background:
rgba(255, 255, 255, 0.7);
}

.target-marker::before {
content: "10.00";

position: absolute;

right: -2px;

bottom: 17px;

transform:
translateX(50%);

font-size: 6px;

color:
rgba(255, 255, 255, 0.28);
}

/* =========================================================
MAIN TIMING BUTTON
========================================================= */

.timing-button {
position: relative;

width: 190px;
height: 190px;

margin-top: 45px;

display: flex;

flex-direction: column;

align-items: center;

justify-content: center;

gap: 8px;

border:
1px solid
rgba(255, 255, 255, 0.22);

border-radius: 50%;

background:
radial-gradient(
circle,
rgba(255, 255, 255, 0.07),
rgba(255, 255, 255, 0.015) 65%
);

color:
#ffffff;

cursor: pointer;

box-shadow:
0 0 0 12px
rgba(255, 255, 255, 0.015),
0 0 0 13px
rgba(255, 255, 255, 0.05);

transition:
transform 0.12s ease,
border-color 0.2s ease,
box-shadow 0.2s ease,
background 0.2s ease;
}

.timing-button::before {
content: "";

position: absolute;

inset: 15px;

border:
1px solid
rgba(255, 255, 255, 0.07);

border-radius: 50%;

pointer-events: none;
}

.timing-button:hover {
border-color:
rgba(75, 141, 255, 0.65);

box-shadow:
0 0 0 12px
rgba(75, 141, 255, 0.025),
0 0 0 13px
rgba(75, 141, 255, 0.12),
0 0 45px
rgba(75, 141, 255, 0.1);
}

.timing-button:active {
transform:
scale(0.96);
}

.timing-button.running {
border-color:
rgba(75, 141, 255, 0.55);

box-shadow:
0 0 0 12px
rgba(75, 141, 255, 0.025),
0 0 0 13px
rgba(75, 141, 255, 0.12),
0 0 60px
rgba(75, 141, 255, 0.12);
}

.timing-button.finished {
animation:
buttonFinish 0.4s ease;
}

@keyframes buttonFinish {

0% {
transform:
scale(1);
}

40% {
transform:
scale(0.94);
}

100% {
transform:
scale(1);
}

}

.button-id {
font-family: monospace;

font-size: 6px;

letter-spacing: 0.15em;

color:
rgba(255, 255, 255, 0.2);
}

.timing-button strong {
font-family: monospace;

font-size: 13px;

letter-spacing: 0.15em;

font-weight: 400;
}

.button-hint {
font-family: monospace;

font-size: 6px;

letter-spacing: 0.18em;

color:
rgba(255, 255, 255, 0.25);
}

/* =========================================================
MESSAGE
========================================================= */

.timing-message {
position: absolute;

bottom: 100px;

left: 50%;

transform:
translateX(-50%);

font-family: monospace;

font-size: 7px;

letter-spacing: 0.2em;

color:
rgba(255, 255, 255, 0.25);

white-space: nowrap;

transition:
color 0.25s ease;
}

.timing-message.highlight {
color:
var(--game-blue);
}

.timing-message.perfect {
color:
#ffffff;

text-shadow:
0 0 20px
rgba(75, 141, 255, 0.25);
}

/* =========================================================
ATTEMPT
========================================================= */

.attempt-display {
position: absolute;

right: 40px;

top: 118px;

display: flex;

flex-direction: column;

align-items: flex-end;

gap: 5px;
}

.attempt-display span {
font-family: monospace;

font-size: 6px;

letter-spacing: 0.16em;

color:
rgba(255, 255, 255, 0.2);
}

.attempt-display strong {
font-family: monospace;

font-size: 18px;

font-weight: 400;

color:
rgba(255, 255, 255, 0.7);
}

/* =========================================================
RESULT
========================================================= */

.timing-result {
position: absolute;

z-index: 15;

width:
min(
750px,
90vw
);

text-align: center;

opacity: 0;

visibility: hidden;

transform:
translateY(25px);

transition:
opacity 0.5s ease,
transform 0.5s ease,
visibility 0.5s ease;
}

.timing-result.active {
opacity: 1;

visibility: visible;

transform:
translateY(0);
}

.result-label {
display: block;

margin-bottom: 22px;

font-family: monospace;

font-size: 8px;

letter-spacing: 0.2em;

color:
var(--game-blue);
}

.timing-result h2 {
margin: 0;

font-size:
clamp(
4rem,
9vw,
8rem
);

line-height: 0.85;

letter-spacing: -0.08em;

font-weight: 800;
}

/* =========================================================
RESULT TIME
========================================================= */

.result-time {
margin-top: 35px;

display: flex;

flex-direction: column;

align-items: center;

gap: 7px;
}

.result-time span,
.result-time small,
.result-difference span {
font-family: monospace;

font-size: 6px;

letter-spacing: 0.16em;

color:
rgba(255, 255, 255, 0.25);
}

.result-time strong {
font-family:
"Courier New",
Courier,
monospace;

font-size:
clamp(
3rem,
6vw,
5rem
);

font-weight: 300;

letter-spacing: -0.06em;

font-variant-numeric:
tabular-nums;
}

.result-time small {
font-size: 5px;
}

/* =========================================================
DIFFERENCE
========================================================= */

.result-difference {
margin:
25px
auto
0;

padding:
15px
25px;

width:
min(
320px,
80vw
);

display: flex;

flex-direction: column;

gap: 8px;

border-top:
1px solid
var(--game-border);

border-bottom:
1px solid
var(--game-border);
}

.result-difference strong {
font-family: monospace;

font-size: 17px;

font-weight: 400;

color:
rgba(255, 255, 255, 0.75);
}

/* =========================================================
RESULT MESSAGE
========================================================= */

.timing-result p {
margin:
28px
auto
0;

font-size: 13px;

color:
var(--game-muted);
}

/* =========================================================
RESULT ACTIONS
========================================================= */

.result-actions {
display: flex;

justify-content: center;

gap: 10px;

margin-top: 35px;
}

.result-button {
min-width: 150px;

padding:
15px
20px;

border:
1px solid
rgba(255, 255, 255, 0.17);

background: transparent;

color:
rgba(255, 255, 255, 0.65);

text-decoration: none;

cursor: pointer;

font-family: monospace;

font-size: 7px;

letter-spacing: 0.15em;

transition:
background 0.25s ease,
border-color 0.25s ease,
color 0.25s ease;
}

.result-button:hover,
.result-button.primary {
color: #ffffff;

border-color:
var(--game-blue);
}

.result-button.primary:hover {
background:
var(--game-blue);
}

/* =========================================================
FOOTER
========================================================= */

.game-footer {
position: absolute;

z-index: 30;

left: 35px;
right: 35px;
bottom: 22px;

display: flex;

align-items: center;

justify-content: space-between;

font-family: monospace;

font-size: 6px;

letter-spacing: 0.15em;

color:
rgba(255, 255, 255, 0.18);
}

/* =========================================================
GAME ENTRY
========================================================= */

.timing-game.active
.target-display {
animation:
targetEnter 0.5s ease;
}

.timing-game.active
.timer-display {
animation:
timerEnter 0.55s ease 0.05s both;
}

.timing-game.active
.timing-button {
animation:
controlEnter 0.55s ease 0.12s both;
}

@keyframes targetEnter {

from {
opacity: 0;


transform:
  translateX(-10px);


}

to {
opacity: 1;


transform:
  translateX(0);


}

}

@keyframes timerEnter {

from {
opacity: 0;


transform:
  scale(0.96);


}

to {
opacity: 1;


transform:
  scale(1);


}

}

@keyframes controlEnter {

from {
opacity: 0;


transform:
  scale(0.9);


}

to {
opacity: 1;


transform:
  scale(1);


}

}

/* =========================================================
RESPONSIVE
========================================================= */

@media (max-width: 800px) {

.game-header {
height: 70px;


padding:
  0 20px;


}

.game-header-info {
display: none;
}

.timing-status {
top: 100px;
}

.target-display {
top: 100px;


left: 20px;


}

.attempt-display {
top: 100px;


right: 20px;


}

.timer-display {
font-size:
clamp(
4.5rem,
18vw,
8rem
);
}

.precision-scale {
width: 82vw;
}

.timing-button {
width: 165px;
height: 165px;


margin-top: 38px;


}

.timing-message {
bottom: 88px;
}

.game-footer {
left: 20px;
right: 20px;
}

.game-footer span:nth-child(2) {
display: none;
}

.result-actions {
flex-direction: column;


align-items: center;


}

.result-button {
width: 200px;
}

}

@media (max-width: 500px) {

.timing-intro h1 {
font-size:
4.5rem;
}

.timing-intro p {
font-size: 12px;
}

.target-display strong {
font-size: 17px;
}

.attempt-display strong {
font-size: 15px;
}

.timer-display {
font-size: 4.4rem;
}

.precision-scale {
margin-top: 20px;
}

.timing-button {
width: 145px;
height: 145px;


margin-top: 30px;


}

.timing-button strong {
font-size: 11px;
}

.timing-message {
bottom: 82px;
}

.timing-result h2 {
font-size: 3.8rem;
}

.result-time strong {
font-size: 3rem;
}

}

@media (prefers-reduced-motion: reduce) {

.timing-button.finished,
.timing-game.active
.target-display,
.timing-game.active
.timer-display,
.timing-game.active
.timing-button {
animation: none;
}

}
