/* ========================================
   MAIN.CSS - Estilos Gerais e Variáveis (CORRIGIDO)
   ======================================== */

/* CSS Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Previne scroll horizontal */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--white);
    background-color: var(--black);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
}

/* Variáveis CSS */
:root {
    /* Cores Principais */
    --gold: #FFB800;
    --gold-light: #FFC933;
    --gold-dark: #CC9200;
    --gold-rgb: 255, 184, 0;
    
    --green: #00D563;
    --green-dark: #00AA4F;
    --green-light: #00FF7A;
    --green-rgb: 0, 213, 99;
    
    --black: #000000;
    --dark: #0A0A0A;
    --dark-light: #1A1A1A;
    --white: #FFFFFF;
    --gray: #666666;
    --gray-light: #999999;
    
    --red: #FF3B3B;
    --red-dark: #CC0000;
    
    /* Gradientes */
    --gradient-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    --gradient-green: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    --gradient-dark: linear-gradient(180deg, var(--black) 0%, var(--dark) 100%);
    
    /* Tipografia */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Bebas Neue', 'Inter', sans-serif;
    
    /* Tamanhos de Fonte */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
    --text-6xl: 3.75rem;   /* 60px */
    --text-7xl: 4.5rem;    /* 72px */
    
    /* Espaçamentos */
    --spacing-xs: 0.25rem;  /* 4px */
    --spacing-sm: 0.5rem;   /* 8px */
    --spacing-md: 1rem;     /* 16px */
    --spacing-lg: 1.5rem;   /* 24px */
    --spacing-xl: 2rem;     /* 32px */
    --spacing-2xl: 3rem;    /* 48px */
    --spacing-3xl: 4rem;    /* 64px */
    --spacing-4xl: 6rem;    /* 96px */
    
    /* Bordas */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 1rem;      /* 16px */
    --radius-xl: 1.5rem;    /* 24px */
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-gold: 0 10px 40px rgba(255, 184, 0, 0.3);
    --shadow-green: 0 10px 40px rgba(0, 213, 99, 0.4);
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
    
    /* Z-index */
    --z-background: -1;
    --z-default: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal-backdrop: 400;
    --z-modal: 500;
    --z-popover: 600;
    --z-tooltip: 700;
    --z-notification: 800;
    --z-loading: 999;
    --z-alert: 1000;
}

/* Container - Corrigido para prevenir overflow */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
    overflow: hidden;
}

/* Previne overflow em todas as seções */
section {
    padding: var(--spacing-4xl) 0;
    position: relative;
    z-index: var(--z-default);
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

/* Tipografia Global */
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    word-wrap: break-word;
}

h1 { font-size: clamp(var(--text-4xl), 6vw, var(--text-7xl)); }
h2 { font-size: clamp(var(--text-3xl), 5vw, var(--text-6xl)); }
h3 { font-size: clamp(var(--text-2xl), 4vw, var(--text-4xl)); }
h4 { font-size: clamp(var(--text-xl), 3vw, var(--text-3xl)); }
h5 { font-size: clamp(var(--text-lg), 2.5vw, var(--text-2xl)); }
h6 { font-size: clamp(var(--text-base), 2vw, var(--text-xl)); }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--gold);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--gold-light);
}

strong {
    font-weight: 700;
    color: var(--gold);
}

/* Utility Classes */
.text-gold {
    color: var(--gold);
    text-shadow: 0 0 30px rgba(255, 184, 0, 0.5);
}

.text-green {
    color: var(--green);
    text-shadow: 0 0 30px rgba(0, 213, 99, 0.5);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Background Animations */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: var(--z-background);
    pointer-events: none;
    opacity: 0.15;
    background: 
        radial-gradient(circle at 20% 50%, var(--gold) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, var(--gold-dark) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, var(--gold-light) 0%, transparent 50%);
    animation: bgMove 30s ease-in-out infinite;
}

@keyframes bgMove {
    0%, 100% { 
        transform: scale(1) rotate(0deg);
        filter: hue-rotate(0deg);
    }
    33% { 
        transform: scale(1.1) rotate(120deg);
        filter: hue-rotate(20deg);
    }
    66% { 
        transform: scale(0.9) rotate(240deg);
        filter: hue-rotate(-20deg);
    }
}

