/* ===================================
   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.09); /* Adjusted to 0.09 for better PC visibility */
    --rapta-red-tint: rgba(255, 0, 0, 0.02);
    --rapta-blue-tint: rgba(0, 0, 255, 0.02);
}

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;
    /* Camada de Scanlines (Linhas Horizontais e Grade de Pixels) */
    background: 
        linear-gradient(var(--scanline-color) 50%, rgba(0, 0, 0, 0) 50%),
        linear-gradient(90deg, var(--rapta-red-tint), var(--rapta-blue-tint));
    z-index: 9999;
    background-size: 100% 3px, 100% 100%;
    pointer-events: none;
    opacity: 0.35; /* Balanced opacity */
}

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 10s infinite; /* Much slower and comfortable */
}

@keyframes flicker {
    0%, 100% { opacity: 0.02; }
    5% { opacity: 0.05; }
    10% { opacity: 0.03; }
    15% { opacity: 0.06; }
    20% { opacity: 0.02; }
    25% { opacity: 0.08; }
    30% { opacity: 0.03; }
    35% { opacity: 0.02; }
    40% { opacity: 0.06; }
    45% { opacity: 0.04; }
    50% { opacity: 0.02; }
}

/* --- 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;
    width: 100vw;
    height: calc(90vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.parallax-layer {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    transition: transform 0.1s ease-out;
}

.layer-4 {
    background-image: url("img/menuart4.png");
    z-index: 1;
}

.layer-3 {
    background-image: url("img/menuart3.png");
    z-index: 2;
}

.layer-2 {
    background-image: url("img/menuart2.png");
    z-index: 3;
}

.layer-1 {
    background-image: url("img/menuart1.png");
    z-index: 4;
}

.static-logo {
    position: absolute;
    z-index: 20;
    width: clamp(250px, 50vw, 800px);
    height: auto;
    pointer-events: none;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.9));
}


#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;
}

/* --- Video Section --- */
.video-container {
    width: clamp(300px, 80vw, 1000px);
    aspect-ratio: 16 / 9;
    border: 2px solid var(--rapta-green);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.2);
    margin-bottom: 50px;
    background: #000;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- 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: auto;
    background: url("img/Banner 2.png") no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px 0; /* Minimal padding */
}

#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(3rem, 8vw, 5rem);
    /* Increased size */
    margin-bottom: 40px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(2, 254, 99, 0.6);
}

#SteamWidget {
    width: 100%;
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

#SteamWidget iframe,
#SteamIframe {
    width: 646px !important;
    height: 190px !important;
    border: none;
    display: block;
}

#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);
}

#PressKit {
    margin-top: 60px; /* Space between Steam and Press Kit */
    margin-bottom: 80px;
}

#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);
}

/* --- Press Kit Buttons --- */
.press-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
}

.press-btn {
    text-decoration: none;
    display: inline-block;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    border-radius: 4px;
    text-align: center;
}

.btn-primary {
    background: var(--rapta-yellow);
    color: #000;
    border: none;
}

.btn-primary:hover {
    background: #fff;
    box-shadow: 0 0 15px var(--rapta-yellow);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--rapta-yellow);
    border: 2px solid var(--rapta-yellow);
}

.btn-secondary:hover {
    background: rgba(255, 255, 0, 0.1);
    box-shadow: 0 0 10px var(--rapta-yellow);
    transform: translateY(-2px);
}

.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;
    }

    .social-header {
        display: none;
    }

    .logo-header {
        margin-top: 10px;
        /* Alinha a logo dentro do header colapsado */
    }

    /* 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: clamp(2.2rem, 10vw, 3.5rem);
        margin-bottom: 20px;
    }

    #SteamExtraWidgets {
        display: none;
        /* Hide extra widgets on mobile as requested */
    }

    #SteamWidget {
        width: 100%;
        height: calc(190px * (90vw / 646)); /* Scale container height proportionally */
        display: flex;
        justify-content: center;
        align-items: flex-start;
        overflow: visible;
        margin-bottom: 20px;
    }

    #SteamWidget iframe,
    #SteamIframe {
        width: 646px !important;
        height: 190px !important;
        transform: scale(calc(90vw / 646)); /* Scale down to fit screen */
        transform-origin: top center;
        border: none;
    }

    #SteamContent {
        min-height: auto;
        padding: 20px 0;
        background-size: cover;
        background-position: center top;
    }
    
    #SteamHead {
        margin-bottom: 10px;
    }

    footer {
        flex-direction: column;
    }
}