:root {
    --bg-1: #050b12;
    --bg-2: #0a1017;
    --board-outer: #0e1115;
    --board-inner: #12191f;
    --panel-dark: #0d0d0f;
    --panel-light: #1d1d1f;
    --shadow-dark: rgba(0, 0, 0, 0.8);
    --shadow-soft: rgba(0, 0, 0, 0.35);
    --red-base: #ff3b30;
    --red-dark: #c81417;
    --green-base: #2ecc71;
    --green-dark: #129240;
    --blue-base: #1e90ff;
    --blue-dark: #0f5ecc;
    --yellow-base: #f5d300;
    --yellow-dark: #d7a600;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
    height: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top, #101820 0%, var(--bg-2) 28%, var(--bg-1) 55%, #000 100%);
    color: #fff;
    padding-top: 1rem;
}

.game-header {
    width: min(90vw, 700px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem 1rem 0;
}

.game-screen {
    width: min(90vw, 700px);
    display: grid;
    place-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
}

.simon-board {
    position: relative;
    width: min(76vw, 560px);
    aspect-ratio: 1;
    border-radius: 50%;
    background: linear-gradient(145deg, #171d22, #070b0f);
    border: 16px solid var(--board-outer);
    box-shadow:
        0 25px 45px rgba(0, 0, 0, 0.75),
        inset 0 12px 22px rgba(255, 255, 255, 0.08),
        inset 0 -10px 16px rgba(0, 0, 0, 0.55),
        0 0 0 4px rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.simon-board::before {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.18);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.04);
}

.pad {
    position: absolute;
    width: 50%;
    height: 50%;
    border: 0;
    cursor: pointer;
    box-shadow:
        inset 0 12px 18px rgba(255, 255, 255, 0.12),
        inset 0 -12px 18px rgba(0, 0, 0, 0.32),
        0 10px 18px rgba(0, 0, 0, 0.2);
    transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.pad:hover {
    filter: brightness(1.06);
}

.pad:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.7);
    outline-offset: -3px;
}

.pad.active {
    transform: scale(1.02);
    filter: brightness(1.9) saturate(1.7);
    box-shadow:
        inset 0 14px 22px rgba(255, 255, 255, 0.28),
        inset 0 -12px 18px rgba(0, 0, 0, 0.2),
        0 0 0 2px rgba(255, 255, 255, 0.08),
        0 0 14px rgba(255, 255, 255, 0.18),
        0 0 22px rgba(255, 255, 255, 0.12),
        0 10px 18px rgba(0, 0, 0, 0.25);
}

