/* Configurações gerais */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e1e1e1;
    font-family: "Segoe UI", sans-serif;
}

.container {
    width: 90%;
    height: 800px;
    max-width: 1100px;
    background: #f6f2ea;
    border: 8px solid #3b393a;
    border-radius: 40px;
    position: relative;
}

.gameboy-wrapper {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
}

.gameboy {
    width: 550px;
    height: 850px;
    background: #d4ced4;
    border-radius: 16px 16px 80px 16px;
    box-shadow: 0 18px 25px rgba(0, 0, 0, .4);
    position: relative;
    padding-top: 20px;
}

.top-bar {
    height: 10px;
    background: linear-gradient(to bottom, #e8e3e8, #c8c1c8);
}

/* Estilizações da tela */
.screen-area {
    background: #73687e;
    border-radius: 20px 20px 80px 20px;
    margin: 20px 30px;
    padding: 50px;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, .7);
    position: relative;
}

.led {
    position: absolute;
    left: 15px;
    top: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.battery-led {
    width: 10px;
    height: 10px;
    background: #e04747;
    border-radius: 50%;
    transition: box-shadow .2s, transform .2s;
    cursor: pointer;
}

.battery-led:hover {
    box-shadow: 0 0 100px rgba(255, 0, 0, 1);
    transform: scale(1.3);
}

.battery-label {
    font-size: 8px;
    color: #f0f0f0;
    letter-spacing: .06em;
}

.screen-top-label {
    position: absolute;
    top: 8px;
    right: 15px;
    font-size: 10px;
    color: #f0f0f0;
    letter-spacing: .05em;
}

.screen {
    position: relative;
    overflow: hidden;
    height: 250px;
    margin: 0px 20px;
    background: #aeb166;
    border-radius: 4px;
    box-shadow: inset 5px 5px 10px rgba(0, 0, 0, .7);
}

.quiz {
    position: absolute;
    inset: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #1b1b1b;
    font-family: "VT323", monospace;
    font-size: 12px;
}

#quiz-answers {
    margin: 8px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#quiz-answers button {
    border: none;
    padding: 4px 6px;
    text-align: left;
    font-family: "VT323", monospace;
    font-size: 18px;
    background: rgba(0, 0, 0, 0.15);
    color: #041018;
    cursor: pointer;
    border-radius: 3px;
}

#quiz-answers button:hover {
    background: rgba(0, 0, 0, 0.25);
}

#quiz-answers button.selected {
    background: #243b4a;
    color: #f4f4f4;
}

#quiz-answers button.correct {
    background: #1f6b3aa4;
    color: #f4f4f4;
}

#quiz-answers button.wrong {
    background: #7a1b1bb6;
    color: #f4f4f4;
}

#quiz-next {
    align-self: flex-end;
    padding: 4px 10px;
    border-radius: 3px;
    border: none;
    font-family: "VT323", monospace;
    font-size: 18px;
    background: #243b4a;
    color: #f4f4f4;
    cursor: pointer;
    opacity: .7;
}

#quiz-next:disabled {
    cursor: default;
    opacity: .4;
}

#quiz-progress,
#quiz-score {
    font-size: 16px;
}

.secret-code {
    margin-top: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 2px;

    white-space: pre-line;
}

.no-code {
    margin-top: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 2px;
    white-space: pre-line;
}


.logo {
    margin: 16px 30px;
    font-size: 20px;
    color: #1D1745;
    letter-spacing: .08em;
}

.logo span:last-child {
    font-weight: bold;
    font-size: 20px;
    letter-spacing: 10px;
}

/* Controles (dpad) */
.controls {
    display: flex;
    margin-top: 26px;
}

.dpad {
    position: relative;
    margin: 20px 30px;
    width: 160px;
    height: 160px;
    cursor: pointer;
    border-radius: 100%;
    background: linear-gradient(to top, #e8e3e8, #c8c1c8);

}

.dpad-piece {
    position: absolute;
    background: #222;
    transition: transform .4s, box-shadow .1s;

    --shadow-x: 0px;
    --shadow-y: 0px;
}

/*Sombrinha ao clicar no botão */
.dpad-piece:active {
    box-shadow: inset var(--shadow-x) var(--shadow-y) 15px rgba(0, 0, 0, 1);
}

.dpad-piece.center {
    width: 40px;
    height: 40px;
    top: 60px;
    left: 60px;
    background: #444;
}

/* Peças verticais */
.dpad-piece.vertical {
    width: 40px;
    left: 60px;
}

.dpad-piece.vertical.top {
    top: 20px;
    height: 40px;
    border-radius: 5px 5px 0 0;

    --shadow-x: 0px;
    --shadow-y: 10px;
}

.dpad-piece.vertical.bottom {
    bottom: 20px;
    height: 40px;
    border-radius: 0 0 5px 5px;

    --shadow-x: 0px;
    --shadow-y: -10px;
}

/* Peças horizontais */
.dpad-piece.horizontal {
    height: 40px;
    top: 60px;
    border-radius: 4px;
}

.dpad-piece.horizontal.left {
    width: 40px;
    left: 20px;
    border-radius: 5px 0 0 5px;

    --shadow-x: 10px;
    --shadow-y: -2px;
}

.dpad-piece.horizontal.right {
    width: 40px;
    right: 20px;
    border-radius: 0 5px 5px 0;

    --shadow-x: -10px;
    --shadow-y: -2px;
}

.dpad-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #555;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.red-buttons {
    flex: 1;
    position: relative;
    margin: 40px 4px;
}

.ab-group {
    position: absolute;
    right: 30px;
    transform: rotate(-20deg);
    display: flex;
    gap: 30px;
    align-items: center;
    border-radius: 800px;
    padding: 10px;
    background: linear-gradient(to top, #e8e3e8, #c8c1c8);

}

.btn-wrapper {
    position: relative;
}

.btn-round {
    position: relative;
    width: 60px;
    height: 60px;
    background: #b1224a;
    border-radius: 50%;
    box-shadow: 0 3px 0 #66122a;
    cursor: pointer;
    transition: transform .1s ease, box-shadow .1s ease;
}

.btn-label {
    position: absolute;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 30px;
    font-family: "VT323", sans-serif;
    color: #555;
}

.btn-round:active {
    transform: translateY(4px);
    box-shadow: 0 1px 0 #66122a;
}

.start-select {
    position: absolute;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%) rotate(-30deg);
    display: flex;
    gap: 12px;
}

.start-select .pill-wrapper:nth-child(2) {
    margin-top: 55px;
}

.pill-wrapper {
    position: relative;
    width: 80px;
    height: 50px;
}

.btn-pill {
    position: relative;
    width: 70px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(to top, #8F8796, #f4f0f6);
    box-shadow:
        0 2px 0 rgba(0, 0, 0, 0.35),
        inset 0 1px 2px rgba(255, 255, 255, 0.8);
    transform: translateY(0);
    cursor: pointer;
}

.btn-pill:active {
    transform: none;
    box-shadow:
        0 1px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(0, 0, 0, 0.6);
}

.pill-text {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #404463;
    font-family: "VT323", sans-serif;
}

.speaker {
    position: absolute;
    right: 100px;
    bottom: 20px;
    width: 6px;
    height: 70px;
    background: #222;
    border-radius: 4px;
    transform: rotate(-25deg);
    box-shadow:
        0 1px 2px rgba(255, 255, 255, .2),
        inset 0 2px 3px rgba(0, 0, 0, .7),
        12px 0 0 #222,
        24px 0 0 #222,
        36px 0 0 #222,
        48px 0 0 #222,
        60px 0 0 #222,
        72px 0 0 #222;
}