/* ===================================
   Rapta - Game Page
   =================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --header-height: clamp(80px, 12vh, 100px); /* Aumentado para não cortar o logo */
    --rapta-green: #00FF00; /* Verde Neon Puro */
    --rapta-yellow: #FFFF00; /* Amarelo de Segurança */
    --bg-dark: #000000; /* Preto Absoluto */
    --text-primary: #00FF00;
    --border-subtle: #1a1a1a;
    --scanline-color: rgba(0, 255, 0, 0.05);
}

html {
    font-size: clamp(14px, 1.5vw, 24px); /* Base fluida */
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

@font-face {
    font-family: 'RaptaCustom';
    src: url('https://raw.githubusercontent.com/Felipai/Rapta-PressKit/main/Rapta-Regular.ttf');
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
    font-family: 'Inter', sans-serif;
    position: relative;
}

body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(var(--scanline-color) 50%, rgba(0, 0, 0, 0.1) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.02), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.02));
    z-index: 9999;
    background-size: 100% 4px, 3px 100%;
    pointer-events: none;
    opacity: 0.3;
}

body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 9999;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.27861; }
    5% { opacity: 0.34769; }
    10% { opacity: 0.23604; }
    15% { opacity: 0.90626; }
    20% { opacity: 0.18128; }
    25% { opacity: 0.83891; }
    30% { opacity: 0.65583; }
    35% { opacity: 0.57807; }
    40% { opacity: 0.26593; }
    45% { opacity: 0.28741; }
    50% { opacity: 0.89608; }
    55% { opacity: 0.33014; }
    60% { opacity: 0.79541; }
    65% { opacity: 0.31214; }
    70% { opacity: 0.18304; }
    75% { opacity: 0.90298; }
    80% { opacity: 0.38019; }
    85% { opacity: 0.11603; }
    90% { opacity: 0.75957; }
    95% { opacity: 0.7512; }
    100% { opacity: 0.26393; }
}

/* --- Menu --- */
header {
    display: flex;
    align-items: center;
    background-color: #111;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: var(--header-height);
    border-bottom: 2px solid var(--rapta-green);
    z-index: 1000;
}

header a:has(.logo-header) {
    height: 100%;
    display: flex;
    align-items: center;
    margin-right: auto; /* Empurra o resto do menu para a direita */
}

.logo-header {
    height: 55px;
    width: auto;
    margin-left: 20px;
    opacity: 0.9;
    filter: drop-shadow(0 0 3px rgba(195, 121, 255, 0.6)); /* Lilás suave, efeito de borda */
    transition: all 0.3s ease;
}
.logo-header:hover { 
    transform: scale(1.1); 
    opacity: 1;
    filter: drop-shadow(0 0 6px rgba(195, 121, 255, 0.9));
}

header a {
    margin-right: clamp(14px, 4vw, 40px);
    text-decoration: none;
    color: var(--text-primary);
    font-family: 'RaptaCustom', sans-serif;
    font-size: clamp(18px, 1.3rem, 30px);
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
    opacity: 0.7;
}

/* Efeito de sublinhado neon no hover e active */
header a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: transparent; /* Começa transparente */
    transition: width 0.3s ease, background-color 0.3s ease;
}

header a:hover {
    color: var(--rapta-green);
    opacity: 1;
    text-shadow: 0 0 8px var(--rapta-green);
}

header a:hover::after {
    width: 100%;
    background-color: var(--rapta-green);
    box-shadow: 0 0 10px var(--rapta-green);
}

/* Estado Ativo (Amarelo) tem prioridade sobre o hover */
header a.active {
    color: var(--rapta-yellow) !important;
    opacity: 1;
    text-shadow: 0 0 10px var(--rapta-yellow);
}

header a.active::after {
    width: 100% !important;
    background-color: var(--rapta-yellow) !important;
    box-shadow: 0 0 15px var(--rapta-yellow) !important;
}

header a.icon { display: none; }

.social-header {
    display: flex;
    gap: 15px;
    margin-right: 40px;
    margin-left: auto;
}

.social-header a {
    margin: 0;
    font-size: 1.2rem;
    color: #888;
}

.social-header a:hover {
    color: var(--rapta-green);
    transform: translateY(-2px);
}

/* --- Banner & Start Seta (Fit in single screen) --- */
#Banner {
    background: #000 url("img/Background.png") no-repeat center center;
    background-size: cover;
    width: 100vw;
    height: calc(90vh - var(--header-height)); /* Ocupa quase a tela toda menos menu e sobra pro #Start */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: background-position 0.2s ease-out; /* Suaviza o movimento do fundo */
}

#Banner img {
    height: 95%; /* Aumentado para mais destaque */
    max-width: 95vw;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5)); /* Sombra para destacar do fundo */
    transition: transform 0.2s ease-out; /* Suaviza o movimento do mouse */
}

#Start {
    background-color: #000;
    height: 10vh; /* Complementa o 90vh do banner = 100vh da view total */
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--rapta-green);
}

#Start a {
    text-decoration: none;
    color: var(--rapta-green);
    font-size: 2.5rem;
    animation: bounce 2s infinite;
    text-shadow: 0 0 15px var(--rapta-green), 0 0 5px var(--rapta-green); /* Brilho Neon */
    transition: transform 0.3s ease, text-shadow 0.3s ease;
}

#Start a:hover {
    text-shadow: 0 0 25px var(--rapta-green), 0 0 10px var(--rapta-green);
    transform: scale(1.2);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-7px); }
}

/* --- Separadores --- */
#Marcador_1, #Marcador_2 {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}
#Marcador_1 img, #Marcador_2 img {
    height: clamp(40px, 10vw, 100px);
}
.Margin-Bot { margin-bottom: 1vh; }

