/* =========================================================
   VARIÁVEIS
   ========================================================= */
:root {
    --bg: #020812;
    --panel: #061321;
    --panel-dark: #030b14;
    --cyan: #65c9ff;
    --cyan-dark: #164c70;
    --blue: #123d61;
    --white: #edf6fb;
    --text: #c5d8e2;
    --muted: #839cae;
    --border: #174b6c;
    --black: #00040a;
    --pixel: "Press Start 2P", monospace;
    --font: "Inter", Arial, sans-serif;
}

/* =========================================================
   RESET
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--white);
    font-family: var(--font);
    overflow-x: hidden;
}

/* =========================================================
   FUNDO
   ========================================================= */
.grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .12;
    background-image:
        linear-gradient(rgba(101, 201, 255, .15) 1px, transparent 1px),
        linear-gradient(90deg, rgba(101, 201, 255, .15) 1px, transparent 1px);
    background-size: 32px 32px;
}

.scanlines {
    position: fixed;
    inset: 0;
    z-index: 100;
    pointer-events: none;
    opacity: .025;
    background: repeating-linear-gradient(0deg, transparent 0px, transparent 3px, white 4px);
}

/* =========================================================
   TELA
   ========================================================= */
.screen {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* =========================================================
   PAINEL
   ========================================================= */
.main-panel {
    width: min(1100px, 100%);
    background: linear-gradient(145deg, rgba(7, 21, 34, .98), rgba(3, 12, 22, .99));
    border: 2px solid var(--border);
    box-shadow: 9px 9px 0 var(--black), 0 0 45px rgba(0, 0, 0, .55);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-panel:hover {
    box-shadow: 11px 11px 0 var(--black), 0 0 55px rgba(101, 201, 255, .15);
}

/* =========================================================
   HEADER
   ========================================================= */
.panel-header {
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: var(--panel-dark);
    border-bottom: 1px solid var(--border);
    font-family: var(--pixel);
    font-size: 9px; /* Aumentado */
    color: var(--muted);
}

.system {
    display: flex;
    align-items: center;
    color: var(--cyan);
}

.status {
    width: 8px;
    height: 8px;
    margin-right: 10px;
    background: var(--cyan);
    box-shadow: 0 0 10px var(--cyan);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; box-shadow: 0 0 15px var(--cyan); }
    100% { opacity: 0.4; }
}

/* =========================================================
   INTRO
   ========================================================= */
.intro {
    text-align: center;
    padding: 45px 25px 35px;
}

.eyebrow {
    display: block;
    margin-bottom: 16px;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 10px; /* Aumentado */
    letter-spacing: 1.5px;
}

.intro h1 {
    margin-bottom: 18px;
    font-family: var(--pixel);
    font-size: 30px; /* Aumentado */
    line-height: 1.5;
    text-shadow: 3px 3px 0 var(--blue);
}

.intro p {
    max-width: 680px;
    margin: auto;
    color: var(--text);
    font-size: 15px; /* Aumentado para melhor leitura */
    line-height: 1.8;
}

.intro-line {
    width: 200px;
    height: 2px;
    margin: 30px auto 0;
    background: var(--border);
    box-shadow: 0 0 8px rgba(101, 201, 255, 0.2);
}

/* =========================================================
   JOGO
   ========================================================= */
.game-container {
    margin: 0 24px 24px;
    border: 1px solid var(--border);
    background: #030d18;
    transition: border-color 0.3s ease;
}

.game-container:hover {
    border-color: var(--cyan-dark);
}

/* =========================================================
   TOPO DO JOGO
   ========================================================= */
.game-top {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--pixel);
    font-size: 8px; /* Aumentado */
}

.game-top strong {
    color: var(--cyan);
}

/* =========================================================
   ÁREA DO JOGO
   ========================================================= */
.game-screen {
    min-height: 330px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 25px;
    background: radial-gradient(circle at center, rgba(13, 48, 75, .35), transparent 65%);
}

/* =========================================================
   MISSÃO
   ========================================================= */
.mission {
    display: none;
    width: 100%;
    max-width: 680px;
    text-align: center;
    animation: appear .35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mission.active {
    display: block;
}

@keyframes appear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.mission-label {
    display: block;
    margin-bottom: 15px;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 9px; /* Aumentado */
}

.mission h2 {
    margin-bottom: 16px;
    font-family: var(--pixel);
    font-size: 20px; /* Aumentado */
    line-height: 1.6;
}

.mission p {
    margin-bottom: 24px;
    color: var(--text);
    font-size: 15px; /* Aumentado */
    line-height: 1.7;
}

/* =========================================================
   SEQUÊNCIA
   ========================================================= */
.sequence {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.sequence span {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 12px; /* Aumentado */
    transition: transform 0.2s ease, background 0.2s ease;
}

.sequence span:hover {
    transform: translateY(-3px);
    background: var(--blue);
}

.sequence span:last-child {
    border-color: var(--cyan);
    color: var(--white);
    animation: bounceQuest 1s infinite alternate;
}

@keyframes bounceQuest {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); }
}

/* =========================================================
   INPUTS
   ========================================================= */
.answer-area {
    display: flex;
    justify-content: center;
    gap: 10px;
}

input {
    height: 46px;
    width: 230px;
    padding: 0 14px;
    border: 1px solid var(--border);
    outline: none;
    background: #020912;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 10px; /* Aumentado */
    text-align: center;
    transition: all 0.2s ease;
}

input:focus {
    border-color: var(--cyan);
    background: #04101e;
    box-shadow: 0 0 15px rgba(101, 201, 255, 0.25);
}

/* =========================================================
   BOTÕES
   ========================================================= */
