/* public/assets/css/theme.css */

/* ==========================================================================
   VARIÁVEIS DE AMBIENTE - ECOSSISTEMA DE CORES
   ========================================================================== */
:root {
    --primary: #3b82f6;
    --primary-dark: #1d4ed8;
    --accent: #f59e0b;
    
    /* Configuração Base - Modo Dark (Padrão) */
    --bg-top: #0b0f19;
    --bg-bottom: #111827;
    --card-bg: rgba(17, 24, 39, 0.7);
    --card-border: rgba(255, 255, 255, 0.08);
    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --input-bg: rgba(31, 41, 55, 0.5);
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus-bg: rgba(17, 24, 39, 0.85);
    --panel-bg: rgba(17, 24, 39, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.5);
}

/* Modificador de Ambiente - LIGHT MODE */
html[data-theme="light"] {
    --bg-top: #f8fafc;
    --bg-bottom: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(15, 23, 42, 0.06);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: rgba(241, 245, 249, 0.8);
    --input-border: rgba(15, 23, 42, 0.08);
    --input-focus-bg: #ffffff;
    --panel-bg: rgba(255, 255, 255, 0.98);
    --shadow-color: rgba(15, 23, 42, 0.08);
}

/* As 7 Paletas Cromáticas Mapeadas Explicicitamente */
html[data-color="blue"]   { --primary: #3b82f6; --primary-dark: #1d4ed8; }
html[data-color="green"]  { --primary: #10b981; --primary-dark: #059669; }
html[data-color="purple"] { --primary: #8b5cf6; --primary-dark: #6d28d9; }
html[data-color="red"]    { --primary: #ef4444; --primary-dark: #dc2626; }
html[data-color="pink"]   { --primary: #ec4899; --primary-dark: #db2777; }
html[data-color="lilac"]  { --primary: #d946ef; --primary-dark: #c084fc; }
html[data-color="black"]  { --primary: #64748b; --primary-dark: #334155; }

html[data-theme="dark"][data-color="black"] { --primary: #cbd5e1; --primary-dark: #475569; }

/* ==========================================================================
   RESET E ALINHAMENTO DO PROJETO
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
    color: var(--text-main);
    overflow: hidden;
    position: relative;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   FIX DEFINTIVO: ÍCONES DE FUNDO ESPALHADOS (SEM SOBREPOSIÇÃO)
   ========================================================================== */
.edu-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.edu-item {
    position: absolute;
    color: var(--primary);
    opacity: 0.04;
    animation: floatUp 25s infinite linear;
    bottom: -80px;
}
html[data-theme="light"] .edu-item { opacity: 0.08; }

/* Trava dimensional estrita para os SVGs de fundo nunca ficarem gigantes */
.edu-item svg {
    width: 42px !important;
    height: 42px !important;
    display: block;
}

/* Coordenadas horizontais fixas e calculadas em tela */
.item-1 { left: 8%;   animation-duration: 18s; animation-delay: 0s; }
.item-2 { left: 26%;  animation-duration: 26s; animation-delay: 3s; }
.item-3 { left: 45%;  animation-duration: 21s; animation-delay: 1s; }
.item-4 { left: 63%;  animation-duration: 29s; animation-delay: 6s; }
.item-5 { left: 80%;  animation-duration: 23s; animation-delay: 2s; }
.item-6 { left: 93%;  animation-duration: 25s; animation-delay: 8s; }

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg) scale(0.8); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-125vh) rotate(360deg) scale(1.1); opacity: 0; }
}

.glow-sphere {
    position: absolute; width: 500px; height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(0,0,0,0) 70%);
    opacity: 0.12; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 0; pointer-events: none;
}

/* ==========================================================================
   PAINEL DE CONFIGURAÇÃO (FIX COR DOS BOTÕES VISÍVEIS)
   ========================================================================== */
.config-trigger {
    position: fixed; top: 20px; right: 20px;
    background: rgba(255,255,255,0.06); border: 1px solid var(--card-border); color: var(--text-muted);
    width: 38px; height: 38px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 9999; backdrop-filter: blur(8px); border: none;
}
html[data-theme="light"] .config-trigger { background: rgba(0,0,0,0.04); }
.config-trigger:hover { color: var(--text-main); transform: rotate(45deg); }
.config-trigger svg { width: 22px !important; height: 22px !important; fill: currentColor; }

.config-panel {
    display: none; position: fixed; top: 70px; right: 20px;
    background: var(--panel-bg); border: 1px solid var(--card-border); border-radius: 16px;
    padding: 1.25rem; width: 220px; box-shadow: 0 10px 30px var(--shadow-color);
    z-index: 9998; backdrop-filter: blur(12px);
}
.config-panel h3 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 0.6rem; margin-top: 0; }
.theme-switch-group { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.theme-btn { flex: 1; background: rgba(0,0,0,0.15); border: 1px solid var(--card-border); color: var(--text-muted); padding: 0.5rem; font-size: 0.8rem; font-weight: 700; border-radius: 8px; cursor: pointer; }
.theme-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Alinhamento do Grid de Dots */
.color-picker-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.65rem; }

/* FIX VISIBILIDADE: Forçando renderização com borda grossa e inibindo heranças */
.color-dot { 
    width: 32px !important; height: 32px !important; border-radius: 50% !important; cursor: pointer !important; 
    border: 3px solid rgba(255, 255, 255, 0.4) !important; transition: transform 0.2s !important; 
    box-shadow: 0 3px 6px rgba(0,0,0,0.2) !important; display: block !important;
}
html[data-theme="light"] .color-dot { border: 3px solid rgba(0, 0, 0, 0.15) !important; }
.color-dot.active { border-color: var(--text-main) !important; transform: scale(1.18); }

/* Hexadecimais explícitos injetados com prioridade máxima */
.dot-blue   { background-color: #3b82f6 !important; }
.dot-green  { background-color: #10b981 !important; }
.dot-purple { background-color: #8b5cf6 !important; }
.dot-red    { background-color: #ef4444 !important; }
.dot-pink   { background-color: #ec4899 !important; }
.dot-lilac  { background-color: #d946ef !important; }
.dot-black  { background-color: #334155 !important; }