body {
    background: linear-gradient(160deg, #111 0%, #1B1B1B 60%, #222 100%);
    font-family: 'Press Start 2P', 'Pixel Operator', monospace;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
}
.pokedex-container {
    max-width: 980px;
    margin: 40px auto;
    background: #C62828;
    border-radius: 32px;
    border: 8px solid #1B1B1B;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
    padding: 24px;
}
.pokedex-header {
    text-align: center;
    margin-bottom: 24px;
}
.pokedex-header h1 {
    margin: 12px 0;
}
.btn-voltar {
    display: inline-block;
    background: #FFEB3B;
    color: #1B1B1B;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.75em;
    font-weight: bold;
    margin-top: 8px;
    transition: background 0.2s ease, transform 0.1s ease;
}
.btn-voltar:hover {
    background: #FDD835;
    transform: translateY(-1px);
}
.btn-voltar:active {
    transform: translateY(0);
}
.poke-relogio {
    background: #FFEB3B;
    color: #1B1B1B;
    border-radius: 16px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 8px;
}
#pokeRelogioImg {
    object-fit: cover;
    border-radius: 4px;
}
.pokedex-main {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 16px;
    color: #1B1B1B;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#form-busca {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
#busca {
    flex: 1;
    padding: 8px;
    border-radius: 8px;
    border: 2px solid #C62828;
    font-family: inherit;
    font-size: 1em;
}
button {
    background: #C62828;
    color: #FFEB3B;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 1em;
    cursor: pointer;
    font-weight: bold;
}
button:hover {
    background: #B71C1C;
}
.pokedex-resultado {
    margin-top: 16px;
    text-align: center;
}
.pokedex-footer {
    text-align: center;
    margin-top: 24px;
    color: #FFEB3B;
    font-size: 0.9em;
}

/* ===================== */
/* Dispositivo (duas páginas) */
/* ===================== */
.dispositivo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.lado-esquerdo, .lado-direito {
    background: #C62828; /* vermelho principal */
    border: 6px solid #1B1B1B;
    border-radius: 20px;
    box-shadow: inset 0 6px 0 rgba(0,0,0,0.15), 0 10px 20px rgba(0,0,0,0.2);
    padding: 16px;
    position: relative;
}

/* Topo com lente e indicadores */
.topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.lente {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #7ef1ff 0%, #1fb7d1 40%, #0a6a78 70%, #00353c 100%);
    border: 6px solid #10272b;
    box-shadow: 0 0 14px rgba(46, 229, 255, 0.6), inset 0 0 10px rgba(255,255,255,0.4);
    animation: brilho 2.4s ease-in-out infinite;
}
@keyframes brilho {
    0%, 100% { box-shadow: 0 0 12px rgba(46,229,255,.5), inset 0 0 10px rgba(255,255,255,.35); }
    50% { box-shadow: 0 0 20px rgba(46,229,255,.9), inset 0 0 14px rgba(255,255,255,.6); }
}
.indicadores { display: flex; gap: 8px; }
.led { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #222; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.led-verde { background: #12e064; }
.led-amarelo { background: #ffd83b; }
.led-vermelho { background: #ff5252; }

/* Botões pequenos superiores/ inferiores */
.botoes-top, .botoes-bottom {
    display: flex; gap: 10px; justify-content: center; margin: 10px 0;
}
.botao {
    display: inline-block;
    box-shadow: 0 3px 0 rgba(0,0,0,.35);
    transition: transform .08s ease, box-shadow .08s ease, filter .2s;
}
.botao-pequeno { width: 22px; height: 22px; border-radius: 50%; }
.botao-medio { width: 38px; height: 14px; border-radius: 8px; }
.azul { background: #1e88e5; }
.vermelho { background: #e53935; }
.verde { background: #43a047; }
.cinza { background: #9e9e9e; }
.botao:active, .botao:focus-visible { transform: translateY(1px); box-shadow: 0 1px 0 rgba(0,0,0,.35); outline: 2px dashed #FFEB3B; outline-offset: 2px; }
.botao:hover { filter: brightness(1.05); }

/* Tela principal (retângulo branco) */
.tela-principal {
    background: #fff;
    border: 4px solid #1B1B1B;
    border-radius: 12px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* D-Pad (direcional) */
.dpad {
    position: relative;
    width: 140px; height: 140px;
    margin: 14px auto 0;
}
.dpad .seta {
    position: absolute;
    background: #424242;
    border: 3px solid #1B1B1B;
    border-radius: 8px;
    width: 44px; height: 44px;
    box-shadow: 0 3px 0 rgba(0,0,0,.35);
    transition: transform .1s ease;
}
.dpad .cima { top: 0; left: 50%; transform: translate(-50%, 0); }
.dpad .baixo { bottom: 0; left: 50%; transform: translate(-50%, 0); }
.dpad .esquerda { left: 0; top: 50%; transform: translate(0, -50%); }
.dpad .direita { right: 0; top: 50%; transform: translate(0, -50%); }
.dpad .centro {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 48px; height: 48px; background: #616161; border: 3px solid #1B1B1B; border-radius: 10px;
}
.dpad .seta:hover { filter: brightness(1.1); }
.dpad .seta:active { transform: translate(-50%, 1px); }

/* Lado direito */
.visor-secundario {
    background: #212121;
    border: 4px solid #1B1B1B;
    border-radius: 10px;
    height: 120px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}
.visor-secundario .linha {
    height: 6px; background: #2e7d32; width: 80%; margin: 16px auto; border-radius: 3px;
}
.visor-secundario .linha.curta { width: 50%; background: #1976d2; }

.painel-botoes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 16px 0;
}
.btn-azul {
    height: 42px;
    background: linear-gradient(#2196f3, #1565c0);
    border: 3px solid #0d47a1;
    border-radius: 10px;
    box-shadow: 0 3px 0 rgba(0,0,0,.35);
    transition: transform .08s ease, filter .2s;
}
.btn-azul:hover { filter: brightness(1.08); }
.btn-azul:active, .btn-azul:focus-visible { transform: translateY(1px); outline: 2px dashed #FFEB3B; outline-offset: 2px; }

.inferior-direito {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: center;
}
.indicador {
    height: 18px; border-radius: 6px; border: 3px solid #1B1B1B;
}
.ret-escuro { background: #424242; }
.ret-claro { background: #bdbdbd; }
.botoes-finais { display: flex; gap: 8px; justify-content: flex-end; }
.btn-ret { background: #e0e0e0; border: 3px solid #1B1B1B; border-radius: 8px; height: 24px; box-shadow: 0 2px 0 rgba(0,0,0,.25); }
.btn-ret.pequeno { width: 28px; }
.btn-ret.medio { width: 56px; }
.btn-ret:hover { filter: brightness(1.05); }
.btn-ret:active { transform: translateY(1px); }

/* Responsividade */
@media (max-width: 900px) {
    .pokedex-container { margin: 20px 12px; }
    .dispositivo { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .lente { width: 56px; height: 56px; }
    .tela-principal { min-height: 180px; }
    .dpad { width: 120px; height: 120px; }
}
