/* ==========================================================================
   TEMA PRJ JOGOS ANOS 2010: LARANJA, AZUL E BRANCO (ESTILO RETRÔ FLASH)
   ========================================================================== */
:root {
    --azul-escuro: #003366;
    --azul-medio: #005bb5;
    --azul-claro: #0077dd;
    --azul-fundo: #e6f0fa;
    --azul-borda: #004488;
    
    --laranja-principal: #ff6600;
    --laranja-hover: #ff7711;
    --laranja-sombra: #cc4400;
    --amarelo-destaque: #ffd200;
    --amarelo-sombra: #c99700;

    --branco: #ffffff;
    --cinza-fundo: #f2f5f9;
    --cinza-borda: #d0dbe5;
    --texto-escuro: #1c2d42;
    --texto-suave: #4a5d73;
}

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

body {
    font-family: 'Fredoka', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--azul-fundo);
    background-image: 
        linear-gradient(90deg, rgba(0, 91, 181, 0.04) 1px, transparent 1px),
        linear-gradient(rgba(0, 91, 181, 0.04) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--texto-escuro);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Barra Superior Retrô (Notícias / Status da Turma) --- */
.top-ticker {
    background-color: var(--azul-escuro);
    color: #d8e8f8;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--azul-borda);
}

.top-ticker a, .top-ticker span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.audio-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    cursor: pointer;
    font-family: inherit;
}
.audio-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* --- Cabeçalho Principal PRJ Jogos --- */
header {
    background: linear-gradient(180deg, var(--azul-medio) 0%, var(--azul-escuro) 100%);
    border-bottom: 5px solid var(--laranja-principal);
    padding: 16px 20px;
    box-shadow: 0 4px 10px rgba(0, 30, 70, 0.25);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo Estilo 2010 */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.brand-logo-icon {
    background: linear-gradient(135deg, var(--amarelo-destaque), var(--laranja-principal));
    color: white;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 3px solid white;
    box-shadow: 0 3px 0 var(--laranja-sombra);
    transform: rotate(-3deg);
}

.brand-logo-text {
    display: flex;
    flex-direction: column;
}

.logo-main {
    font-family: 'Titan One', cursive, sans-serif;
    font-size: 34px;
    line-height: 1;
    color: var(--branco);
    text-shadow: 
        -2px -2px 0 var(--azul-escuro),  
         2px -2px 0 var(--azul-escuro),
        -2px  2px 0 var(--azul-escuro),
         2px  2px 0 var(--azul-escuro),
         0 4px 0 var(--laranja-sombra);
    letter-spacing: 0.5px;
}

.logo-main span {
    color: var(--amarelo-destaque);
}

.logo-sub {
    font-size: 12px;
    font-weight: 800;
    color: #d1e7ff;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Barra de Busca Estilo Flash 2010 */
.search-container {
    flex: 1;
    max-width: 520px;
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 12px 18px;
    font-size: 15px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    border: 3px solid var(--azul-escuro);
    border-right: none;
    border-radius: 10px 0 0 10px;
    outline: none;
    background-color: white;
    color: var(--texto-escuro);
}
.search-input:focus {
    background-color: #fffde8;
}

.btn-retro-orange {
    background: linear-gradient(180deg, var(--laranja-hover) 0%, var(--laranja-principal) 100%);
    color: white;
    border: 3px solid var(--azul-escuro);
    border-radius: 0 10px 10px 0;
    padding: 0 20px;
    font-family: 'Titan One', sans-serif;
    font-size: 16px;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
    text-shadow: 1px 1px 0 var(--laranja-sombra);
    transition: all 0.1s ease;
}
.btn-retro-orange:hover {
    background: linear-gradient(180deg, #ff8833 0%, var(--laranja-hover) 100%);
}
.btn-retro-orange:active {
    transform: translateY(2px);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.btn-random {
    background: linear-gradient(180deg, #ffca28 0%, #ffb300 100%);
    border: 3px solid var(--azul-escuro);
    color: #4a2800;
    padding: 10px 16px;
    border-radius: 10px;
    font-family: 'Titan One', cursive;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--amarelo-sombra);
    display: flex;
    align-items: center;
    gap: 6px;
}
.btn-random:hover {
    background: #ffe082;
}
.btn-random:active {
    transform: translateY(3px);
    box-shadow: 0 0 0 transparent;
}

/* --- Barra de Filtros (Matéria, Turma, Categoria) --- */
.filters-toolbar {
    background-color: white;
    border-bottom: 3px solid var(--cinza-borda);
    padding: 12px 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filters-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    justify-content: space-between;
}

.filter-groups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.filter-label {
    font-weight: 800;
    font-size: 13px;
    color: var(--azul-escuro);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.select-retro {
    background: white url('data:image/svg+xml;utf8,<svg fill="%23005bb5" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 8px center;
    border: 2px solid var(--azul-claro);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--texto-escuro);
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 0 var(--azul-borda);
    appearance: none;
}
.select-retro:hover, .select-retro:focus {
    border-color: var(--laranja-principal);
    box-shadow: 0 2px 0 var(--laranja-sombra);
}

.btn-clear-filters {
    background: #eaeef3;
    border: 2px solid #b8c7d6;
    color: #526375;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
}
.btn-clear-filters:hover {
    background: #d8e2ec;
    color: #1a2736;
}

.games-counter-badge {
    background-color: var(--azul-fundo);
    color: var(--azul-escuro);
    border: 2px dashed var(--azul-claro);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 800;
    font-size: 13px;
}

/* --- Conteúdo Principal --- */
main {
    max-width: 1280px;
    margin: 20px auto;
    padding: 0 20px;
    width: 100%;
    flex: 1;
}

/* Destaque Banner no Estilo PRJ Jogos */
.featured-banner {
    background: linear-gradient(135deg, #ff7b00 0%, #ff5500 100%);
    border: 3px solid var(--azul-escuro);
    border-radius: 12px;
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
    box-shadow: 0 4px 0 var(--azul-escuro);
    flex-wrap: wrap;
}

.featured-left {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
    min-width: 280px;
}

.featured-badge {
    background: var(--amarelo-destaque);
    color: #4a2800;
    font-family: 'Titan One', sans-serif;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    border: 2px solid var(--azul-escuro);
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 2px 0 var(--azul-escuro);
}

.featured-thumb {
    width: 140px;
    height: 95px;
    border-radius: 8px;
    border: 3px solid white;
    object-fit: cover;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.2);
    background-color: #003366;
}

.featured-title {
    font-family: 'Titan One', cursive;
    font-size: 26px;
    margin-bottom: 6px;
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}

.featured-info {
    font-size: 14px;
    color: #fff3e6;
    margin-bottom: 4px;
}

.btn-play-featured {
    background: linear-gradient(180deg, #ffffff 0%, #f0f0f0 100%);
    color: var(--laranja-principal);
    border: 3px solid var(--azul-escuro);
    padding: 14px 28px;
    border-radius: 12px;
    font-family: 'Titan One', cursive;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--azul-escuro);
    transition: all 0.1s ease;
    white-space: nowrap;
}
.btn-play-featured:hover {
    background: #fffbe6;
    color: #d84500;
}
.btn-play-featured:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 transparent;
}

/* Seção Título do Catálogo */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    border-bottom: 3px solid var(--laranja-principal);
    padding-bottom: 8px;
}

.section-title {
    font-family: 'Titan One', cursive;
    font-size: 22px;
    color: var(--azul-escuro);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid de Jogos (Estilo Cards Anos 2010) */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.game-card {
    background: white;
    border: 3px solid var(--azul-claro);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    box-shadow: 0 4px 0 var(--azul-borda);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    position: relative;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--laranja-principal);
    box-shadow: 0 8px 0 var(--laranja-sombra);
}

.game-card:active {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--azul-borda);
}

.card-thumb-wrap {
    position: relative;
    width: 100%;
    height: 160px;
    background-color: var(--azul-escuro);
    overflow: hidden;
    border-bottom: 3px solid var(--azul-claro);
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.game-card:hover .card-thumb {
    transform: scale(1.04);
}

.card-badge-flash {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--amarelo-destaque);
    color: #3d2300;
    font-family: 'Titan One', sans-serif;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 2px solid var(--azul-escuro);
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.card-badge-cat {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 51, 102, 0.88);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-family: 'Titan One', cursive;
    font-size: 18px;
    color: var(--azul-escuro);
    margin-bottom: 8px;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card:hover .card-title {
    color: var(--laranja-principal);
}

.card-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--texto-suave);
    margin-bottom: 4px;
}

.card-meta-row span {
    color: var(--azul-medio);
}

.card-materias-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
    margin-bottom: 10px;
}

