:root {
    --bg-top: #070d24;
    --bg-bottom: #111f4a;
    --panel: rgba(9, 22, 50, 0.86);
    --panel-soft: rgba(16, 35, 73, 0.72);
    --text: #f5f9ff;
    --text-soft: #c9d9f7;
    --line: rgba(98, 161, 255, 0.36);
    --accent: #2ad1ff;
    --accent-2: #8be45f;
    --cta: #ffb84d;
    --cta-dark: #d08417;
    --shadow: 0 16px 36px rgba(0, 0, 0, 0.38);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: "Rajdhani", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 14% 15%, rgba(42, 209, 255, 0.18), transparent 34%),
        radial-gradient(circle at 86% 12%, rgba(139, 228, 95, 0.16), transparent 30%),
        linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

header {
    width: min(1080px, 96vw);
    height: 240px;
    margin-top: 20px;
    border-radius: 24px 24px 0 0;
    border: 2px solid var(--accent);
    border-bottom: none;
    box-shadow: var(--shadow);
    background-image:
        linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.08)),
        url("../../assets/images/baniere.png");
    background-size: cover;
    background-position: center;
}

.section-1 {
    width: min(1080px, 96vw);
    margin-bottom: 34px;
    border: 2px solid var(--accent);
    border-top: none;
    border-radius: 0 0 24px 24px;
    padding: 24px 14px 30px;
    background: linear-gradient(160deg, rgba(8, 18, 42, 0.93), rgba(15, 36, 78, 0.9));
    box-shadow: var(--shadow);
    display: grid;
    place-items: center;
    gap: 18px;
}

.game-header {
    text-align: center;
    max-width: 62ch;
}

.game-header h1 {
    margin: 0;
    font-family: "Orbitron", sans-serif;
    font-size: clamp(1.75rem, 4vw, 2.6rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-shadow: 0 0 14px rgba(42, 209, 255, 0.32);
}

.game-header p {
    margin: 8px 0 0;
    color: var(--text-soft);
    font-size: 1.1rem;
}

#myCanvas {
    width: min(500px, 92vw);
    height: auto;
    border-radius: 14px;
    border: 2px solid var(--line);
    background:
        linear-gradient(180deg, rgba(16, 38, 84, 0.95), rgba(9, 23, 56, 0.95));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#autres {
    display: grid;
    justify-items: center;
    gap: 12px;
}

#bouton-jouer {
    border: none;
    min-width: 300px;
    padding: 10px 18px;
    border-radius: 999px;
    font-family: "Orbitron", sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #1a1a1a;
    background: linear-gradient(180deg, #ffd27d, var(--cta));
    box-shadow: 0 6px 0 var(--cta-dark);
    cursor: pointer;
    transition: transform 0.1s ease, filter 0.12s ease;
}

#bouton-jouer:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

#bouton-jouer:active {
    transform: translateY(2px);
    box-shadow: 0 3px 0 var(--cta-dark);
}

#bouton-jouer:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 2px;
}

#myCanvas2 {
    width: 260px;
    height: 90px;
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(134, 255, 202, 0.35);
    background: #07112a;
}

.timer-shell {
    min-width: 290px;
    padding: 10px 12px 12px;
    border-radius: 14px;
    border: 1px solid rgba(81, 230, 255, 0.38);
    background:
        linear-gradient(160deg, rgba(5, 12, 31, 0.96), rgba(8, 19, 47, 0.92));
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.04),
        0 10px 22px rgba(0, 0, 0, 0.35);
}

.timer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.timer-title {
    font-family: "Orbitron", sans-serif;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #9bb9ec;
}

.timer-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6f7d95;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.timer-dot.running {
    background: #57e18f;
    box-shadow:
        0 0 0 2px rgba(87, 225, 143, 0.2),
        0 0 12px rgba(87, 225, 143, 0.8);
}

.timer-foot {
    margin-top: 7px;
    font-family: "Orbitron", sans-serif;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #88a9e0;
    text-align: center;
}

footer {
    width: min(1080px, 96vw);
    margin-bottom: 18px;
    padding: 8px 12px;
    border-radius: 12px;
    border-top: 2px solid var(--accent);
    display: flex;
    justify-content: flex-end;
    background: rgba(10, 24, 54, 0.78);
}

#contact {
    margin: 0;
    padding: 6px 10px;
    border-radius: 8px;
    color: #d8e6ff;
    background: rgba(98, 161, 255, 0.2);
}

#contact a {
    color: #ffd69b;
}

#contact a:hover {
    color: #ffe8c7;
}

@media (max-width: 640px) {
    header {
        height: 165px;
        border-radius: 18px 18px 0 0;
    }

    .section-1 {
        border-radius: 0 0 18px 18px;
        padding: 16px 8px 20px;
    }

    .game-header p {
        font-size: 1rem;
    }

    #bouton-jouer {
        width: 100%;
        min-width: 0;
        font-size: 0.88rem;
    }
}