/* ============================================================
   RESET & VARIÁVEIS
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --bg-0: #0a0a12;
    --bg-1: #12121f;
    --bg-2: #1a1a2e;
    --border: #2a2a40;
    --text: #ffffff;
    --text-muted: #a0a0b0;

    --gb-case: #513e73;
    --gb-case-dark: #3a2c53;
    --gb-case-light: #6a5298;
    --gb-screen-lens: #12141a;
    --gb-btn-ab: #8b2f5e;
    --gb-btn-ab-shadow: #591b38;

    --dpad-color: #2a2a3e;
    --dpad-dark: #15151f;
    --btn-a: #8b2f5e;
    --btn-b: #4a8fe7;

    --topbar-h: 56px;
    --footer-h: 36px;
}

body[data-gb-theme="purple"] { --gb-case: #513e73; --gb-case-dark: #3a2c53; --gb-case-light: #6a5298; --gb-btn-ab: #8b2f5e; }
body[data-gb-theme="teal"]   { --gb-case: #23787a; --gb-case-dark: #154e50; --gb-case-light: #32a1a4; --gb-btn-ab: #1e3d59; }
body[data-gb-theme="pink"]   { --gb-case: #d96b8e; --gb-case-dark: #a84b69; --gb-case-light: #f08cae; --gb-btn-ab: #58335e; }
body[data-gb-theme="yellow"] { --gb-case: #e3bc41; --gb-case-dark: #b5922a; --gb-case-light: #f5d46c; --gb-btn-ab: #2b4c7e; }
body[data-gb-theme="berry"]  { --gb-case: #801538; --gb-case-dark: #570b23; --gb-case-light: #a8224d; --gb-btn-ab: #e3bc41; }
body[data-gb-theme="pocket"] { --gb-case: #c5c7cc; --gb-case-dark: #97999e; --gb-case-light: #e0e2e8; --gb-btn-ab: #2b2d38; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;              /* 🔒 impede scroll global */
    position: fixed;                /* 🔒 trava a viewport no mobile */
    font-family: 'Segoe UI', system-ui, -apple-system, Tahoma, sans-serif;
    background: var(--bg-0);
    color: var(--text);
    overscroll-behavior: none;
    -webkit-overflow-scrolling: none;
    touch-action: manipulation;
}

.hidden { display: none !important; }

/* ============================================================
   CATÁLOGO — LAYOUT DE APP (tela cheia, sem scroll)
   ============================================================ */
.catalog-view {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    overflow: hidden;
    /*background:
        radial-gradient(ellipse at top, rgba(81, 62, 115, 0.35), transparent 55%),
        radial-gradient(ellipse at bottom, rgba(139, 47, 94, 0.25), transparent 55%),
        linear-gradient(180deg, #0a0a12 0%, #12121f 100%); */
        background: url(games/covers/cdz.webp);
    background-repeat: no-repeat;
    background-size: 100%;
}

/* Topbar estilo app */
.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    height: var(--topbar-h);
    flex-shrink: 0;
    background: rgba(10, 10, 18, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.app-logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #ffffff 0%, #ffb86c 45%, var(--gb-case-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Área principal ocupa todo o resto */
.catalog-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    overflow: hidden;
    min-height: 0;                  /* permite flex shrink */
    position: relative;
}

/* Rodapé discreto */
.catalog-footer {
    height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--text-muted);
    background: rgba(10, 10, 18, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.catalog-footer p { opacity: 0.6; }

/* ============================================================
   CARROSSEL 3D — OCUPA TODO O ESPAÇO DISPONÍVEL
   ============================================================ */
.carousel-3d-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1600px;
    perspective-origin: 50% 50%;
    overflow: hidden;
    min-height: 0;
}

@media (max-width: 900px) {
    .carousel-3d-wrapper { perspective: 1200px; }
}

@media (max-width: 600px) {
    .carousel-3d-wrapper { perspective: 900px; }
}

.carousel-3d-stage {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.9s cubic-bezier(0.25, 0.8, 0.3, 1);
    will-change: transform;
}

/* Cada card no palco */
.carousel-3d-stage .game-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 340px;
    height: 480px;
    margin-left: -170px;
    margin-top: -240px;
    transform-style: preserve-3d;
    transition:
        transform 0.9s cubic-bezier(0.25, 0.8, 0.3, 1),
        opacity 0.6s ease,
        filter 0.6s ease,
        box-shadow 0.6s ease;
    cursor: pointer;
    backface-visibility: hidden;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: var(--bg-2);
}

