/* ========================================
   CAPITÃO MIL GRAU - VERSÃO LOGO DINÂMICO
   ======================================== */

:root {
    /* Paleta de cores vibrante */
    --color-bg-primary: #000000;
    --color-bg-secondary: #0a0a0a;
    --color-accent-primary: #ff1744;
    --color-accent-secondary: #ff6d00;
    --color-accent-tertiary: #d50000;
    --color-accent-glow: #ffea00;
    --color-accent-blue: #1a237e;
    --color-accent-teal: #00695c;
    --color-text-primary: #ffffff;
    --color-text-secondary: #b0b0b0;
    
    /* Gradientes */
    --gradient-fire: linear-gradient(135deg, #ff1744 0%, #ff6d00 50%, #d50000 100%);
    --gradient-logo: linear-gradient(180deg, #ffea00 0%, #ff6d00 30%, #ff1744 70%, #8b0000 100%);
    --gradient-bg: radial-gradient(ellipse at center, #1a0000 0%, #000000 100%);
    --gradient-paint: linear-gradient(135deg, #ff1744 0%, #ff6d00 25%, #1a237e 50%, #00695c 75%, #7209b7 100%);
    
    /* Sombras */
    --shadow-glow: 0 0 80px rgba(255, 23, 68, 0.8);
    --shadow-logo: 0 0 100px rgba(255, 234, 0, 0.6), 0 0 150px rgba(255, 23, 68, 0.4);
    
    /* Transições */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset e base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Bebas Neue', 'Oswald', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gradient-bg);
    color: var(--color-text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow: hidden;
    position: relative;
}

/* ========================================
   MODAL DE VALIDAÇÃO DE IDADE
   ======================================== */

.age-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.5s ease-out;
}

.age-modal.hidden {
    display: none;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.age-modal-content {
    background: rgba(10, 10, 10, 0.95);
    border: 3px solid var(--color-accent-primary);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 0 60px rgba(255, 23, 68, 0.6),
        inset 0 0 40px rgba(255, 23, 68, 0.1);
    animation: modalSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.age-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-fire);
    box-shadow: 0 0 20px var(--color-accent-primary);
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.age-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.age-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    color: var(--color-accent-primary);
    margin-bottom: 16px;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 23, 68, 0.6);
}

.age-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.age-question {
    font-size: 1.3rem;
    color: var(--color-text-primary);
    font-weight: 700;
    margin-bottom: 32px;
    font-family: 'Oswald', sans-serif;
}

.age-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.age-btn {
    padding: 18px 32px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.age-btn-yes {
    background: var(--gradient-fire);
    color: #000;
    box-shadow: 0 8px 30px rgba(255, 23, 68, 0.5);
}

.age-btn-yes:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 23, 68, 0.7);
}

.age-btn-yes:active {
    transform: translateY(-1px) scale(0.98);
}

.age-btn-no {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.age-btn-no:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.age-warning {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    opacity: 0.8;
    margin-top: 16px;
}

/* ========================================
   BACKGROUND DINÂMICO
   ======================================== */

.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

/* Partículas flutuantes */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    box-shadow: 0 0 15px var(--color-accent-primary);
    animation: floatParticle 15s ease-in-out infinite;
    will-change: transform;
    transform: translateZ(0);
}

.floating-particle:nth-child(1) {
    left: 10%;
    top: 20%;
    background: var(--color-accent-primary);
    animation-delay: 0s;
}

.floating-particle:nth-child(2) {
    left: 80%;
    top: 15%;
    background: var(--color-accent-secondary);
    animation-delay: 2s;
}

.floating-particle:nth-child(3) {
    left: 50%;
    top: 10%;
    background: var(--color-accent-glow);
    animation-delay: 4s;
}

.floating-particle:nth-child(4) {
    left: 25%;
    top: 60%;
    background: var(--color-accent-primary);
    animation-delay: 6s;
}

.floating-particle:nth-child(5) {
    left: 70%;
    top: 70%;
    background: var(--color-accent-secondary);
    animation-delay: 8s;
}

.floating-particle:nth-child(6) {
    left: 90%;
    top: 50%;
    background: var(--color-accent-glow);
    animation-delay: 10s;
}

.floating-particle:nth-child(7) {
    left: 15%;
    top: 80%;
    background: var(--color-accent-primary);
    animation-delay: 12s;
}

.floating-particle:nth-child(8) {
    left: 60%;
    top: 30%;
    background: var(--color-accent-secondary);
    animation-delay: 14s;
}

@keyframes floatParticle {
    0%, 100% {
        opacity: 0.3;
        transform: translateY(0) translateX(0) scale(1);
    }
    25% {
        opacity: 1;
        transform: translateY(-50px) translateX(30px) scale(1.5);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-100px) translateX(-20px) scale(1.2);
    }
    75% {
        opacity: 1;
        transform: translateY(-50px) translateX(40px) scale(1.3);
    }
}

/* Efeitos de tinta/graffiti */
.paint-splatters {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.splatter {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: splatterPulse 8s ease-in-out infinite;
}

.splatter-1 {
    width: 300px;
    height: 300px;
    background: var(--color-accent-primary);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.splatter-2 {
    width: 250px;
    height: 250px;
    background: var(--color-accent-secondary);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.splatter-3 {
    width: 200px;
    height: 200px;
    background: var(--color-accent-blue);
    bottom: 15%;
    left: 20%;
    animation-delay: 4s;
}

.splatter-4 {
    width: 280px;
    height: 280px;
    background: var(--color-accent-teal);
    top: 30%;
    right: 25%;
    animation-delay: 6s;
}

@keyframes splatterPulse {
    0%, 100% {
        opacity: 0.2;
        transform: scale(1);
    }
    50% {
        opacity: 0.4;
        transform: scale(1.2);
    }
}

/* Ondas de energia */
.energy-waves {
    position: absolute;
    width: 100%;
    height: 100%;
}

.wave {
    position: absolute;
    border: 3px solid;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: waveExpand 4s ease-out infinite;
    opacity: 0;
}

.wave-1 {
    width: 200px;
    height: 200px;
    border-color: var(--color-accent-primary);
    animation-delay: 0s;
}

.wave-2 {
    width: 200px;
    height: 200px;
    border-color: var(--color-accent-glow);
    animation-delay: 1.3s;
}

.wave-3 {
    width: 200px;
    height: 200px;
    border-color: var(--color-accent-secondary);
    animation-delay: 2.6s;
}

@keyframes waveExpand {
    0% {
        width: 200px;
        height: 200px;
        opacity: 0.8;
    }
    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
    }
}

/* ========================================
   CONTAINER PRINCIPAL
   ======================================== */

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 20px;
    position: relative;
    z-index: 1;
}

/* ========================================
   LOGO CONTAINER
   ======================================== */

.logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: logoEntrance 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 10; /* Garante que fica acima do canvas */
    pointer-events: auto; /* Garante que recebe cliques */
}

@keyframes logoEntrance {
    from {
        opacity: 0;
        transform: scale(0.5) rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Anéis de glow ao redor do logo */
.logo-glow-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid;
    filter: blur(20px);
    animation: glowPulse 3s ease-in-out infinite;
}

.logo-glow-ring {
    width: 400px;
    height: 400px;
    border-color: var(--color-accent-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: 0s;
}

.ring-2 {
    width: 500px;
    height: 500px;
    border-color: var(--color-accent-glow);
    animation-delay: 1s;
}

.ring-3 {
    width: 600px;
    height: 600px;
    border-color: var(--color-accent-secondary);
    animation-delay: 2s;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Partículas ao redor do logo */
.logo-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.logo-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-accent-glow);
    border-radius: 50%;
    box-shadow: 0 0 20px var(--color-accent-glow);
    top: 50%;
    left: 50%;
    animation: orbitParticle 8s linear infinite;
    will-change: transform;
    transform: translateZ(0);
}

.logo-particle:nth-child(1) {
    animation-delay: 0s;
    background: var(--color-accent-primary);
}

.logo-particle:nth-child(2) {
    animation-delay: 1s;
    background: var(--color-accent-secondary);
}

.logo-particle:nth-child(3) {
    animation-delay: 2s;
    background: var(--color-accent-glow);
}

.logo-particle:nth-child(4) {
    animation-delay: 3s;
    background: var(--color-accent-primary);
}

.logo-particle:nth-child(5) {
    animation-delay: 4s;
    background: var(--color-accent-secondary);
}

.logo-particle:nth-child(6) {
    animation-delay: 5s;
    background: var(--color-accent-glow);
}

.logo-particle:nth-child(7) {
    animation-delay: 6s;
    background: var(--color-accent-primary);
}

.logo-particle:nth-child(8) {
    animation-delay: 7s;
    background: var(--color-accent-secondary);
}

@keyframes orbitParticle {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(250px) rotate(0deg);
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(250px) rotate(-360deg);
        opacity: 1;
    }
}

/* ========================================
   LOGO CMG
   ======================================== */

.logo-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-image {
    max-width: 600px;
    width: 100%;
    height: auto;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 0 40px rgba(255, 234, 0, 0.8)) 
            drop-shadow(0 0 80px rgba(255, 23, 68, 0.6))
            drop-shadow(0 0 120px rgba(255, 23, 68, 0.4))
            drop-shadow(4px 4px 0 rgba(26, 35, 126, 0.8));
    animation: logoFloat 4s ease-in-out infinite;
    transition: transform 0.3s ease;
    will-change: transform;
    transform: translateZ(0); /* Aceleração de hardware */
}

