/* 1. Definições Globais e Variáveis (Design System) */

/* Fonte Customizada */
@font-face {
    font-family: 'Ubuntu Noar';
    src: url('assets/ubuntu-noar.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Variáveis do Root */
:root {
    --bg-dark: #000000;
    --text-light: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);

    --header-bg: rgba(0, 0, 0, 0.4);
    --header-height: 100px;

    --logo-shadow: 0 0 20px rgba(159, 90, 253, 0.4);
    --logo-shadow-hover: 0 0 35px rgba(159, 90, 253, 0.7);

    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2. Resets e Estilos de Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Ubuntu Noar', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* 3. Animações e Keyframes */

/* Surgimento com esmaecimento e subida */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Seta flutuando verticalmente */
@keyframes bounceUpDown {

    0%,
    100% {
        transform: translate(-50%, 0);
    }

    50% {
        transform: translate(-50%, 8px);
    }
}

/* 4. Estrutura e Layout Geral */

/* Container de seção snap */
.snap-section {
    height: 100vh;
    height: 100dvh;
    width: 100vw;
    position: relative;
    overflow: hidden;
}

/* Container central de conteúdo */
.content-container {
    margin: 0 auto;
    width: 100%;
    max-width: 600px;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100%;
    z-index: 1;
}

/* 5. Seção 1: Vídeo e Hero Layout */

/* Fundo de vídeo em tela cheia */
.fullscreen-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -10;
    overflow: hidden;
    background-color: var(--bg-dark);
}

.fullscreen-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.fullscreen-bg-video.loaded {
    opacity: 1;
}

/* Efeito vinheta sobre o vídeo */
.fullscreen-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.3) 60%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

/* Barra superior (oculta por padrão) */
.top-bar {
    display: none;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50%;
    width: 100%;
    max-width: 1200px;
}

.top-bar-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: var(--transition-smooth);
}

.top-bar-logo:hover {
    transform: scale(1.04);
}

/* Seção do logotipo central (Hero) */
.hero-logo-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 0;
    margin-bottom: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-logo {
    width: 30%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.hero-logo:hover {
    transform: scale(1.03);
}

/* Botão de navegação por seta */
.scroll-arrow-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-light);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    outline: none;
    z-index: 5;
    animation: bounceUpDown 2s infinite;
}

.scroll-arrow-btn:hover,
.scroll-arrow-btn:focus-visible {
    background: rgba(0, 0, 0, 0.5);
}

.scroll-arrow-btn:active {
    transform: translateX(-50%) scale(0.95);
}

/* 6. Seção 2: Detalhes do Jogo (Sobre & Descrições) */
#section-2 {
    background-color: #050508;
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
}

.game-detail-container {
    justify-content: flex-start;
    padding-top: 80px;
    max-width: 900px;
    width: 100%;
    height: auto;
    min-height: 100%;
    padding-bottom: 60px;
}

/* Cabeçalho de informações do jogo */
.game-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    width: 100%;
    margin-bottom: 30px;
    padding: 0 16px;
}

.game-icon {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.game-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.game-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.5px;
}

/* Descrição Principal */
.game-description {
    font-size: 1.1rem;
    color: var(--text-light);
    text-align: justify;
}

/* Descrição Secundária de Sobre */
.game-description-2 {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-light);
    padding: 0 16px;
}

/* 7. Galeria de Capturas de Tela (Screenshots) */
.screenshots-gallery {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    margin: 20px 0 32px 0;
}

.screenshots-gallery::-webkit-scrollbar {
    display: none;
}

.screenshot-wrapper {
    flex: 0 0 45%;
    scroll-snap-align: center;
    aspect-ratio: 1220 / 2712;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

.screenshot-item {
    width: 100%;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition-smooth);
    transform: scale(1);
    display: block;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* 8. Rodapé (Footer) */
.game-footer {
    width: 100%;
    margin-top: 40px;
    padding-top: 32px;
    padding-bottom: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-socials {
    display: flex;
    gap: 24px;
    align-items: center;
}

.footer-socials a {
    color: var(--text-muted);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-socials a:hover {
    color: var(--text-light);
    transform: scale(1.1);
}

.social-icon {
    width: 26px;
    height: 26px;
    display: block;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.contact-link {
    color: #0048ff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
}

.contact-link:hover {
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

/* 9. Media Queries (Responsividade) */

/* Desktop */
@media (min-width: 768px) {
    .content-container {
        max-width: 800px;
    }

    .hero-logo {
        max-width: 480px;
    }

    .game-detail-container {
        padding-top: 100px;
    }

    .game-header {
        flex-direction: row;
        align-items: center;
        gap: 28px;
        margin-bottom: 40px;
        padding: 0;
        width: 100%;
        max-width: 550px;
        margin-left: auto;
        margin-right: auto;
    }

    .game-icon {
        width: 120px;
        height: 120px;
        border-radius: 28px;
        padding: 0;
        object-fit: cover;
    }

    .game-name {
        font-size: 2.5rem;
    }

    .screenshots-gallery {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        max-width: 550px;
        margin: 0 auto 40px auto;
        overflow-x: visible;
        padding: 0;
    }

    .game-description-2 {
        padding: 0;
    }

    .screenshot-wrapper {
        flex: none;
        scroll-snap-align: none;
    }

    .screenshot-item:hover {
        transform: scale(1.1);
        border-color: rgba(255, 255, 255, 0.2);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    }
}

/* Mobile */
@media (max-width: 767px) {
    .screenshots-gallery {
        width: calc(100% + 48px);
        margin-left: -24px;
        margin-right: -24px;
        padding: 0 24px 20px 24px;
    }
}

/* Telas maiores para deixar o ícone "pendurado" na lateral */
@media (min-width: 850px) {
    .game-header {
        position: relative;
        min-height: 120px;
    }

    .game-icon {
        position: absolute;
        right: 100%;
        margin-right: 28px;
        top: 50%;
        transform: translateY(-50%);
    }
}