/* --- Minigame Section --- */
#Game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 0;
    min-height: calc(100vh - var(--header-height) - 10vh); /* Foca no espaço visível logo abaixo da seta */
}

#Game iframe {
    width: clamp(300px, 60vw, 900px); /* Reduzido para caber melhor na tela */
    height: auto;
    aspect-ratio: 16 / 9;
    background-color: #000;
    border-radius: 15px;
    border: 2px solid var(--rapta-green);
    box-shadow: 0 0 20px rgba(2, 254, 99, 0.2);
}

#GameLink { display: none; }

/* --- Content Sections --- */
.content-section {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.content-card {
    width: clamp(300px, 80vw, 1000px);
    padding: 40px;
    color: #e0ffd1;
    border-radius: 12px;
    border: 1px solid rgba(2, 254, 99, 0.3);
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}

/* Fundo da imagem escurecido */
.content-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.88); /* Mais escuro para destacar texto reduzido */
    z-index: 1;
}

/* O conteúdo sobrepõe o before */
.content-head, .content-body {
    position: relative;
    z-index: 2;
}

.content-head {
    font-family: 'RaptaCustom', sans-serif;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 900;
    color: var(--rapta-yellow);
    text-shadow: 0 0 10px rgba(255, 255, 0, 0.5);
}

.content-body p {
    font-size: 0.75rem; /* Meio-termo: menor que o original mas não tão pequeno */
    line-height: 1.6;
}

.Point-Item {
    display: block;
    margin-top: 12px;
    padding-left: 15px;
    border-left: 3px solid var(--rapta-green);
    font-style: italic;
    font-size: 0.7rem; /* Meio-termo */
    color: #e0e0e0;
}

#Folder { background-image: url("img/Pasta.png"); }
#Snake { background-image: url("img/silicon\ snake.png"); }

/* --- Steam Widget --- */
#SteamContent {
    width: 100%;
    min-height: 100vh;
    background: url("img/menuart.png") no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px 20px;
}

#SteamContent::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
}

#SteamHead, #SteamWidget {
    position: relative;
    z-index: 2;
}

#SteamHead {
    color: #fff;
    text-align: center;
    font-family: 'RaptaCustom', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(2, 254, 99, 0.5);
}

#SteamWidget iframe { 
    width: clamp(300px, 70vw, 650px);
    height: clamp(190px, 35vh, 350px);
    border: none;
}

#SteamExtraWidgets {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 20px;
    flex-wrap: wrap;
}

#SteamExtraWidgets iframe {
    width: clamp(300px, 40vw, 480px);
    height: 190px;
    border: none;
}

/* --- Footer --- */
footer {
    padding: 40px 20px;
    background-color: #000000;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    border-top: 1px solid #1a1a1a;
    gap: 20px;
}

.logo-footer {
    width: 160px;
    opacity: 0.9;
}

#Contatos ul {
    list-style: none;
    color: #888;
    text-align: center;
}

.social-links-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.social-links-footer i {
    color: #888;
    font-size: 1.4rem;
    transition: color 0.3s, transform 0.3s;
}

.social-links-footer a:hover i {
    color: var(--rapta-green);
    transform: scale(1.1);
}

#Contatos li {
    margin-bottom: 5px;
    font-size: 14px; /* Reduzido de 16px */
}

#Contatos a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s;
}

#Contatos a:hover {
    color: var(--rapta-green);
    text-shadow: 0 0 5px var(--rapta-green);
}

.copyright {
    margin-top: 15px;
    font-size: 12px !important;
    opacity: 0.6;
}

#lang-switcher {
    border-radius: 5px;
    border: 1px solid var(--rapta-yellow);
    padding: 5px 10px;
    background-color: transparent;
    color: var(--rapta-yellow);
    cursor: pointer;
    font-family: 'RaptaCustom', sans-serif;
    font-size: 12px; /* Reduzido de 14px */
}
#lang-switcher option { color: #000; }

/* --- Mobile Responsivo --- */
@media screen and (max-width: 800px) {
    /* Navbar Dropdown */
    .topnav { 
        flex-direction: column; 
        align-items: flex-start; 
        height: var(--header-height); 
        overflow: hidden; 
        background: #111;
        transition: height 0.3s ease;
    }
    .topnav.responsive { 
        height: auto; 
        padding-bottom: 15px; 
    }
    .topnav a:not(:first-child):not(.icon) { 
        display: none; 
        width: 100%; 
        text-align: left; 
        padding: 12px 25px; 
        margin: 0; 
    }
    .topnav.responsive a:not(:first-child):not(.icon) { 
        display: block; 
    }
    .topnav a.icon { 
        position: absolute; 
        right: 20px; 
        top: 20px; 
        display: block; 
    }
    .logo-header {
        margin-top: 10px; /* Alinha a logo dentro do header colapsado */
    }

    .social-header {
        display: none;
    }

    /* Banner Fix - Mostra bordas laterais sem crop exagerado */
    #Banner {
        height: 55vh; /* Diminui a altura pro recorte de cover revelar as laterais no mobile */
        background-position: center center;
    }
    #Banner img {
        height: auto;
        width: 90vw;
        max-height: 40vh; /* Impede que a logo fique gigante verticalmente */
    }

    /* Minigame/Content fixes */
    #Game iframe { display: none; } /* Esconde o iframe no mobile se for padrão */
    #GameLink { display: inline-block; text-decoration: none; color: white; font-size: 1.5rem; border: 2px solid var(--rapta-green); padding: 15px 30px; border-radius: 10px; }
    #GameLink:hover { background: rgba(2, 254, 99, 0.2); }

    .content-card { padding: 25px; }
    #SteamHead { font-size: 2.5rem; }
    
    footer { flex-direction: column; }
}