.logo-image:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 50px rgba(255, 234, 0, 1)) 
            drop-shadow(0 0 100px rgba(255, 23, 68, 0.8))
            drop-shadow(0 0 150px rgba(255, 23, 68, 0.6))
            drop-shadow(4px 4px 0 rgba(26, 35, 126, 0.8));
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-15px) scale(1.02);
    }
    50% {
        transform: translateY(-10px) scale(1.01);
    }
    75% {
        transform: translateY(-20px) scale(1.02);
    }
}

/* Efeito de tinta escorrendo */
.paint-drips {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.drip {
    position: absolute;
    width: 20px;
    background: var(--gradient-fire);
    border-radius: 0 0 50% 50%;
    animation: dripFall 4s ease-in infinite;
    filter: blur(2px);
}

.drip-1 {
    left: 15%;
    height: 60px;
    animation-delay: 0s;
    background: var(--color-accent-primary);
}

.drip-2 {
    left: 45%;
    height: 80px;
    animation-delay: 1s;
    background: var(--color-accent-secondary);
}

.drip-3 {
    right: 20%;
    height: 50px;
    animation-delay: 2s;
    background: var(--color-accent-glow);
}

.drip-4 {
    right: 10%;
    height: 70px;
    animation-delay: 3s;
    background: var(--color-accent-primary);
}

@keyframes dripFall {
    0% {
        top: -20px;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: 200px;
        opacity: 0;
    }
}


/* ========================================
   RESPONSIVIDADE
   ======================================== */

@media (max-width: 768px) {
    .age-modal-content {
        padding: 36px 28px;
        max-width: 400px;
    }
    
    .age-title {
        font-size: 2rem;
    }
    
    .age-icon {
        font-size: 3rem;
    }
    
    .logo-image {
        max-width: 400px;
    }
    
    .logo-glow-ring {
        width: 300px;
        height: 300px;
    }
    
    .ring-2 {
        width: 400px;
        height: 400px;
    }
    
    .ring-3 {
        width: 500px;
        height: 500px;
    }
    
    /* Reduz partículas em mobile para performance */
    .floating-particle:nth-child(n+5) {
        display: none;
    }
    
    .logo-particle:nth-child(n+5) {
        display: none;
    }
    
    /* Desabilita animações pesadas em mobile */
    .paint-splatters {
        display: none;
    }
    
    .energy-waves {
        display: none;
    }
}

@media (max-width: 480px) {
    .age-modal-content {
        padding: 32px 24px;
        width: 95%;
    }
    
    .age-title {
        font-size: 1.8rem;
    }
    
    .age-text {
        font-size: 1rem;
    }
    
    .age-question {
        font-size: 1.1rem;
    }
    
    .age-btn {
        padding: 16px 24px;
        font-size: 1rem;
    }
    
    .logo-image {
        max-width: 280px;
    }
    
    .logo-glow-ring {
        width: 250px;
        height: 250px;
    }
    
    .ring-2 {
        width: 320px;
        height: 320px;
    }
    
    .ring-3 {
        width: 400px;
        height: 400px;
    }
    
    
    .floating-particle {
        display: none;
    }
    
    .floating-particle:nth-child(1),
    .floating-particle:nth-child(3),
    .floating-particle:nth-child(5) {
        display: block;
    }
}

/* ========================================
   CANVAS DE SPRAY DE TINTA
   ======================================== */

.paint-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Não bloqueia cliques em outros elementos */
    z-index: 5;
    mix-blend-mode: lighten;
    cursor: crosshair;
}

