/* ========== RESET E VARIÁVEIS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --roxo-base: #0a0515;
    --roxo-escuro: #050210;
    --roxo-medio: #1a0f2e;
    --roxo-claro: #2d1b4a;
    --roxo-muito-claro: #3d2b60;
    --ouro-principal: #e5b13b;
    --ouro-escuro: #c49420;
    --ouro-claro: #f0c45a;
    --texto-claro: #ffffff;
    --texto-cinza: #cbd5e0;
    --sombra: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --sombra-forte: 0 35px 60px -15px rgba(0, 0, 0, 0.9);
    --sombra-dourada: 0 15px 30px -8px rgba(229, 177, 59, 0.3);
    --admin-color: #ff4444;
    --sucesso: #00c851;
    --info: #33b5e5;
    --aviso: #ffbb33;
    
    --gradient-ouro: linear-gradient(135deg, var(--ouro-principal), var(--ouro-escuro));
    --gradient-roxo: linear-gradient(135deg, var(--roxo-medio), var(--roxo-claro));
    
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    --header-height: 80px;
    --header-height-scrolled: 70px;
}

body {
    background: var(--roxo-base);
    color: var(--texto-claro);
    font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* ========== SCROLLBAR PERSONALIZADA ========== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--ouro-principal) var(--roxo-escuro);
}

*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

*::-webkit-scrollbar-track {
    background: var(--roxo-escuro);
    border: 2px solid var(--roxo-claro);
    border-radius: 20px;
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, var(--ouro-principal), var(--ouro-escuro));
    border-radius: 20px;
    border: 2px solid var(--roxo-escuro);
    box-shadow: 0 0 15px rgba(229, 177, 59, 0.5);
    transition: var(--transition-smooth);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, var(--ouro-escuro), var(--ouro-principal));
    box-shadow: 0 0 25px rgba(229, 177, 59, 0.8);
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

/* ========== FUNDO CINEMÁTICO ========== */
.bg-kinetic {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
}

.bg-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 30%, rgba(229, 177, 59, 0.05) 0%, transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(45, 27, 74, 0.1) 0%, transparent 40%),
                radial-gradient(circle at 40% 80%, rgba(229, 177, 59, 0.03) 0%, transparent 50%);
    animation: bgPulse 20s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(229, 177, 59, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(229, 177, 59, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 30s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(50px, 50px) rotate(2deg); }
}

.bg-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    background: var(--ouro-principal);
    border-radius: 50%;
    filter: blur(4px);
    opacity: 0.1;
    animation: floatParticle 25s infinite linear;
}

@keyframes floatParticle {
    0% { transform: translateY(100vh) rotate(0deg) scale(1); opacity: 0; }
    10% { opacity: 0.1; }
    90% { opacity: 0.1; }
    100% { transform: translateY(-100vh) rotate(720deg) scale(2); opacity: 0; }
}

/* ========== MAIN CONTENT ========== */
main {
    padding-top: var(--header-height);
    min-height: 100vh;
}

/* ========== TOAST OTIMIZADO ========== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(30, 18, 53, 0.98);
    backdrop-filter: blur(20px);
    border-left: 4px solid var(--ouro-principal);
    border-radius: 16px;
    padding: 0.8rem 1rem;
    color: var(--texto-claro);
    font-size: 0.85rem;
    font-weight: 500;
    z-index: 10000;
    transform: translateY(100px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.show {
    transform: translateY(0);
}

.toast i {
    font-size: 1.2rem;
}

.toast.sucesso i {
    color: var(--sucesso);
}

.toast.erro i {
    color: #ff4444;
}

@keyframes toastOut {
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

@media (min-width: 769px) {
    .toast {
        top: 30px;
        bottom: auto;
        left: auto;
        right: 30px;
        transform: translateX(50px);
    }
    
    .toast.show {
        transform: translateX(0);
    }
    
    @keyframes toastOut {
        to {
            transform: translateX(50px);
            opacity: 0;
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}