.card-materia-tag {
    display: inline-flex;
    align-items: center;
    background-color: #ebf4ff;
    color: #0055aa;
    border: 1px solid #c2dcff;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.1s ease;
    width: fit-content;
}

.card-materia-tag:hover {
    background-color: var(--laranja-principal);
    color: white;
    border-color: var(--laranja-sombra);
    transform: translateY(-1px);
}

.card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 2px dashed #e1eaf2;
    padding-top: 10px;
}

.card-stars {
    color: #ff9900;
    font-size: 15px;
    letter-spacing: 1px;
}

.btn-card-play {
    background: linear-gradient(180deg, var(--laranja-hover), var(--laranja-principal));
    color: white;
    border: 2px solid var(--azul-escuro);
    border-radius: 6px;
    padding: 6px 12px;
    font-family: 'Titan One', sans-serif;
    font-size: 13px;
    box-shadow: 0 2px 0 var(--laranja-sombra);
}

/* --- ESTADO VAZIO / SEM RESULTADOS --- */
.empty-results {
    background: white;
    border: 3px dashed var(--azul-claro);
    border-radius: 12px;
    padding: 50px 20px;
    text-align: center;
    display: none;
}
.empty-results h3 {
    font-family: 'Titan One', cursive;
    font-size: 24px;
    color: var(--azul-escuro);
    margin-bottom: 10px;
}
.empty-results p {
    color: var(--texto-suave);
    font-size: 15px;
    margin-bottom: 20px;
}

