/* ===========================
   RESET / BASE
   =========================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    background: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    min-height: 100dvh;
    overflow-x: hidden;
}

/* ===========================
   CONTAINER CENTRAL
   =========================== */
.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 8px;
}

/* ===========================
   PADRÃO DAS PÁGINAS DA HQ
   =========================== */
.hq-img {
    width: 1280px;
    height: 907px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    user-select: none;
}

/* ===========================
   VISOR (imagem)
   =========================== */
.viewer {
    width: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
}

/* IMAGEM PRINCIPAL */
#ent {
    width: 1280px;
    height: 907px;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;

    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    pointer-events: none;
}

#ent.visivel {
    opacity: 1;
    pointer-events: auto;
}

/* ===========================
   BOTÃO VERDE
   =========================== */
#btnProx {
    display: none;
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 60;

    padding: 12px 18px;
    background: #00c853;
    border: 2px solid #009624;
    color: #000;
    font-weight: bold;
    border-radius: 10px;

    font-size: clamp(14px, 3.5vw, 18px);
    cursor: pointer;

    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    transition: transform .12s ease, background .12s ease, opacity .25s ease;
}

#btnProx:hover { transform: translateY(-2px); background: #00e676; }

/* ===========================
   SETAS / BOTÕES DINÂMICOS
   =========================== */
.nav-arrow {
    position: absolute;
    bottom: 18px;
    right: 18px;
    z-index: 55;
    background: rgba(255,255,255,0.04);
    border: 2px solid rgba(255,255,255,0.06);
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.nav-arrow.local { right: 80px; }

.btn-voltar {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 55;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #555;
}

/* ===========================
   MENU DIA 1
   =========================== */
#menu {
    width: 100%;
    margin: 20px auto 32px;

    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: center;

    background: rgba(0, 0, 0, 0.75);
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #555;
    max-width: 900px;
}

#menu button {
    background: #222;
    border: 2px solid #555;
    color: #fff;
    padding: 10px;
    border-radius: 8px;

    width: 90%;
    max-width: 360px;
    font-size: clamp(13px, 3.5vw, 16px);
    cursor: pointer;
}

/* ===========================
   MENU DIA 2
   =========================== */
#menu-dia2 {
    width: 100%;
    margin: 20px auto 32px;

    display: none;
    flex-direction: column;
    gap: 10px;
    align-items: center;

    background: rgba(0, 0, 0, 0.75);
    padding: 12px;
    border-radius: 12px;
    border: 2px solid #777;
    max-width: 900px;
}

#menu-dia2 button {
    background: #1b1b1b;
    border: 2px solid #666;
    color: #eee;
    padding: 10px;
    border-radius: 8px;

    width: 90%;
    max-width: 360px;
    font-size: clamp(13px, 3.5vw, 16px);
    cursor: pointer;
}

/* ===========================
   SUBMENU
   =========================== */
.submenu {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.submenu-titulo {
    width: 90%;
    max-width: 360px;
    text-align: center;
    padding: 10px;
    background: #333;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: pointer;
}

.submenu-opcoes {
    width: 90%;
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
}

.submenu:hover .submenu-opcoes {
    display: flex;
}

/* ===========================
   OVERLAY – PASSAGEM DE DIA
   =========================== */
#overlay-tempo {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, #111 0%, #000 70%);
    display: flex;
    align-items: center;
    justify-content: center;

    color: #e0e0e0;
    font-size: clamp(16px, 4vw, 22px);
    letter-spacing: 2px;
    text-align: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 2s ease;
    z-index: 9999;
}

#overlay-tempo.ativo {
    opacity: 1;
}

/* ===========================
   MEDIA QUERIES
   =========================== */
@media (max-width: 600px) {

    .hq-img, #ent {
        width: 100%;
        height: auto;
    }

    #btnProx {
        bottom: 12px;
        right: 12px;
        padding: 10px 14px;
        font-size: 14px;
    }

    .nav-arrow {
        bottom: 12px;
        right: 12px;
        font-size: 20px;
        padding: 8px 10px;
    }

    #menu button,
    #menu-dia2 button,
    .submenu-titulo {
        width: 96%;
        font-size: clamp(13px, 4vw, 16px);
    }
}
