:root {
    --seashell: #f1e3e0ff;
    --taupe-grey: #614f4bff;
    --old-rose: #c1869bff;
    --seashell-2: #f7a3d3ff; /*blush-pop*/
}

@font-face {
    font-family: "CustomFont";
    src: url("/1.ttf") format("truetype");
}

* {
    box-sizing: border-box;
}
body {
    background: var(--old-rose);
    position: relative;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, var(--seashell-2), transparent 60%),
        radial-gradient(circle at 70% 80%, var(--taupe-grey), transparent 70%);
    opacity: 0.25;
    pointer-events: none;
}

.note {
    font-family: "CustomFont", sans-serif;
    font-size: 22px;
    margin-top: 60px;
}

.title {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 10px;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 3px;
    color: #c1869bce;
    text-shadow:
        0 2px 2px rgba(255,255,255,0.25),
        0 -2px 2px rgba(0,0,0,0.5);
}

.game-container {
    background: var(--old-rose);
    border-radius: 12px;
    padding: 12px;
    box-shadow:
        inset 4px 4px 8px var(--taupe-grey),
        inset -4px -4px 8px var(--seashell-2);
    width: 352px;
    height: 198px;
    margin: 0 auto;
}


.screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
}
.screen::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;
    background: black;
    z-index: 0;
}
.screen::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 8px;

    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.25) 0%,
        rgba(255, 255, 255, 0.05) 30%,
        transparent 60%
    );
    pointer-events: none;
    z-index: 2;
}
.game-canvas {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 6px;
    background: black;
    transition: background 0.3s ease;
}
.game-canvas.on {
    background: white;
}
.start-outer {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 34px;
    padding: 6px;
    border-radius: 40px;
    background: linear-gradient(
        rgba(0,0,0,0.25),
        transparent,
        rgba(255,255,255,0.25)
    );
}
.start-button {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    background: var(--taupe-grey);
    position: relative;
    top: 1px;
    left: 1px;
    box-shadow:
        inset 2px -4px 6px rgba(0,0,0,0.6),
        inset -2px 2px 4px rgba(255,255,255,0.2);
}
.start-button.active {
    transform: translate(1px, 1px);
    box-shadow:
        inset 3px -2px 6px rgba(0,0,0,0.7);
}
.gamepad::before {
    content: "";
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 100px;
    pointer-events: none;
background:
    radial-gradient(circle, #111 35%, transparent 36%) 37% 22% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 62% 22% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 27% 35% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 50% 35% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 73% 35% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 25% 50% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 75% 50% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 35% 64% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 50% 75% / 16px 16px no-repeat,
    radial-gradient(circle, #111 35%, transparent 36%) 65% 64% / 16px 16px no-repeat;
    radial-gradient(circle, #111 35%, transparent 36%) 50% 85% / 16px 16px no-repeat;
    
    filter: drop-shadow(0 1px 0 rgba(255,255,255,0.15))
            drop-shadow(0 -1px 1px rgba(0,0,0,0.6));
}
.gamepad {
    background: var(--old-rose);
    border-radius: 16px;
    box-shadow:
        inset 3px 3px 6px var(--taupe-grey),
        inset -3px -3px 6px var(--seashell-2);
    position: relative;
    width: 352px;
    height: 260px;
    margin: 10px auto 0;
}
.gamepad::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(140deg, var(--seashell) 0%, transparent 40%);
    opacity: 0.25;
    pointer-events: none;
}
.sticker {
    position: relative;
    top: 13px;
    left: 24px;
    width: 103px;
    height: auto;
    transform: rotate(12deg);
    pointer-events: none;
    z-index: 10;
}
.stick-base {
    position: absolute;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: #3c2b342c;
    z-index: 1;
}
.left-base {
    bottom: 30px;
    left: 50px;
    transform: translate(-7.5px, 7.5px);
}
.right-base {
    bottom: 30px;
    right: 50px;
    transform: translate(7.5px, 7.5px);
}
.joystick {
    position: absolute;
    width: 90px;
    height: 90px;
    z-index: 2;
    touch-action: none;
}
.buttons {
    position: absolute;
    top: 10px;
    right: 20px;
    width: 120px;
    height: 120px;
}

.btn {
    position: absolute;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--taupe-grey);

    box-shadow:
        inset 2px -4px 6px rgba(0, 0, 0, 0.43),
        inset -2px 2px 4px rgba(255, 255, 255, 0.4);

    transform-origin: center;
    --tx: 0;
    --ty: 0;
    --scale: 1;

    transform: translate(var(--tx), var(--ty)) scale(var(--scale));

    transition: transform 0.05s ease, box-shadow 0.05s ease;
}
.btn.active {
    --scale: 0.75;
    box-shadow:
        inset 4px 2px 6px rgba(0,0,0,0.7),
        inset -1px -1px 2px rgba(255,255,255,0.2);
}
.y {
    top: 0;
    left: 50%;
    --tx: -50%;
}
.x {
    left: 0;
    top: 50%;
    --ty: -50%;
}
.b {
    right: 0;
    top: 50%;
    --ty: -50%;
}
.a {
    bottom: 0;
    left: 50%;
    --tx: -50%;
}
.left-stick {
    bottom: 30px;
    left: 50px;
}
.right-stick {
    bottom: 30px;
    right: 50px;
}
.y {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}
.x {
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}
.b {
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.a {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}