/* ==========================================================================
   TELA DO PLAYER DE JOGO (NÃO REDIRECIONA - EMBUTE COM FICHA TÉCNICA)
   ========================================================================== */
.player-view {
    display: none;
    margin-bottom: 40px;
}

.player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-back-catalog {
    background: linear-gradient(180deg, var(--azul-claro) 0%, var(--azul-medio) 100%);
    color: white;
    border: 3px solid var(--azul-escuro);
    border-radius: 10px;
    padding: 10px 20px;
    font-family: 'Titan One', sans-serif;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 3px 0 var(--azul-borda);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-back-catalog:hover {
    background: var(--azul-claro);
}
.btn-back-catalog:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 var(--azul-borda);
}

.breadcrumbs {
    font-size: 14px;
    font-weight: 700;
    color: var(--texto-suave);
}
.breadcrumbs span {
    color: var(--laranja-principal);
}

/* Moldura de Arcade / Flash Retrô */
.arcade-cabinet {
    background: #111a24;
    border: 6px solid var(--azul-escuro);
    border-radius: 14px;
    box-shadow: 0 8px 0 var(--azul-borda), 0 12px 24px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    position: relative;
}

.arcade-header {
    background: linear-gradient(180deg, #27384a 0%, #162432 100%);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid #0a1118;
    color: white;
}

.arcade-game-title {
    font-family: 'Titan One', cursive;
    font-size: 20px;
    color: var(--amarelo-destaque);
    text-shadow: 1px 1px 0 #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.arcade-screen-container {
    position: relative;
    width: 100%;
    height: 640px;
    background-color: #000;
}

.arcade-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Barra de Ferramentas Inferior do Player */
.arcade-controls-bar {
    background: linear-gradient(180deg, #1e2c3a 0%, #121c26 100%);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 3px solid #0a1118;
    flex-wrap: wrap;
    gap: 10px;
}

.arcade-left-tools, .arcade-right-tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-arcade-tool {
    background: #2c3e50;
    color: white;
    border: 2px solid #4a6177;
    border-radius: 6px;
    padding: 6px 14px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-arcade-tool:hover {
    background: #39536b;
    border-color: #6a88a6;
}
.btn-arcade-tool:active {
    transform: translateY(1px);
}

.btn-arcade-favorite {
    background: #e74c3c;
    border-color: #c0392b;
}
.btn-arcade-favorite:hover {
    background: #f15a4a;
}

/* ==========================================================================
   TELA CHEIA (FULLSCREEN) DO ARCADE & MINI MENU HUD
   (Regras separadas sem agrupamento de prefixos para compatibilidade total)
   ========================================================================== */

body.cabinet-fullscreen-active {
    overflow: hidden !important;
}

/* 1. MODO TELA CHEIA VIA CLASSE JS (Funciona 100% em qualquer navegador) */
body.cabinet-fullscreen-active .arcade-cabinet,
.arcade-cabinet.is-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

body.cabinet-fullscreen-active .arcade-header,
.arcade-cabinet.is-fullscreen .arcade-header,
body.cabinet-fullscreen-active .arcade-controls-bar,
.arcade-cabinet.is-fullscreen .arcade-controls-bar {
    display: none !important;
}

body.cabinet-fullscreen-active .arcade-screen-container,
.arcade-cabinet.is-fullscreen .arcade-screen-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    z-index: 1 !important;
}

body.cabinet-fullscreen-active .arcade-iframe,
.arcade-cabinet.is-fullscreen .arcade-iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: none !important;
    display: block !important;
}

body.cabinet-fullscreen-active .arcade-fullscreen-menu,
.arcade-cabinet.is-fullscreen .arcade-fullscreen-menu {
    display: flex !important;
}

/* 2. MODO TELA CHEIA NATIVO (W3C Padrão) */
.arcade-cabinet:fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.arcade-cabinet:fullscreen .arcade-header,
.arcade-cabinet:fullscreen .arcade-controls-bar {
    display: none !important;
}

.arcade-cabinet:fullscreen .arcade-screen-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    z-index: 1 !important;
}

