/* global-dark-theme.css - Unificação Visual Dark/Neon (Condicional) */

:root {
    --bg-dark: #0b0e14;
    --bg-card: #161b22;
    --text-main: #e6e6e6;
    --text-muted: #b0b8c4;
    --neon-blue: #00ffea;
    --neon-purple: #9370db;
    --gradient-primary: linear-gradient(135deg, #00c8ff, #9370db);
}

/* APENAS APLICA SE A CLASSE .dark-theme ESTIVER NO BODY */

/* --- CYBERPUNK GLASS THEME --- */

body.dark-theme {
    /* --- CYBER GRID BACKGROUND SYSTEM --- */
    background-color: #050b14 !important;
    background-image:
        /* Vignette (Escurece as bordas) */
        radial-gradient(circle at 50% 50%, transparent 20%, #000 120%),
        /* Grid Linear 1 (Vertical) */
        linear-gradient(90deg, rgba(0, 255, 234, 0.03) 1px, transparent 1px),
        /* Grid Linear 2 (Horizontal) */
        linear-gradient(rgba(0, 255, 234, 0.03) 1px, transparent 1px) !important;

    background-size: 100% 100%, 40px 40px, 40px 40px !important;
    background-attachment: fixed !important;
    color: var(--text-main) !important;
}

/* Mobile Performance Optimization for Background */
@media (max-width: 768px) {
    body.dark-theme {
        /* Mobile: Retira o Grid para evitar ruído visual e economizar GPU */
        background-image:
            radial-gradient(circle at 50% 50%, #121824 0%, #000000 100%) !important;
        background-size: cover !important;
        background-attachment: scroll !important;
    }
}

/* Seções sem "blackout" por padrão (mantemos apenas o fundo global) */
body.dark-theme section,
body.dark-theme .section,
body.dark-theme .section-unified-bg {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    position: relative;
    z-index: 1;
}

/* Header e Footer Sólidos/Vidro mais denso */
body.dark-theme header,
body.dark-theme footer:not(.footer-tech) {
    background-color: rgba(5, 7, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    z-index: 1100;
}

/* Cards (Planos, Serviços) */
body.dark-theme .card,
body.dark-theme .plan-card,
body.dark-theme .service-box {
    background-color: var(--bg-card) !important;
    border: 1px solid rgba(0, 255, 234, 0.1) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    color: var(--text-main) !important;
}

body.dark-theme .card:hover,
body.dark-theme .plan-card:hover,
body.dark-theme .service-box:hover {
    border-color: var(--neon-blue) !important;
    box-shadow: 0 8px 30px rgba(0, 255, 234, 0.15) !important;
}

/* Títulos */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme .card-title {
    color: #ffffff !important;
}

body.dark-theme h2 span,
body.dark-theme .highlight {
    color: var(--neon-blue) !important;
}

/* Botões - LIBERADOS (Removida regra global que forçava roxo/neon) */
/* Agora cada seção define sua própria cor de botão, mesmo no dark mode. */
/* 
   REMOVIDO: Regra agressiva que forçava var(--gradient-primary) em todos os botões.
*/

/* Inputs e Forms */
body.dark-theme input,
body.dark-theme select,
body.dark-theme textarea,
body.dark-theme .form-control {
    background-color: #0d1117 !important;
    border: 1px solid #30363d !important;
    color: white !important;
}

/* Navbar / Header */
body.dark-theme .navbar,
body.dark-theme .header {
    background-color: rgba(11, 14, 20, 0.95) !important;
    border-bottom: 1px solid #1a2634;
}

body.dark-theme .nav-link {
    color: var(--text-main) !important;
}

body.dark-theme .nav-link:hover,
body.dark-theme .nav-link.active {
    color: var(--neon-blue) !important;
}

/* Footer */
body.dark-theme footer:not(.footer-tech) {
    border-top: 1px solid #1a2634;
    background-color: #05070a !important;
}

/* --- GLOBAL PARTICLES (RISING BUBBLES) --- */
body.dark-theme #global-particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    /* Behind content, above background */
    pointer-events: none;
    transition: opacity 0.5s ease;
}

body.particles-off #global-particles-container {
    opacity: 0 !important;
    display: none !important;
}

body.dark-theme .global-particle {
    position: absolute;
    bottom: -50px;
    background: transparent;
    border-radius: 50%;
    opacity: 0;
    /* Start invisible */
    animation: globalParticleRise linear infinite;
    box-shadow: 0 0 10px rgba(0, 255, 234, 0.5);
    /* Default Glow */
}

/* Individual Particle Customization (Randomized) */
body.dark-theme .global-particle:nth-child(1) {
    width: 4px;
    height: 4px;
    left: 10%;
    background: #00ffea;
    /* Cyan */
    animation-duration: 7s;
    animation-delay: 0s;
}

body.dark-theme .global-particle:nth-child(2) {
    width: 6px;
    height: 6px;
    left: 30%;
    background: #ff4d1d;
    /* Orange */
    box-shadow: 0 0 10px rgba(255, 77, 29, 0.5);
    animation-duration: 12s;
    animation-delay: 2s;
}

body.dark-theme .global-particle:nth-child(3) {
    width: 3px;
    height: 3px;
    left: 50%;
    background: #00ffea;
    animation-duration: 9s;
    animation-delay: 4s;
}

body.dark-theme .global-particle:nth-child(4) {
    width: 5px;
    height: 5px;
    left: 70%;
    background: #ff4d1d;
    box-shadow: 0 0 10px rgba(255, 77, 29, 0.5);
    animation-duration: 15s;
    animation-delay: 1s;
}

body.dark-theme .global-particle:nth-child(5) {
    width: 4px;
    height: 4px;
    left: 90%;
    background: #00ffea;
    animation-duration: 11s;
    animation-delay: 3s;
}

body.dark-theme .global-particle:nth-child(6) {
    width: 2px;
    height: 2px;
    left: 20%;
    background: #fff;
    animation-duration: 20s;
    animation-delay: 5s;
    opacity: 0.5;
}

@keyframes globalParticleRise {
    0% {
        bottom: -50px;
        opacity: 0;
        transform: translateY(0) scale(0);
    }

    10% {
        opacity: 0.7;
        transform: translateY(-20px) scale(1);
    }

    90% {
        opacity: 0.7;
        transform: translateY(-90vh) scale(1);
    }

    100% {
        bottom: 120%;
        /* Move completely off screen */
        opacity: 0;
        transform: translateY(-100vh) scale(0);
    }
}

/* --- LIGHT THEME OVERRIDES (readability & contrast) --- */
body.light-theme {
    background-color: #f7f9fc !important;
    background-image: none !important;
    color: #0b0e14 !important;
}

body.light-theme section,
body.light-theme .section,
body.light-theme .section-unified-bg {
    background-color: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
}

body.light-theme header,
body.light-theme footer {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #0b0e14;
    border-color: #e2e8f0 !important;
}

body.light-theme .navbar,
body.light-theme .header {
    background: rgba(255, 255, 255, 0.98) !important;
    border-bottom: 1px solid #e2e8f0;
}

body.light-theme .header-custom {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #0b0e14;
}

body.light-theme .nav-link {
    color: #0b0e14 !important;
}

body.light-theme .nav-link:hover,
body.light-theme .nav-link.active {
    color: #ff4d1d !important;
}

body.light-theme .card,
body.light-theme .plan-card,
body.light-theme .service-box,
body.light-theme .tech-card {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
    color: #0b0e14 !important;
}

body.light-theme .tech-card:hover {
    background-color: #f8fafc !important;
    border-color: #0ea5e9 !important;
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.18) !important;
}

body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme h5,
body.light-theme h6,
body.light-theme .card-title {
    color: #0b0e14 !important;
}

body.light-theme .section-gamer .display-4 span {
    color: #0b0e14 !important;
    -webkit-text-stroke: 0;
}

body.light-theme .section-gamer p,
body.light-theme .section-unified-bg p,
body.light-theme p,
body.light-theme li,
body.light-theme span {
    color: #475569;
}

body.light-theme .text-white,
body.light-theme .text-light {
    color: #0b0e14 !important;
}

body.light-theme .text-muted {
    color: #64748b !important;
}

body.light-theme .btn-tech-outline {
    color: #0b0e14 !important;
    border-color: #0ea5e9;
}

body.light-theme .btn-tech-outline:hover {
    background: rgba(14, 165, 233, 0.1);
    box-shadow: 0 0 12px rgba(14, 165, 233, 0.25);
}

body.light-theme input,
body.light-theme select,
body.light-theme textarea,
body.light-theme .form-control {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0b0e14 !important;
}

body.light-theme .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

body.light-theme .dropdown-item {
    color: #0b0e14 !important;
}

body.light-theme .dropdown-item:hover,
body.light-theme .dropdown-item:focus {
    background: rgba(255, 77, 29, 0.08);
    color: #ff4d1d !important;
    border-left-color: #ff4d1d;
}
