
/* ========================================
   PERFECT10 - CYBER DIGITAL THEME
======================================== */

:root {
    --bg: #070d18;
    --panel: #0d1929;
    --panel-light: #12243a;
    --border: #1b3b50;

    --cyan: #00d9ff;
    --green: #00f5b8;
    --blue: #397bff;
    --muted: #718ba3;
    --white: #eaf7ff;

    --glow-green: 0 0 12px rgba(0, 245, 184, 0.45);
    --glow-cyan: 0 0 12px rgba(0, 217, 255, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    background:
        radial-gradient(ellipse at 50% 0%, #142d48 0%, transparent 55%),
        var(--bg);
    color: var(--white);
    min-height: 100vh;
}

/* ========================================
   CONTAINER
======================================== */

.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 30px 18px 40px;
}

/* ========================================
   HEADER
======================================== */

.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--white);
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.2);
}

.header h1 span {
    color: var(--green);
    text-shadow: var(--glow-green);
}

.subtitle {
    margin-top: 9px;
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--muted);
}

/* ========================================
   GAME CARD
======================================== */

.game-card {
    position: relative;
    overflow: hidden;

    background:
        linear-gradient(145deg, #10243a, #091321 65%);

    color: var(--white);

    border: 1px solid var(--border);
    border-radius: 18px;

    padding: 30px 20px;

    text-align: center;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.game-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 20%;
    width: 60%;
    height: 1px;
    background: var(--cyan);
    box-shadow: 0 0 15px var(--cyan);
}

/* ========================================
   TARGET
======================================== */

.target-label {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 3px;
}

.target-time {
    font-family: Consolas, monospace;
    font-size: 38px;
    font-weight: bold;
    margin-top: 7px;
    color: var(--white);
    text-shadow: 0 0 12px rgba(0, 217, 255, 0.2);
}

/* ========================================
   TIMER
======================================== */

.timer-area {
    margin-top: 28px;
    min-height: 105px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(2, 10, 20, 0.65);

    border: 1px solid #17394b;
    border-radius: 12px;

    box-shadow:
        inset 0 0 20px rgba(0, 0, 0, 0.4);
}

.timer {
    font-family: Consolas, "Courier New", monospace;

    font-size: clamp(60px, 16vw, 76px);
    font-weight: bold;

    letter-spacing: -3px;
    font-variant-numeric: tabular-nums;

    color: var(--green);

    text-shadow:
        0 0 8px rgba(0, 245, 184, 0.7),
        0 0 25px rgba(0, 245, 184, 0.35);

    transition: opacity 0.2s;
}

.timer.hidden {
    opacity: 0;
}

/* ========================================
   STATUS
======================================== */

.status {
    min-height: 20px;
    margin: 16px 0 20px;

    font-size: 11px;
    letter-spacing: 1px;

    color: var(--cyan);
}

/* ========================================
   STOP BUTTON
======================================== */

.stop-button {
    width: 100%;
    padding: 17px;

    border: 1px solid #ff397f;
    border-radius: 10px;

    background: linear-gradient(135deg, #a9164d, #6d1239);

    color: #ffffff;

    font-size: 18px;
    font-weight: 800;
    letter-spacing: 4px;

    cursor: pointer;

    box-shadow:
        0 0 12px rgba(255, 57, 127, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    transition: all 0.2s;
}

.stop-button:active {
    transform: scale(0.98);
    box-shadow: 0 0 20px rgba(255, 57, 127, 0.55);
}

/* ========================================
   BUTTON DISABLED
======================================== */

button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    box-shadow: none;
}

/* ========================================
   RESULT
======================================== */

.result-area {
    min-height: 85px;
    margin-top: 25px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    border-top: 1px solid var(--border);

    padding-top: 18px;
}

.result-label {
    font-size: 9px;
    letter-spacing: 3px;
    color: var(--muted);
}

.result-message {
    margin-top: 8px;

    font-size: 19px;
    font-weight: 900;
    letter-spacing: 2px;

    color: var(--green);
    text-shadow: var(--glow-green);
}

.result-detail {
    margin-top: 6px;
    font-family: Consolas, monospace;
    font-size: 13px;
    color: var(--cyan);
}

/* ========================================
   CONTROL BUTTONS
======================================== */

.control-area {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.control-area button {
    flex: 1;

    padding: 15px 10px;

    border-radius: 10px;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;

    cursor: pointer;
    transition: all 0.2s;
}

.start-button {
    border: 1px solid var(--cyan);

    background: linear-gradient(135deg, #087caa, #075078);

    color: #ffffff;

    box-shadow:
        0 0 12px rgba(0, 217, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.start-button:active {
    transform: scale(0.97);
    box-shadow: var(--glow-cyan);
}

.reset-button {
    border: 1px solid #36536b;
    background: #14273b;
    color: #a8c2d8;
}

.reset-button:active {
    background: #203b55;
}

/* ========================================
   HISTORY
======================================== */

.history-section {
    margin-top: 38px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.history-header h2 {
    font-size: 15px;
    letter-spacing: 3px;
    color: var(--white);
}

.history-header span {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--muted);
}

/* ========================================
   STATS
======================================== */

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.stat-card {
    background: linear-gradient(145deg, #11243a, #0b1727);

    border: 1px solid var(--border);
    border-radius: 11px;

    padding: 15px;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card span {
    font-size: 9px;
    letter-spacing: 2px;
    color: var(--muted);
}

.stat-card strong {
    font-family: Consolas, monospace;
    font-size: 23px;
    color: var(--cyan);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

/* ========================================
   HISTORY LIST
======================================== */

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.empty-history {
    text-align: center;

    padding: 25px;

    color: var(--muted);
    font-size: 12px;

    background: #0c1929;

    border: 1px solid var(--border);
    border-radius: 10px;
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #0e1d30;

    border: 1px solid #19364b;
    border-radius: 9px;

    padding: 14px 16px;
}

.history-number {
    font-family: Consolas, monospace;
    font-size: 11px;
    color: var(--muted);
    width: 35px;
}

.history-time {
    flex: 1;

    font-family: Consolas, monospace;
    font-size: 18px;
    font-weight: bold;

    color: var(--white);
}

.history-diff {
    font-family: Consolas, monospace;
    font-size: 13px;
    font-weight: bold;
}

.history-diff.perfect {
    color: var(--green);
    text-shadow: var(--glow-green);
}

.history-diff.normal {
    color: #7e9bb4;
}

/* ========================================
   FOOTER
======================================== */

footer {
    text-align: center;
    margin-top: 40px;

    color: #47627a;

    font-size: 9px;
    letter-spacing: 4px;
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 360px) {

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .game-card {
        padding: 24px 15px;
    }

    .header h1 {
        font-size: 31px;
    }
}