.arcade-cabinet:fullscreen .arcade-iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: none !important;
    display: block !important;
}

.arcade-cabinet:fullscreen .arcade-fullscreen-menu {
    display: flex !important;
}

/* 3. MODO TELA CHEIA WEBKIT (Chrome / Edge / Safari antigo) */
.arcade-cabinet:-webkit-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.arcade-cabinet:-webkit-full-screen .arcade-header,
.arcade-cabinet:-webkit-full-screen .arcade-controls-bar {
    display: none !important;
}

.arcade-cabinet:-webkit-full-screen .arcade-screen-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    z-index: 1 !important;
}

.arcade-cabinet:-webkit-full-screen .arcade-iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: none !important;
    display: block !important;
}

.arcade-cabinet:-webkit-full-screen .arcade-fullscreen-menu {
    display: flex !important;
}

/* 4. MODO TELA CHEIA MOZ (Firefox) */
.arcade-cabinet:-moz-full-screen {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #000 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.arcade-cabinet:-moz-full-screen .arcade-header,
.arcade-cabinet:-moz-full-screen .arcade-controls-bar {
    display: none !important;
}

.arcade-cabinet:-moz-full-screen .arcade-screen-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000 !important;
    z-index: 1 !important;
}

.arcade-cabinet:-moz-full-screen .arcade-iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    border: none !important;
    display: block !important;
}

.arcade-cabinet:-moz-full-screen .arcade-fullscreen-menu {
    display: flex !important;
}

/* Mini Menu Flutuante - Oculto por padrão, visível na tela cheia */
.arcade-fullscreen-menu {
    display: none;
    position: fixed;
    top: 14px;
    left: 0;
    width: 100%;
    justify-content: center;
    align-items: center;
    z-index: 10000000;
    pointer-events: none; /* Permite cliques no jogo fora da barra */
    animation: slideDownFsMenu 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideDownFsMenu {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Barra Flutuante estilo Cápsula Retro-Gamer */
.fs-menu-pill {
    pointer-events: auto; /* Reativa cliques nos botões */
    background: rgba(17, 26, 36, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid #34495e;
    border-radius: 40px;
    padding: 6px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.fs-menu-pill:hover {
    opacity: 1;
    transform: translateY(2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.85), 0 0 0 2px var(--azul-borda);
}

.fs-menu-game-info {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    color: var(--amarelo-destaque);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 12px;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.fs-menu-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-fs-tool {
    background: #27384a;
    color: white;
    border: 1.5px solid #4a6682;
    border-radius: 20px;
    padding: 6px 14px;
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.15s ease;
}

.btn-fs-tool:hover {
    background: #39536b;
    border-color: #799bbb;
    transform: translateY(-1px);
}

.btn-fs-tool:active {
    transform: translateY(1px);
}

.btn-fs-exit {
    background: #e74c3c;
    border-color: #c0392b;
}

.btn-fs-exit:hover {
    background: #f15a4a;
    border-color: #e74c3c;
}

@media (max-width: 700px) {
    .fs-menu-pill {
        padding: 5px 10px;
        gap: 6px;
    }
    .fs-menu-game-info {
        display: none;
    }
    .btn-fs-tool {
        padding: 5px 10px;
        font-size: 11px;
    }
}

/* Painel de Informações do Aluno e do Jogo */
.game-details-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 24px;
}

@media (max-width: 900px) {
    .game-details-layout {
        grid-template-columns: 1fr;
    }
    .arcade-screen-container {
        height: 480px;
    }
}

.details-main-box {
    background: white;
    border: 3px solid var(--azul-claro);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 0 var(--azul-borda);
}

.details-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 2px dashed #d5e2ed;
    padding-bottom: 12px;
}

.game-full-title {
    font-family: 'Titan One', cursive;
    font-size: 28px;
    color: var(--azul-escuro);
}

/* Crachá do Aluno */
.student-badge-card {
    background: linear-gradient(135deg, #eef7ff 0%, #dcecfa 100%);
    border: 2px solid var(--azul-claro);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.student-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--laranja-principal), var(--amarelo-destaque));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    border: 3px solid white;
    box-shadow: 0 2px 0 var(--laranja-sombra);
}

.student-info-meta h4 {
    font-family: 'Titan One', cursive;
    font-size: 18px;
    color: var(--azul-escuro);
    margin-bottom: 4px;
}

.student-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.student-pill {
    background: white;
    border: 1px solid #b3d1ff;
    color: var(--azul-medio);
    font-weight: 800;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
}

.details-section-title {
    font-family: 'Titan One', cursive;
    font-size: 18px;
    color: var(--laranja-principal);
    margin: 16px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--texto-escuro);
    margin-bottom: 14px;
}

.details-controls-box {
    background-color: #f8fafc;
    border-left: 4px solid var(--laranja-principal);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 14px;
    margin-top: 10px;
}

/* Coluna Lateral do Player */
.details-side-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rating-card {
    background: white;
    border: 3px solid var(--amarelo-sombra);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 0 #d1a100;
}

.rating-card h4 {
    font-family: 'Titan One', cursive;
    font-size: 18px;
    color: var(--azul-escuro);
    margin-bottom: 8px;
}

.star-rating-widget {
    font-size: 32px;
    color: #ccc;
    cursor: pointer;
    margin-bottom: 6px;
    user-select: none;
}

.star-rating-widget .star {
    transition: color 0.15s;
}
.star-rating-widget .star.active,
.star-rating-widget .star.hovered {
    color: #ff9900;
}

.rating-feedback {
    font-size: 13px;
    font-weight: 700;
    color: #27ae60;
    min-height: 20px;
}

.side-related-games {
    background: white;
    border: 3px solid var(--azul-claro);
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 0 var(--azul-borda);
}

.side-related-games h4 {
    font-family: 'Titan One', cursive;
    font-size: 16px;
    color: var(--azul-escuro);
    margin-bottom: 14px;
    border-bottom: 2px solid var(--azul-fundo);
    padding-bottom: 6px;
}

.mini-game-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mini-game-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px;
    border-radius: 8px;
    background: #f7f9fc;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.15s ease;
}