/* Desabilita canvas em mobile para performance */
@media (max-width: 768px) {
    .paint-canvas {
        display: none;
    }
}

/* ========================================
   MODAL INSTAGRAM
   ======================================== */

.instagram-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.5s ease-out;
}

.instagram-modal.hidden {
    display: none;
}

.instagram-modal-content {
    background: rgba(10, 10, 10, 0.98);
    border: 3px solid var(--color-accent-primary);
    border-radius: 24px;
    padding: 48px 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 
        0 0 60px rgba(255, 23, 68, 0.6),
        inset 0 0 40px rgba(255, 23, 68, 0.1);
    animation: modalSlideIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
}

.instagram-modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-fire);
    box-shadow: 0 0 20px var(--color-accent-primary);
}

.instagram-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--color-text-primary);
    font-size: 2.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-smooth);
    line-height: 1;
    padding: 0;
}

.instagram-close:hover {
    background: rgba(255, 23, 68, 0.2);
    transform: rotate(90deg);
    color: var(--color-accent-primary);
}

.instagram-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: iconPulse 2s ease-in-out infinite;
}

.instagram-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 2.5rem;
    color: var(--color-accent-primary);
    margin-bottom: 16px;
    letter-spacing: 3px;
    text-shadow: 0 0 20px rgba(255, 23, 68, 0.6);
}