/* Particles */
.particles {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: var(--z-background);
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    opacity: 0;
    animation: floatUp 15s infinite;
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.8;
        transform: translateY(90vh) scale(1);
    }
    90% {
        opacity: 0.8;
        transform: translateY(10vh) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
}

/* Loading Screen */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-loading);
    transition: opacity var(--transition-slow);
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(255, 184, 0, 0.2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-lg);
}

.loading-text {
    color: var(--gold);
    font-size: var(--text-lg);
    font-weight: 600;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}

/* Alert Bar */
.alert-bar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--red);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-md);
    z-index: var(--z-alert);
    animation: slideDown 0.5s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.alert-bar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-align: center;
}

.alert-bar i {
    font-size: var(--text-xl);
    animation: fireFlicker 1s ease-in-out infinite;
}

.alert-text {
    font-size: var(--text-sm);
    font-weight: 600;
}

.alert-mobile {
    display: none;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@keyframes fireFlicker {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.8; 
        transform: scale(1.1);
    }
}

/* Section Styles */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
}

.section-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.section-subtitle {
    font-size: var(--text-xl);
    opacity: 0.9;
    color: var(--gray-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Buttons */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg) var(--spacing-2xl);
    background: var(--gradient-green);
    color: var(--white);
    font-size: var(--text-lg);
    font-weight: 700;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-green);
    text-decoration: none;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 50px rgba(0, 213, 99, 0.5);
    color: var(--white);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button i {
    font-size: var(--text-2xl);
}

.cta-button-primary {
    background: var(--gradient-green);
    box-shadow: var(--shadow-green);
}

.cta-button-secondary {
    background: var(--gradient-gold);
    box-shadow: var(--shadow-gold);
}

.cta-button-large {
    padding: var(--spacing-xl) var(--spacing-3xl);
    font-size: var(--text-xl);
}

/* Button Ripple Effect */
.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.6s ease;
}

.cta-button:hover::before {
    width: 400px;
    height: 400px;
}

/* Pulse Animation */
.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Footer */
.footer {
    background: var(--dark);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 184, 0, 0.2);
    margin-top: var(--spacing-4xl);
}

.footer p {
    color: var(--gray-light);
    font-size: var(--text-sm);
    margin-bottom: var(--spacing-sm);
}

.footer-disclaimer {
    font-size: var(--text-xs);
    opacity: 0.7;
}

/* Animations */
.slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.slide-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

/* Selection */
::selection {
    background: var(--gold);
    color: var(--black);
}

::-moz-selection {
    background: var(--gold);
    color: var(--black);
}

/* Mobile-specific animation adjustments */
@media (max-width: 768px) {
    /* Container mobile */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Desacelera TODAS as animações no mobile */
    .bg-animation {
        animation-duration: 45s !important;
    }
    
    .particle {
        animation-duration: 25s !important;
    }
    
    .loading-spinner {
        animation-duration: 1.5s !important;
    }
    
    .loading-text {
        animation-duration: 3s !important;
    }
    
    .alert-bar i {
        animation-duration: 2s !important;
    }
    
    .pulse-animation {
        animation-duration: 3s !important;
    }
    
    /* Animações mais suaves */
    @keyframes pulse {
        0%, 100% { 
            opacity: 0.9; 
            transform: scale(1);
        }
        50% { 
            opacity: 1; 
            transform: scale(1.02);
        }
    }
    
    @keyframes fireFlicker {
        0%, 100% { 
            opacity: 1; 
            transform: scale(1);
        }
        50% { 
            opacity: 0.9; 
            transform: scale(1.05);
        }
    }
}

/* Previne elementos de causar overflow horizontal */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Garante que nada ultrapasse os limites */
* {
    max-width: 100vw;
}

/* Hide scrollbars mas mantém funcionalidade */
html::-webkit-scrollbar {
    width: 10px;
}

html::-webkit-scrollbar-track {
    background: var(--dark);
}

html::-webkit-scrollbar-thumb {
    background: var(--gold-dark);
    border-radius: 5px;
}

html::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

/* Footer - Correção do gap */
.footer {
    background: var(--dark);
    padding: var(--spacing-2xl) 0;
    text-align: center;
    border-top: 1px solid rgba(255, 184, 0, 0.2);
    margin-top: 0 !important; /* Remove margin-top */
}

/* Remove gaps entre todas as seções */
section {
    margin: 0 !important;
}