.mini-game-item:hover {
    border-color: var(--laranja-principal);
    background: #fff8f0;
    transform: translateX(4px);
}

.mini-game-thumb {
    width: 60px;
    height: 42px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--azul-claro);
    background: #003366;
}

.mini-game-info h5 {
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: var(--azul-escuro);
    line-height: 1.2;
}

.mini-game-info span {
    font-size: 11px;
    color: var(--texto-suave);
}

/* --- Rodapé Retrô dos Anos 2010 --- */
footer {
    background-color: var(--azul-escuro);
    border-top: 4px solid var(--laranja-principal);
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    font-size: 14px;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-left p {
    color: #bcd5f0;
    margin-top: 4px;
    font-size: 13px;
}

.footer-badges {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-badge {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
}

/* ==========================================================================
   ESTATÍSTICAS NOSQL (CARDS, PLAYER E DESTAQUE DOS ÚLTIMOS 30 DIAS)
   ========================================================================== */
.card-stats-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    color: var(--texto-suave);
    flex-wrap: wrap;
}

.card-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: #f0f4f9;
    padding: 3px 6px;
    border-radius: 4px;
    border: 1px solid #d4e0ec;
    white-space: nowrap;
}

.card-stat-chip.heart {
    color: #d63031;
    background: #fff1f0;
    border-color: #ffccc7;
}

.card-stat-chip.rating {
    color: #e67e22;
    background: #fff8ee;
    border-color: #ffe3c2;
}

.card-stat-chip.plays {
    color: #0984e3;
    background: #eff7ff;
    border-color: #d0e7ff;
}

.arcade-plays-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #d1e7ff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-arcade-favorite.liked {
    background: #27ae60 !important;
    border-color: #1e8449 !important;
    color: white !important;
}

.featured-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.featured-pill {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   NOTIFICAÇÕES TOAST LATERAIS (FEEDBACK DE LIKES E AVALIAÇÕES)
   ========================================================================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100000000;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
}

.toast-notification {
    pointer-events: auto;
    background: rgba(17, 26, 36, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px solid var(--azul-borda);
    border-radius: 12px;
    padding: 12px 18px;
    color: white;
    font-family: 'Fredoka', sans-serif;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    max-width: 380px;
    animation: toastSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-notification.toast-out {
    animation: toastSlideOut 0.3s forwards ease-in;
}

.toast-notification.toast-success {
    border-color: #27ae60;
}
.toast-notification.toast-info {
    border-color: #3498db;
}

.toast-icon {
    font-size: 20px;
    line-height: 1;
}

.toast-text {
    flex: 1;
    line-height: 1.4;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(120%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(120%);
    }
}