.pad-red.active {
    background: linear-gradient(135deg, #ff5b4d, #ff3b30 38%, #ff2727 100%);
    box-shadow:
        inset 0 14px 22px rgba(255, 255, 255, 0.32),
        inset 0 -12px 18px rgba(73, 0, 0, 0.22),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 0 14px rgba(255, 72, 72, 0.8),
        0 0 28px rgba(255, 41, 41, 0.95),
        0 0 42px rgba(255, 41, 41, 0.7),
        0 10px 18px rgba(0, 0, 0, 0.25);
}

.pad-green.active {
    background: linear-gradient(225deg, #48f08d, #2ecc71 38%, #1bb75a 100%);
    box-shadow:
        inset 0 14px 22px rgba(255, 255, 255, 0.32),
        inset 0 -12px 18px rgba(0, 44, 18, 0.22),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 0 14px rgba(73, 255, 138, 0.8),
        0 0 28px rgba(46, 204, 113, 0.96),
        0 0 42px rgba(46, 204, 113, 0.72),
        0 10px 18px rgba(0, 0, 0, 0.25);
}

.pad-blue.active {
    background: linear-gradient(315deg, #4da3ff, #1e90ff 38%, #0c78f2 100%);
    box-shadow:
        inset 0 14px 22px rgba(255, 255, 255, 0.32),
        inset 0 -12px 18px rgba(0, 28, 63, 0.22),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 0 14px rgba(96, 164, 255, 0.8),
        0 0 28px rgba(30, 144, 255, 0.94),
        0 0 42px rgba(30, 144, 255, 0.7),
        0 10px 18px rgba(0, 0, 0, 0.25);
}

.pad-yellow.active {
    background: linear-gradient(45deg, #ffd933, #f5d300 38%, #dca600 100%);
    box-shadow:
        inset 0 14px 22px rgba(255, 255, 255, 0.34),
        inset 0 -12px 18px rgba(67, 57, 0, 0.22),
        0 0 0 2px rgba(255, 255, 255, 0.1),
        0 0 14px rgba(255, 234, 101, 0.8),
        0 0 28px rgba(245, 211, 0, 0.94),
        0 0 42px rgba(245, 211, 0, 0.7),
        0 10px 18px rgba(0, 0, 0, 0.25);
}

.pad.active::before {
    background: rgba(255, 255, 255, 0.12);
    box-shadow:
        inset 0 0 28px rgba(255, 255, 255, 0.26),
        0 0 20px rgba(255, 255, 255, 0.2);
}

.pad.disabled {
    opacity: 0.85;
    pointer-events: none;
    filter: grayscale(0.15) brightness(0.8);
}

.pad-red {
    top: 0;
    left: 0;
    border-top-left-radius: 100%;
    background: linear-gradient(135deg, var(--red-base), var(--red-dark));
}

.pad-green {
    top: 0;
    right: 0;
    border-top-right-radius: 100%;
    background: linear-gradient(225deg, var(--green-base), var(--green-dark));
}

.pad-blue {
    bottom: 0;
    left: 0;
    border-bottom-left-radius: 100%;
    background: linear-gradient(315deg, var(--blue-base), var(--blue-dark));
}

.pad-yellow {
    bottom: 0;
    right: 0;
    border-bottom-right-radius: 100%;
    background: linear-gradient(45deg, var(--yellow-base), var(--yellow-dark));
}

.pad::before {
    content: "";
    position: absolute;
    inset: 12%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 25px rgba(255, 255, 255, 0.08);
}

.center-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38%;
    height: 38%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #2d2d2f, #090b0d 38%, #020405 75%);
    border: 12px solid rgba(13, 13, 17, 0.9);
    box-shadow:
        inset 0 6px 12px rgba(255, 255, 255, 0.06),
        inset 0 -10px 18px rgba(0, 0, 0, 0.8),
        0 0 18px rgba(0, 0, 0, 0.7);
    z-index: 2;
}

.center-panel::before {
    content: "";
    position: absolute;
    inset: 10%;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.6);
}

.center-panel__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.08em;
    font-size: clamp(1.1rem, 2vw, 2rem);
    color: rgba(240, 240, 245, 0.96);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.score-display,
.game-status {
    display: block;
    font-size: clamp(0.7rem, 1.1vw, 0.9rem);
    color: #f2f4f8;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.game-status {
    color: #dfe8ff;
}

.game-status--danger {
    color: #ff8a80;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: min(62vw, 420px);
    max-width: 100%;
    gap: 0.75rem;
    background: rgba(12, 18, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    padding: 0.45rem 0.6rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.game-button {
    flex: 1 1 0;
    min-width: 96px;
    border: none;
    border-radius: 999px;
    padding: 0.7rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    background: linear-gradient(145deg, #f3f5f7, #bfc9d6);
    color: #111827;
    box-shadow:
        0 8px 16px rgba(0, 0, 0, 0.25),
        0 0 0 2px rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.game-button:hover {
    transform: translateY(-1px);
    box-shadow:
        0 10px 18px rgba(0, 0, 0, 0.28),
        0 0 0 2px rgba(255, 255, 255, 0.22);
    filter: brightness(1.02);
}

.game-button--secondary {
    background: linear-gradient(145deg, #ecf0f7, #bcc8d9);
}

@media (max-width: 768px) {
    .simon-board {
        width: min(82vw, 450px);
    }

    .center-panel {
        border-width: 10px;
    }
}

@media (max-width: 480px) {
    .game-screen {
        padding: 1rem;
    }

    .simon-board {
        width: min(88vw, 360px);
        border-width: 12px;
    }

    .center-panel {
        width: 41%;
        height: 41%;
    }

    .brand {
        letter-spacing: 0.06em;
    }
}