@media (max-width: 900px) {
    .carousel-3d-stage .game-card {
        width: 260px; height: 370px;
        margin-left: -130px; margin-top: -185px;
    }
}

@media (max-width: 600px) {
    .carousel-3d-stage .game-card {
        width: 200px; height: 285px;
        margin-left: -100px; margin-top: -142px;
    }
}

/* Altura muito baixa (ex: celular deitado) — reduz ainda mais */
@media (max-height: 600px) {
    .carousel-3d-stage .game-card {
        width: 180px; height: 255px;
        margin-left: -90px; margin-top: -127px;
    }
}

/* Card ATIVO — destaque máximo */
.carousel-3d-stage .game-card.active {
    z-index: 10;
    box-shadow:
        0 30px 70px rgba(0, 0, 0, 0.9),
        0 0 0 4px var(--gb-case-light),
        0 0 60px rgba(106, 82, 152, 0.7);
}

.carousel-3d-stage .game-card.active .game-overlay { opacity: 1; }

.carousel-3d-stage .game-card:not(.active) {
    filter: brightness(0.5) saturate(0.7) blur(1px);
    opacity: 0.75;
}

.carousel-3d-stage .game-card:not(.active):hover {
    filter: brightness(0.85) saturate(1) blur(0);
    opacity: 1;
}

.carousel-3d-stage .game-card:not(.active) .game-overlay { opacity: 0; }

.game-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.carousel-3d-stage .game-card.active:hover .game-cover { transform: scale(1.03); }

.game-cover-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.game-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 40%, rgba(0, 0, 0, 0.7) 75%, rgba(0, 0, 0, 0.95) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.game-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
}

.game-play-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffb86c;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.play-icon {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--gb-case-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: #fff;
}

@media (hover: none) {
    .game-overlay { opacity: 1; }
    .game-play-hint { display: none; }
}

/* ============================================================
   LEGENDA DO JOGO SELECIONADO
   ============================================================ */
.carousel-3d-caption {
    flex-shrink: 0;
    text-align: center;
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: none;
}

.caption-title {
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
}

.caption-hint {
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.7;
}

@media (max-width: 600px) {
    .caption-title { font-size: 1rem; }
    .caption-hint  { font-size: 0.6rem; }
}

@media (max-height: 600px) {
    .carousel-3d-caption { padding: 4px 12px 8px; }
    .caption-title { font-size: 0.9rem; }
    .caption-hint  { display: none; }
}

/* ============================================================
   SETAS DO CARROSSEL
   ============================================================ */
.carousel-3d-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: rgba(10, 10, 18, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
    font-family: inherit;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.carousel-3d-nav:hover {
    background: var(--gb-case-light);
    border-color: var(--gb-case-light);
    transform: translateY(-50%) scale(1.1);
}

.carousel-3d-nav:active { transform: translateY(-50%) scale(0.95); }

.carousel-3d-prev { left: 20px; }
.carousel-3d-next { right: 20px; }

@media (max-width: 600px) {
    .carousel-3d-nav { width: 44px; height: 44px; font-size: 1.5rem; }
    .carousel-3d-prev { left: 6px; }
    .carousel-3d-next { right: 6px; }
}

/* Botão de instalar (compacto) */
.install-btn {
    padding: 8px 14px;
    background: linear-gradient(135deg, #e50914, #ff2b3a);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(229, 9, 20, 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(229, 9, 20, 0.6);
}

.install-btn:active { transform: scale(0.97); }

/* ============================================================
   PLAYER — TELA CHEIA DO JOGO (sem alterações)
   ============================================================ */
.player-view {
    position: fixed;
    inset: 0;
    background: #000;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(10, 10, 18, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
    gap: 10px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.back-btn:hover {
    background: var(--gb-case-light);
    border-color: var(--gb-case-light);
}

.player-title {
    flex: 1;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-actions { display: flex; gap: 6px; }

.icon-btn {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.12); }

.player-screen-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gb-case-dark);
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid var(--gb-case-dark);
    min-height: 0;
}

.player-screen {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 4 / 3;
    position: relative;
    background: var(--gb-screen-lens);
    border: 8px solid var(--gb-case-dark);
    border-radius: 6px;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.8);
}

.player-screen canvas,
.player-screen > div {
    width: 100% !important;
    height: 100% !important;
    display: block;
    image-rendering: pixelated;
}

.player-screen .ejs_virtualGamepad,
.player-screen [class*="virtualGamepad"] {
    display: none !important;
}

/* ============================================================
   CONTROLES TOUCH
   ============================================================ */
