

* {
    margin: 0;
    padding: 0;
    /* box-sizing: border-box; */
}

:root {
    --purple: #6c009f;
    --purple-light: #000000;

    --blue: #015074;
    --blue-light: #9be8ff;

    --glass: rgba(255, 255, 255, 0.08);

    --border: rgba(255, 255, 255, 0.15);
}

body {
    position: relative;
    min-height: 100vh;
    overflow: hidden;

    font-family: "Orbitron", sans-serif;

    background:
        radial-gradient(circle at top left,
            rgba(4, 61, 13, 0.35),
            transparent 35%),

        radial-gradient(circle at bottom right,
            rgba(230, 215, 8, 0.845),
            transparent 35%),

        linear-gradient(135deg,
            #013404 0%,
            #114d0c 35%,
            #0c6a12 70%,
            #0d3d04 100%);

    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

.credit{
    position: absolute;
    bottom: 10px;
    display: block;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 10px;
}

.credit span{
    font-weight: bolder;
}

/* =========================
   BACKGROUND BLOBS
========================= */

.bg-blur {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
}

.bg-blur-1 {
    width: 450px;
    height: 450px;

    background: rgba(15, 102, 0, 0.4);

    left: -120px;
    top: -80px;
}

.bg-blur-2 {
    width: 200px;
    height: 200px;

    background: rgba(120, 146, 5, 0.208);

    right: -150px;
    bottom: -120px;
}

/* =========================
   MAIN
========================= */

.container {
    width: min(1200px, 95vw);
    position: relative;
}

/* =========================
   TOP SECTION
========================= */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 17px;
}

/* =========================
   TITLE
========================= */

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.title-line {
    width: 120px;
    height: 2px;

    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, .7),
            transparent);
}

#timerBox {
    display: none;
}

.game-title {
    font-size: 1rem;
    font-weight: 800;

    letter-spacing: 4px;

    background: linear-gradient(90deg,
            #fffc4e,
            #fffb90);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    text-shadow:
        0 0 20px rgba(255, 0, 255, .4),
        0 0 40px rgba(0, 162, 255, .4);
}

/* =========================
   SCORE
========================= */

.player-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.player-label {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.player-one .player-label {
    color: rgb(240, 255, 108)
}

.player-two .player-label {
    color: #ffbc7d
}

.score-box {
    width: 80px;
    height: 20px;

    /* border-radius: 24px; */

    backdrop-filter: blur(20px);

    background: rgba(255, 255, 255, .06);

    border: 1px solid rgba(255, 255, 255, .12);

    display: flex;
    justify-content: center;
    align-items: center;
}

.player-one .score-box {
    box-shadow:
        0 0 25px rgba(243, 255, 74, 0.45);
}

.player-two .score-box {
    box-shadow:
        0 0 25px rgba(255, 196, 0, 0.45);
}

.score-box span {
    font-size: 1.2rem;
    font-weight: 700;
}

/* =========================
   GAME BOARD
========================= */

.board-wrapper {
    position: relative;

    width: fit-content;

    margin: 0 auto;
}

.board-glow {
    position: absolute;
    inset: -6px;

    border-radius: 32px;

    background: linear-gradient(90deg,
            #00760e
            #036500,
            );

    filter: blur(20px);

    opacity: .8;
}

canvas {
    width: min(100%, 1000px);
    height: auto;
    margin: auto;

    position: relative;
    display: block;

    border-radius: 28px;

    background:
        linear-gradient(90deg,
            rgba(0, 255, 38, 0.15),
            rgba(0, 0, 0, 0.12));

    border: 2px solid rgba(255, 255, 255, .15);

    backdrop-filter: blur(15px);

    box-shadow:
        inset 0 0 40px rgba(255, 255, 255, .03),
        0 0 50px rgba(0, 0, 0, .4);
}

/* =========================
   CONTROLS
========================= */

.controls {
    margin-top: 10px;

    display: flex;
    justify-content: center;
    gap: 40px;
}

.control-card {
    min-width: full;
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 5px 12px;

    /* border-radius: 20px; */

    background: rgba(255, 255, 255, .05);

    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, .1);

    text-align: center;
}

.control-card p {
    margin-top: 1px;

    color: rgb(255, 255, 255);

    letter-spacing: 2px;
    font-size: 10px;
}

.keys {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
}

.keys span {
    width: 20px;
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 2px;

    background: rgba(255, 255, 255, .08);

    border: 1px solid rgba(255, 255, 255, .12);

    box-shadow:
        0 0 15px rgba(255, 255, 255, .05);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1100px) {

    .game-title {
        font-size: 2.5rem;
    }

    canvas {
        width: 95vw;
        height: auto;
    }

    .controls {
        flex-direction: column;
        align-items: center;
    }

    .top-bar {
        flex-direction: column;
        gap: 20px;
    }

    .title-line {
        display: none;
    }
}

/* =========================
   GAME MODE MODAL
========================= */

.mode-modal {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    background: rgba(0, 0, 0, 0.65);

    backdrop-filter: blur(12px);

    z-index: 9999;
}

.mode-card {
    width: 420px;

    padding: 40px 30px;

    display: flex;
    flex-direction: column;
    gap: 18px;

    text-align: center;

    border-radius: 28px;

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.12);

    backdrop-filter: blur(25px);

    box-shadow:
        0 0 40px rgba(255, 234, 0, 0.25),
        0 0 40px rgba(123, 255, 0, 0.18);
}

.mode-title {
    font-size: 2rem;
    font-weight: 800;

    letter-spacing: 4px;

    background: linear-gradient(90deg,
            #fff691,
            #cea501);

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mode-subtitle {
    color: rgba(255, 255, 255, .75);

    font-size: 14px;

    letter-spacing: 2px;

    margin-bottom: 10px;
}

.mode-btn {
    padding: 16px;

    border: none;

    border-radius: 14px;

    cursor: pointer;

    font-family: inherit;

    font-size: 15px;
    font-weight: 700;

    color: white;

    background: linear-gradient(135deg,
            #4cff2c,
            #1c5f03);

    transition: all .25s ease;
}

.mode-btn:hover {
    transform: translateY(-3px);

    box-shadow:
        0 0 25px rgba(87, 196, 8, 0.146),
        0 0 25px rgba(200, 255, 0, 0.171);
}

.mode-btn:active {
    transform: scale(.98);
}

.modal {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.858);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}

.modal-content {

    width: 500px;
    max-width: 100%;

    padding: 30px;

    background: #73c53446;

    border: 1px solid rgba(255, 255, 255, .15);

    text-align: center;

    border-radius: 10px;
}

.modal-content h2 {

    margin-bottom: 30px;
    color: rgb(168, 255, 147);
}

.modal-content p {

    line-height: 1.5;
    margin-bottom: 20px;
    font-family:'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
    font-size: 20px;
    font-weight: 100;
}

.modal-content button {

    padding: 10px 40px;

    margin-top: 10px;

    border: none;

    border-radius: 25px;

    cursor: pointer;

    background: #becb07;

    color: #412502;

    font-weight: bold;
}


.modal-count {
    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.274);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 9999;
}