.instagram-text {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.instagram-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--gradient-fire);
    color: #000;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 30px rgba(255, 23, 68, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.instagram-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.instagram-button:hover::before {
    transform: translateX(100%);
}

.instagram-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(255, 23, 68, 0.7);
}

.instagram-button:active {
    transform: translateY(-1px) scale(0.98);
}

.instagram-btn-icon {
    width: 24px;
    height: 24px;
}

/* ========================================
   EFEITO DE NÚMERO AO CLICAR
   ======================================== */

@keyframes clickNumber {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(1.5) translateY(-50px);
    }
}

/* ========================================
   ACESSIBILIDADE
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   BOTÃO DE PERMISSÃO GYROSCOPE (iOS)
   ======================================== */

.gyro-permission-btn {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    background: var(--gradient-fire);
    color: #000;
    border: none;
    border-radius: 25px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(255, 23, 68, 0.5);
    transition: var(--transition-smooth);
    animation: permissionPulse 2s ease-in-out infinite;
}

.gyro-permission-btn:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 23, 68, 0.7);
}

.gyro-permission-btn:active {
    transform: translateX(-50%) translateY(0);
}

@keyframes permissionPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(255, 23, 68, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(255, 23, 68, 0.8);
    }
}

@media (max-width: 480px) {
    .gyro-permission-btn {
        bottom: -50px;
        padding: 10px 20px;
        font-size: 0.8rem;
    }
}

/* Focus styles */
.age-btn:focus {
    outline: 3px solid var(--color-accent-glow);
    outline-offset: 4px;
}