.player-controls {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 14px 22px 18px;
    background: linear-gradient(180deg, var(--gb-case-light) 0%, var(--gb-case) 30%, var(--gb-case-dark) 100%);
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
    box-shadow: inset 0 8px 16px rgba(255, 255, 255, 0.1);
}

@media (max-width: 899px) {
    .player-controls { display: flex; }
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 560px;
    width: 100%;
    margin: 0 auto;
}

.dpad {
    position: relative;
    width: 148px; height: 148px;
    flex-shrink: 0;
}

.dpad-btn {
    position: absolute;
    background: linear-gradient(145deg, #2a2c37, #15161c);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08), 0 3px 6px rgba(0, 0, 0, 0.4);
}

.dpad-btn:active,
.dpad-btn.pressed {
    transform: scale(0.93);
    background: #0d0e12;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.9);
}

.dpad-up, .dpad-down   { width: 52px; height: 54px; left: 48px; }
.dpad-up   { top: 0;    border-radius: 10px 10px 4px 4px; }
.dpad-down { bottom: 0; border-radius: 4px 4px 10px 10px; }

.dpad-left, .dpad-right { width: 54px; height: 52px; top: 48px; }
.dpad-left  { left: 0;  border-radius: 10px 4px 4px 10px; }
.dpad-right { right: 0; border-radius: 4px 10px 10px 4px; }

.dpad-center {
    position: absolute;
    top: 48px; left: 48px;
    width: 52px; height: 52px;
    background: #1c1d25;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.dpad-center::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 16px; height: 16px;
    background: #0d0e12;
    border-radius: 50%;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

.ab-buttons {
    display: flex;
    align-items: center;
    gap: 22px;
    padding-right: 6px;
    transform: rotate(-15deg);
}

.round-btn {
    width: 86px; height: 86px;
    border-radius: 50%;
    border: none;
    color: #ffd8e4;
    font-weight: 800;
    font-size: 1.3rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    background: radial-gradient(circle at 35% 30%, #b84a82 0%, var(--gb-btn-ab) 55%, var(--gb-btn-ab-shadow) 100%);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.3), 0 6px 14px rgba(0, 0, 0, 0.4);
}

.round-btn:active,
.round-btn.pressed { transform: scale(0.9); }

.start-select {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
    transform: rotate(-25deg);
}

.ss-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.pill-btn {
    width: 58px; height: 16px;
    border-radius: 10px;
    background: linear-gradient(180deg, #252733 0%, #121319 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

.pill-btn:active,
.pill-btn.pressed {
    transform: scale(0.94);
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.8);
}

.ss-label {
    font-size: 0.55rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1.5px;
    font-weight: 700;
}

.player-info {
    display: none;
    padding: 12px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    background: rgba(10, 10, 18, 0.6);
}

@media (min-width: 900px) {
    .player-info { display: block; }
}

/* ============================================================
   ERRO
   ============================================================ */
.error-view {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 10, 18, 0.95);
    z-index: 200;
    padding: 20px;
}

.error-box {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
}

.error-box h2 {
    color: #e50914;
    margin-bottom: 16px;
    font-size: 1.4rem;
}

.error-box p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.error-box code {
    background: var(--bg-0);
    padding: 2px 8px;
    border-radius: 4px;
    color: #ffb86c;
}

.btn {
    background: #e50914;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================================
   MODO PAISAGEM (LANDSCAPE) — MOBILE
   ============================================================ */
@media (max-width: 899px) and (orientation: landscape) {

    .player-view {
        flex-direction: row;
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    .player-topbar,
    .player-info {
        display: none !important;
    }

    .player-screen-wrapper {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #000;
        border: none;
        padding: 0;
        overflow: hidden;
        position: relative;
    }

    .player-screen {
        width: auto;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        aspect-ratio: 4 / 3;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #000;
    }

    .player-controls { display: contents; }
    .controls-row { display: contents; }

    .dpad {
        position: fixed;
        left: max(14px, env(safe-area-inset-left));
        top: 50%;
        transform: translateY(-50%);
        width: 38vh; height: 38vh;
        min-width: 140px; min-height: 140px;
        max-width: 240px; max-height: 240px;
        z-index: 300;
    }

    .dpad-up, .dpad-down { width: 35%; height: 36%; left: 32.5%; }
    .dpad-up   { top: 0;    border-radius: 10px 10px 4px 4px; }
    .dpad-down { bottom: 0; border-radius: 4px 4px 10px 10px; }

    .dpad-left, .dpad-right { width: 36%; height: 35%; top: 32.5%; }
    .dpad-left  { left: 0;  border-radius: 10px 4px 4px 10px; }
    .dpad-right { right: 0; border-radius: 4px 10px 10px 4px; }

    .dpad-center { top: 32.5%; left: 32.5%; width: 35%; height: 35%; }
    .dpad-center::after { width: 22%; height: 22%; }

    .ab-buttons {
        position: fixed;
        right: max(18px, env(safe-area-inset-right));
        top: 50%;
        transform: translateY(-50%) rotate(-15deg);
        gap: 3vh;
        padding-right: 0;
        z-index: 300;
    }

    .round-btn {
        width: 22vh; height: 22vh;
        min-width: 80px; min-height: 80px;
        max-width: 140px; max-height: 140px;
        font-size: clamp(1.1rem, 3.2vh, 1.8rem);
    }

    .start-select {
        position: fixed;
        right: max(18px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        transform: rotate(-25deg);
        gap: 4vh;
        max-width: none;
        width: auto;
        margin: 0;
        z-index: 300;
    }

    .pill-btn {
        width: 14vh; height: 3.8vh;
        min-width: 60px; min-height: 16px;
        max-width: 110px; max-height: 28px;
        border-radius: 12px;
    }

    .ss-label { font-size: clamp(0.55rem, 1.4vh, 0.75rem); }

    .btn-orientation {
        display: flex;
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
    }

    .player-screen .ejs_virtualGamepad,
    .player-screen [class*="virtualGamepad"] {
        display: none !important;
    }
}

@media (max-width: 899px) and (orientation: landscape) and (max-height: 400px) {
    .dpad {
        width: 44vh; height: 44vh;
        min-width: 120px; min-height: 120px;
        max-width: 180px; max-height: 180px;
    }
    .round-btn {
        width: 26vh; height: 26vh;
        min-width: 70px; min-height: 70px;
        max-width: 100px; max-height: 100px;
        font-size: clamp(1rem, 3.8vh, 1.5rem);
    }
    .ab-buttons { gap: 3.5vh; }
    .pill-btn {
        width: 16vh; height: 4.5vh;
        min-width: 52px; min-height: 14px;
        max-width: 80px; max-height: 22px;
    }
    .ss-label { font-size: 0.55rem; }
}

@media (max-width: 899px) and (orientation: landscape) and (min-height: 420px) {
    .dpad {
        width: 40vh; height: 40vh;
        max-width: 260px; max-height: 260px;
    }
    .round-btn {
        width: 24vh; height: 24vh;
        max-width: 150px; max-height: 150px;
    }
    .pill-btn {
        width: 15vh; height: 4vh;
        max-width: 120px; max-height: 30px;
    }
}

@supports (padding: max(0px)) {
    .btn-orientation {
        top: max(12px, env(safe-area-inset-top));
        right: max(12px, env(safe-area-inset-right));
    }
}

/* ============================================================
   AVISO DE ROTAÇÃO
   ============================================================ */
.rotate-hint {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 18, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

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

.rotate-hint-content {
    text-align: center;
    color: #fff;
    max-width: 380px;
    width: 100%;
    padding: 32px 24px;
    background: linear-gradient(180deg, rgba(81, 62, 115, 0.25) 0%, rgba(26, 26, 46, 0.6) 100%);
    border: 1px solid rgba(106, 82, 152, 0.4);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.rotate-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    animation: rotatePhone 2.4s ease-in-out infinite;
    filter: drop-shadow(0 8px 16px rgba(106, 82, 152, 0.6));
}

@keyframes rotatePhone {
    0%, 20%   { transform: rotate(0deg); }
    50%, 70%  { transform: rotate(90deg); }
    100%      { transform: rotate(0deg); }
}

.rotate-hint-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.rotate-hint-content p {
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.btn-rotate {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6a5298 0%, #8b6bc4 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
    font-family: inherit;
    box-shadow: 0 8px 24px rgba(106, 82, 152, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    letter-spacing: 0.3px;
}

.btn-rotate:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(106, 82, 152, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-rotate:active { transform: translateY(0) scale(0.98); }

.btn-continue {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 24px;
    background: transparent;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease;
}

.btn-continue:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-continue:active { transform: scale(0.98); }

@media (max-width: 380px) and (orientation: portrait) {
    .rotate-hint-content { padding: 24px 20px; }
    .rotate-icon { font-size: 3rem; }
    .rotate-hint-content h2 { font-size: 1.25rem; }
    .rotate-hint-content p { font-size: 0.85rem; }
    .btn-rotate { padding: 14px 20px; font-size: 1rem; }
    .btn-continue { padding: 12px 20px; font-size: 0.85rem; }
}