button {
    min-height: 46px;
    padding: 0 20px;
    border: 1px solid var(--border);
    background: #071725;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 9px; /* Aumentado */
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover {
    background: var(--blue);
    border-color: var(--cyan);
    color: var(--white);
    box-shadow: 3px 3px 0 var(--black), 0 0 12px rgba(101, 201, 255, 0.3);
    transform: translateY(-2px);
}

button:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--black);
}

/* =========================================================
   CÓDIGO
   ========================================================= */
.code {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px dashed var(--border);
    color: var(--cyan);
    background: #020912;
    font-family: var(--pixel);
    font-size: 11px; /* Aumentado */
    letter-spacing: 2.5px;
    word-break: break-word;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

/* =========================================================
   OPÇÕES
   ========================================================= */
.options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.options button {
    width: 100%;
    min-height: 65px;
    line-height: 1.6;
    font-size: 8px; /* Ajustado proporcionalmente */
}

/* =========================================================
   FEEDBACK
   ========================================================= */
.feedback {
    min-height: 28px;
    margin-top: 20px;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 9px; /* Aumentado */
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================================
   ARQUIVOS
   ========================================================= */
.unlocked {
    border-top: 1px solid var(--border);
}

.unlocked-title {
    padding: 14px 18px;
    color: var(--muted);
    font-family: var(--pixel);
    font-size: 8px; /* Aumentado */
    border-bottom: 1px solid var(--border);
    background: rgba(3, 11, 20, 0.5);
}

.files {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.file {
    min-height: 85px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-right: 1px solid var(--border);
    transition: all 0.25s ease;
    cursor: default;
}

.file:hover {
    background: rgba(101, 201, 255, 0.03);
}

.file:last-child {
    border-right: 0;
}

.file > span {
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 8px; /* Aumentado */
}

.file strong {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-family: var(--pixel);
    font-size: 8px; /* Aumentado */
}

.file small {
    color: var(--muted);
    font-family: var(--pixel);
    font-size: 7px; /* Aumentado */
}

.file.unlocked {
    background: rgba(101, 201, 255, 0.06);
    cursor: pointer;
}

.file.unlocked:hover {
    background: rgba(101, 201, 255, 0.12);
    transform: translateY(-2px);
}

.file.unlocked strong {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(101, 201, 255, 0.4);
}

.file.unlocked small {
    color: var(--cyan);
}

/* =========================================================
   CONTEÚDO REVELADO
   ========================================================= */
.reveal-area {
    padding: 0 24px;
}

.reveal {
    display: none;
    margin-bottom: 15px;
    padding: 30px;
    background: #061321;
    border: 1px solid var(--border);
    animation: appear .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.reveal.visible {
    display: block;
}

.reveal > span {
    display: block;
    margin-bottom: 14px;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 8px; /* Aumentado */
}

.reveal h2 {
    margin-bottom: 16px;
    font-family: var(--pixel);
    font-size: 16px; /* Aumentado */
    line-height: 1.6;
}

.reveal p {
    max-width: 820px;
    color: var(--text);
    font-size: 15px; /* Aumentado para melhor leitura */
    line-height: 1.8;
}

.signature {
    margin-top: 24px;
    color: var(--cyan);
    font-family: var(--pixel);
    font-size: 10px; /* Aumentado */
    letter-spacing: 1px;
}

/* =========================================================
   RODAPÉ
   ========================================================= */
.panel-footer {
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-top: 24px;
    padding: 10px 18px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: var(--pixel);
    font-size: 7px; /* Aumentado */
}

.panel-footer span {
    transition: color 0.2s ease;
    cursor: default;
}

.panel-footer span:hover {
    color: var(--cyan);
}

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 800px) {
    .screen {
        padding: 20px 12px;
        align-items: flex-start;
    }

    .main-panel {
        width: 100%;
    }

    .intro h1 {
        font-size: 24px;
    }

    .files {
        grid-template-columns: repeat(2, 1fr);
    }

    .file:nth-child(2) {
        border-right: 0;
    }

    .file:nth-child(-n+2) {
        border-bottom: 1px solid var(--border);
    }

    .options {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CELULAR
   ========================================================= */
@media (max-width: 520px) {
    .screen {
        padding: 8px;
    }

    .main-panel {
        border-width: 1px;
        box-shadow: 5px 5px 0 var(--black);
    }

    .panel-header {
        height: 38px;
        padding: 0 12px;
        font-size: 7px;
    }

    .intro {
        padding: 28px 15px 22px;
    }

    .eyebrow {
        font-size: 8px;
    }

    .intro h1 {
        font-size: 19px;
    }

    .intro p {
        font-size: 13px;
    }

    .game-container {
        margin: 0 10px 15px;
    }

    .game-top {
        font-size: 7px;
    }

    .game-screen {
        min-height: 340px;
        padding: 25px 12px;
    }

    .mission h2 {
        font-size: 15px;
    }

    .mission p {
        font-size: 13px;
    }

    .sequence {
        gap: 6px;
    }

    .sequence span {
        width: 44px;
        height: 44px;
        font-size: 10px;
    }

    .answer-area {
        flex-direction: column;
        align-items: center;
    }

    input {
        width: 100%;
        max-width: 260px;
    }

    .code {
        font-size: 8px;
        letter-spacing: 1px;
    }

    .files {
        grid-template-columns: 1fr;
    }

    .file {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .file:last-child {
        border-bottom: 0;
    }

    .reveal-area {
        padding: 0 10px;
    }

    .reveal {
        padding: 20px;
    }

    .reveal h2 {
        font-size: 12px;
    }

    .reveal p {
        font-size: 13px;
    }

    .panel-footer {
        flex-wrap: wrap;
        gap: 12px;
        font-size: 6px;
        padding: 14px;
    }
}