/**
 * Copyright © 2025 Zenite - Todos os direitos reservados
 * Projeto desenvolvido com assistência de IA
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;500;600;700&display=swap');

@tailwind base;
@tailwind components;
@tailwind utilities;

/* ═══════════════════════════════════════════════════════════════════════════
   OTIMIZAÇÕES DE PERFORMANCE - GPU Acceleration
   ═══════════════════════════════════════════════════════════════════════════ */

* {
    -webkit-tap-highlight-color: transparent;
}

/* GPU acceleration APENAS para elementos que realmente precisam */
.modal-enter,
.animate-spin,
.animate-pulse,
.animate-bounce {
    will-change: transform;
    transform: translateZ(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRANSIÇÕES SUAVES - Estilo macOS/iOS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Easing curves do macOS */
:root {
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Transição universal suave */
* {
    transition-timing-function: var(--ease-in-out-smooth) !important;
}

/* Elementos interativos - transição premium */
button:not(.no-transition),
a:not(.no-transition),
[role="button"]:not(.no-transition) {
    transition: all 0.25s var(--ease-out-expo) !important;
}

/* Inputs com feedback suave */
input:not(.no-transition),
select:not(.no-transition),
textarea:not(.no-transition) {
    transition: all 0.2s var(--ease-in-out-smooth) !important;
}

/* Cards e containers com bounce sutil */
[class*="rounded"]:not(.no-transition),
[class*="border"]:not(.no-transition) {
    transition: all 0.3s var(--ease-out-expo) !important;
}

/* Divs e containers genéricos */
div:not(.no-transition) {
    transition: opacity 0.2s var(--ease-in-out-smooth), 
                transform 0.3s var(--ease-out-expo) !important;
}

/* Desabilitar animações para usuários que preferem movimento reduzido */
@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;
    }
    
    .bg-grid,
    .animate-pulse,
    .blink-anim {
        animation: none !important;
    }
}

/* Otimizar scroll em containers */
.custom-scrollbar,
.overflow-y-auto,
.overflow-x-auto {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

:root {
    --bg-void: #050507;
    --glass-panel: rgba(20, 20, 25, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --neon-core: #0ea5e9;
    --neon-rgb: 14, 165, 233;
    --neon-warn: #eab308;
    --neon-alert: #ef4444;
    --neon-success: #10b981;
    --neon-purple: #d946ef;
    --radius-std: 12px;
    --ease-smooth: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ============================================
   TEMA HACKER (Verde Matrix)
   ============================================ */
body.theme-hacker {
    --bg-void: #000a00;
    --glass-border: #00ff41;
    --neon-core: #00ff41;
    --neon-rgb: 0, 255, 65;
    --neon-warn: #39ff14;
    --neon-alert: #00ff41;
    --neon-success: #00ff41;
    font-family: 'JetBrains Mono', monospace !important;
}

/* IMPORTANTE: Não aplicar font-family em tudo - quebra os ícones FontAwesome */
body.theme-hacker *:not(i):not([class*="fa-"]) { 
    font-family: 'JetBrains Mono', monospace !important; 
    letter-spacing: -0.5px; 
}

/* Preservar família de fontes dos ícones FontAwesome */
body.theme-hacker i,
body.theme-hacker [class*="fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
}

body.theme-hacker .text-gray-500, 
body.theme-hacker .text-gray-400 { 
    color: #22c55e !important; 
    text-shadow: 0 0 5px rgba(34, 197, 94, 0.5); 
}

/* Estilização dos ícones - só cor e glow, não font-family */
body.theme-hacker i.fa-solid,
body.theme-hacker i.fa-regular,
body.theme-hacker i.fa-brands {
    color: #00ff41 !important;
    filter: drop-shadow(0 0 3px #00ff41);
}

body.theme-hacker .glass { 
    border-color: #22c55e !important; 
    background: rgba(0, 20, 0, 0.9) !important; 
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2) !important;
}

body.theme-hacker button:not(.bg-white):not([class*="bg-red"]):not([class*="bg-blue"]) {
    border-color: #00ff41 !important;
}

body.theme-hacker input, 
body.theme-hacker textarea, 
body.theme-hacker select {
    border-color: #00ff41 !important;
    color: #00ff41 !important;
}


/* ============================================
   MODO CRT (Tela de Tubo)
   Nota: Evitamos transform/animation/overflow no body
   pois quebram position:fixed dos descendentes
   ============================================ */

/* Scanlines */
body.crt-mode::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none !important;
    z-index: 99999;
    animation: scanlines 8s linear infinite;
}

@keyframes scanlines {
    0% { transform: translateY(0); }
    100% { transform: translateY(10px); }
}

/* Vinheta CRT */
body.crt-mode::after {
    content: '';
    position: fixed;
    top: -10%;
    left: -10%;
    right: -10%;
    bottom: -10%;
    background: radial-gradient(
        ellipse at center,
        transparent 50%,
        rgba(0, 0, 0, 0.3) 100%
    );
    pointer-events: none;
    z-index: 999998;
}

/* Aberração Cromática */
body.crt-mode .glass,
body.crt-mode img {
    filter: 
        contrast(1.1) 
        brightness(1.05);
    text-shadow: 
        1px 0 0 rgba(255, 0, 0, 0.3),
        -1px 0 0 rgba(0, 255, 255, 0.3);
}

/* Flicker sutil - REMOVIDO do body pois animation quebra position:fixed */
@keyframes crt-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.98; }
}

/* A animação agora é aplicada apenas aos pseudo-elementos, não ao body */

/* ============================================
   GLOBAIS
   ============================================ */
[x-cloak] { display: none !important; }

body {
    font-family: 'Rajdhani', sans-serif;
    background-color: var(--bg-void);
    color: #e2e8f0;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* BACKGROUND GRID - Enhanced with animated gradient */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), 
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    pointer-events: none;
}

/* Animated background gradient */
.bg-grid::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(var(--neon-rgb), 0.15), transparent 50%),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(139, 92, 246, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 30% at 0% 100%, rgba(59, 130, 246, 0.08), transparent 50%);
    animation: bgPulse 20s ease-in-out infinite;
}

/* Floating particles effect */
.bg-grid::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: 
        radial-gradient(1px 1px at 20% 30%, rgba(var(--neon-rgb), 0.4), transparent),
        radial-gradient(1px 1px at 40% 70%, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(var(--neon-rgb), 0.3), transparent),
        radial-gradient(1px 1px at 80% 60%, rgba(59, 130, 246, 0.2), transparent),
        radial-gradient(1px 1px at 90% 90%, rgba(var(--neon-rgb), 0.25), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(139, 92, 246, 0.2), transparent),
        radial-gradient(2px 2px at 50% 50%, rgba(var(--neon-rgb), 0.15), transparent);
    background-size: 200% 200%;
    animation: particleFloat 30s linear infinite;
    pointer-events: none;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes particleFloat {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 100%; }
    100% { background-position: 0% 0%; }
}

/* UI COMPONENTS */
.glass {
    background: var(--glass-panel);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: all 0.3s var(--ease-smooth);
    border-radius: var(--radius-std);
}

/* UserMenu Dropdown - Forçar opacidade total */
.user-menu-dropdown {
    background: #08080a !important;
    backdrop-filter: none !important;
    opacity: 1 !important;
}

.input-cyber {
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--glass-border);
    color: white;
    transition: all 0.3s ease;
    font-family: 'Rajdhani', sans-serif;
    border-radius: 8px;
}

.input-cyber:focus {
    border-color: var(--neon-core);
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.2);
    outline: none;
}

/* Select Customizado - Estilo Cyber */
select,
select.input-cyber {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2300ffff'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
}

select:focus {
    border-color: var(--neon-core);
    box-shadow: 0 0 15px rgba(var(--neon-rgb), 0.2);
    outline: none;
}

/* Estilização das opções do select (browsers modernos) */
select option {
    background: #111;
    color: white;
    padding: 10px;
    font-family: 'Rajdhani', sans-serif;
}

select option:hover,
select option:focus,
select option:checked {
    background: var(--neon-core);
    color: black;
}

/* Skill Dots */
.skill-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--glass-border);
    cursor: pointer;
    transition: all 0.2s;
}

.skill-dot.active {
    background: var(--neon-core);
    border-color: var(--neon-core);
    box-shadow: 0 0 10px var(--neon-core);
}

.skill-dot:hover {
    transform: scale(1.2);
}

/* ANIMAÇÕES */
.modal-enter { 
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); 
}

@keyframes modalSlideUp { 
    0% { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    } 
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    } 
}

.shake-anim { 
    animation: shake 0.3s ease-in-out; 
}

@keyframes shake { 
    0%, 100% { transform: translateX(0); } 
    25% { transform: translateX(-5px); } 
    75% { transform: translateX(5px); } 
}

.blink-anim { 
    animation: blink 1s infinite; 
}

@keyframes blink { 
    0%, 100% { opacity: 1; } 
    50% { opacity: 0.5; } 
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Genie Effect para Dice Tray */
.genie-enter {
    animation: genieIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.genie-leave {
    animation: genieOut 0.3s cubic-bezier(0.6, -0.28, 0.735, 0.045);
}

@keyframes genieIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes genieOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.3) translateY(50px);
    }
}

/* Transições de Página */
body.animating-out {
    animation: pageOut 0.3s ease-out forwards;
}

body.animating-in {
    animation: pageIn 0.4s ease-out forwards;
}

@keyframes pageOut {
    to {
        opacity: 0;
        filter: blur(10px);
        transform: scale(0.95);
    }
}

@keyframes pageIn {
    from {
        opacity: 0;
        filter: blur(10px);
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

/* Bloqueio de Interação */
body.interaction-lock {
    pointer-events: none;
    user-select: none;
}

/* MINIGAME */
.glitch-target {
    position: absolute;
    width: 60px; 
    height: 60px;
    background: #ef4444;
    border-radius: 50%;
    cursor: crosshair !important;
    box-shadow: 
        0 0 20px #ef4444,
        0 0 40px #ef4444,
        inset 0 0 10px rgba(255, 255, 255, 0.5);
    z-index: 20000;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-weight: bold; 
    color: black; 
    font-size: 10px;
    user-select: none;
    transition: transform 0.1s;
    animation: glitchPulse 0.5s infinite;
}

@keyframes glitchPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.glitch-target:active { 
    transform: scale(0.9); 
    background: white; 
}

/* Scrollbar Personalizada */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--neon-core);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--neon-rgb), 0.8);
}

/* UTILITÁRIOS */
.font-brand { font-family: 'Orbitron', sans-serif; }
.font-code { font-family: 'JetBrains Mono', monospace; }

/* Crit Success/Fail */
.crit-success {
    color: #10b981 !important;
    text-shadow: 0 0 10px #10b981;
    animation: critGlow 0.5s ease-out;
}

.crit-fail {
    color: #ef4444 !important;
    text-shadow: 0 0 10px #ef4444;
    animation: critGlow 0.5s ease-out;
}

@keyframes critGlow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE AVANÇADA
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .glass {
        backdrop-filter: blur(10px);
    }
    
    /* Melhor toque em mobile */
    button, a, [role="button"] {
        touch-action: manipulation;
    }
    
    /* Inputs maiores para dedos */
    input, textarea, select {
        font-size: 16px !important; /* Previne zoom no iOS */
        min-height: 44px;
    }
    
    /* Headers mais compactos */
    .font-brand {
        font-size: 0.9em;
    }
    
    /* Cards mais espaçados para toque */
    .glass {
        margin-bottom: 0.75rem;
    }
    
    /* Botões de ação mais acessíveis */
    .fixed.bottom-6 {
        bottom: max(1.5rem, env(safe-area-inset-bottom));
    }
}

/* Telas muito pequenas */
@media (max-width: 380px) {
    body {
        font-size: 14px;
    }
    
    .text-lg {
        font-size: 1rem;
    }
    
    .text-xl {
        font-size: 1.125rem;
    }
    
    .p-4 {
        padding: 0.75rem;
    }
    
    .gap-4 {
        gap: 0.75rem;
    }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .fixed.bottom-6 {
        bottom: 0.5rem;
    }
    
    .modal-enter {
        max-height: 90vh;
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .max-w-7xl {
        max-width: 95%;
    }
}

/* Safe areas para iPhones com notch */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
    
    .fixed.bottom-0,
    .fixed.bottom-4,
    .fixed.bottom-6 {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* --- CORREÇÕES DE SCROLL E CLIQUES --- */

/* 1. Força o navegador a permitir rolagem na página inteira */
html, body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}

/* 2. Faz o mouse/dedo "atravessar" os efeitos visuais (CRT, Grid) */
.bg-grid,
.crt-mode::before,
.crt-mode::after {
    pointer-events: none !important;
    touch-action: none !important;
    user-select: none !important;
}

/* 3. Garante que seus botões e conteúdo estejam clicáveis acima dos efeitos */
main, header, .glass, .modal-enter, button, input, select, a {
    pointer-events: auto !important;
    position: relative; 
    z-index: 50;
}

/* 4. Correção específica para o scroll suave em celulares */
.custom-scrollbar, body {
    -webkit-overflow-scrolling: touch !important;
}

/* ============================================
   MODO COMPACTO (Mobile)
   ============================================ */
body.compact-mode {
    font-size: 14px;
}

body.compact-mode .glass {
    padding: 0.75rem;
}

body.compact-mode .text-xl {
    font-size: 1rem;
}

body.compact-mode .text-2xl {
    font-size: 1.25rem;
}

body.compact-mode .p-6 {
    padding: 1rem;
}

body.compact-mode .p-4 {
    padding: 0.75rem;
}

body.compact-mode .gap-6 {
    gap: 1rem;
}

body.compact-mode .mb-6 {
    margin-bottom: 1rem;
}

body.compact-mode input,
body.compact-mode textarea,
body.compact-mode select {
    padding: 0.5rem;
    font-size: 0.875rem;
}

body.compact-mode button {
    padding: 0.5rem 0.75rem;
}

/* ============================================
   CORREÇÕES DE RESPONSIVIDADE E POSICIONAMENTO
   ============================================ */

@media (max-width: 768px) {
    .font-brand {
        letter-spacing: 0.05em;
    }
    
    button {
        min-height: 44px;
        min-width: 44px;
    }
    
    button.w-6, button.w-7, button.w-8 {
        min-height: auto;
        min-width: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACHIEVEMENTS STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Achievement Platinum - Efeito Especial */
.achievement-platinum {
    background: linear-gradient(135deg, 
        #e5e5e5 0%, 
        #a0a0a0 25%, 
        #ffffff 50%, 
        #a0a0a0 75%, 
        #e5e5e5 100%);
    background-size: 200% 200%;
    animation: platinum-shine 3s ease infinite;
    border: 2px solid #c0c0c0;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(200, 200, 200, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

@keyframes platinum-shine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.achievement-platinum .achievement-icon {
    color: #1a1a1a;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Achievement Rainbow (para alguns secretos) */
.achievement-rainbow {
    background: linear-gradient(135deg, 
        #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
    background-size: 400% 400%;
    animation: rainbow-shift 5s ease infinite;
}

@keyframes rainbow-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Achievement Secreto (bloqueado) */
.achievement-secret {
    background: #1a1a1a;
    border: 1px dashed #333;
}

.achievement-secret .achievement-icon {
    color: #333;
}

.achievement-secret::before {
    content: '?';
    position: absolute;
    font-size: 2rem;
    color: #444;
    font-weight: bold;
}

/* Celebração da Platina */
.platinum-celebration {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.98) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: platinum-fade-in 0.5s ease-out;
}

.platinum-celebration.fade-out {
    animation: platinum-fade-out 0.5s ease-out forwards;
}

@keyframes platinum-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes platinum-fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

.platinum-content {
    text-align: center;
    animation: platinum-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes platinum-pop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

.platinum-trophy {
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    background: linear-gradient(135deg, 
        #e5e5e5 0%, 
        #a0a0a0 25%, 
        #ffffff 50%, 
        #a0a0a0 75%, 
        #e5e5e5 100%);
    background-size: 200% 200%;
    animation: platinum-shine 2s ease infinite;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 0 60px rgba(255, 255, 255, 0.4),
        0 0 100px rgba(200, 200, 200, 0.3),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

.platinum-trophy i {
    font-size: 60px;
    color: #1a1a1a;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
    animation: trophy-bounce 1s ease infinite;
}

@keyframes trophy-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.platinum-content h2 {
    font-size: 48px;
    font-weight: bold;
    background: linear-gradient(135deg, #c0c0c0, #ffffff, #c0c0c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
    letter-spacing: 10px;
}

.platinum-content p {
    color: #888;
    font-size: 16px;
    letter-spacing: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MELHORIAS DE UX
   ═══════════════════════════════════════════════════════════════════════════ */

/* Focus visible para acessibilidade */
:focus-visible {
    outline: 2px solid var(--neon-core);
    outline-offset: 2px;
}

/* Remove outline padrão mas mantém para keyboard */
:focus:not(:focus-visible) {
    outline: none;
}

/* Hover states mais suaves */
button, a, [role="button"] {
    transition: all 0.2s ease;
}

/* Active state feedback */
button:active:not(:disabled),
[role="button"]:active:not(:disabled) {
    transform: scale(0.97);
}

/* Disabled states */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING ANIMATIONS - Suaves e performáticas
   ═══════════════════════════════════════════════════════════════════════════ */

/* KEYFRAMES - Definições base */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* ANIMAÇÕES - Forçar com !important para sobrescrever Tailwind */
.fa-spin,
.animate-spin {
    animation: spin 1s linear infinite !important;
    will-change: transform;
    transform-origin: center center;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite !important;
}

.animate-bounce {
    animation: bounce 1s infinite !important;
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite !important;
}

/* Loading bar smooth */
@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-bar {
    animation: loadingBar 1.5s ease-in-out infinite;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKELETON LOADERS - Shimmer premium
   ═══════════════════════════════════════════════════════════════════════════ */

.skeleton {
    background: linear-gradient(
        110deg,
        rgba(255,255,255,0.03) 0%,
        rgba(255,255,255,0.03) 40%,
        rgba(var(--neon-rgb), 0.08) 50%,
        rgba(255,255,255,0.03) 60%,
        rgba(255,255,255,0.03) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 2s ease-in-out infinite !important;
    border-radius: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton pulse alternativo */
.skeleton-pulse {
    animation: skeletonPulse 1.5s ease-in-out infinite !important;
}

@keyframes skeletonPulse {
    0%, 100% { 
        opacity: 0.6;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.02);
    }
}

/* Tooltip styles */
[title] {
    position: relative;
}

/* Pulse effect para notificações */
.pulse-ring {
    position: absolute;
    inset: -4px;
    border: 2px solid var(--neon-core);
    border-radius: inherit;
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Better text selection */
::selection {
    background: rgba(var(--neon-rgb), 0.3);
    color: white;
}

/* Drag and drop visual feedback */
.dragging {
    opacity: 0.5;
    cursor: grabbing !important;
}

.drag-over {
    border: 2px dashed var(--neon-core) !important;
    background: rgba(var(--neon-rgb), 0.1) !important;
}

/* Toast notifications animation */
.toast-enter {
    animation: toast-slide-in 0.3s ease-out;
}

.toast-leave {
    animation: toast-slide-out 0.3s ease-in forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Music visualizer bars */
@keyframes music-bar {
    0%, 100% { height: 40%; }
    50% { height: 100%; }
}

.music-bar-1 { animation: music-bar 0.4s ease infinite; }
.music-bar-2 { animation: music-bar 0.4s ease 0.1s infinite; }
.music-bar-3 { animation: music-bar 0.4s ease 0.2s infinite; }

/* Card hover lift effect */
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Gradient text helper */
.gradient-text {
    background: linear-gradient(135deg, var(--neon-core), var(--neon-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Neon glow effect */
.neon-glow {
    box-shadow: 
        0 0 5px var(--neon-core),
        0 0 10px var(--neon-core),
        0 0 20px var(--neon-core);
}

/* Subtle border glow on hover */
.glow-hover:hover {
    box-shadow: 0 0 20px rgba(var(--neon-rgb), 0.3);
    border-color: var(--neon-core);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MICRO-INTERACTIONS & FEEDBACK ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Shake animation for errors */
.animate-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translateX(-1px); }
    20%, 80% { transform: translateX(2px); }
    30%, 50%, 70% { transform: translateX(-4px); }
    40%, 60% { transform: translateX(4px); }
}

/* Bounce-in animation for success checkmarks */
.animate-bounce-in {
    animation: bounceIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Pulse glow for critical/success states */
.animate-glow-pulse {
    animation: glowPulse 1.5s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { box-shadow: 0 0 5px var(--neon-core), 0 0 10px var(--neon-core); }
    50% { box-shadow: 0 0 20px var(--neon-core), 0 0 30px var(--neon-core); }
}

/* Dice roll animation */
.animate-dice-roll {
    animation: diceRoll 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes diceRoll {
    0% { transform: scale(0.5) rotate(-180deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Critical hit effect */
.animate-critical {
    animation: criticalHit 0.8s ease-out;
}

@keyframes criticalHit {
    0% { transform: scale(1); filter: brightness(1); }
    25% { transform: scale(1.3); filter: brightness(2) drop-shadow(0 0 20px #22c55e); }
    50% { transform: scale(0.9); }
    100% { transform: scale(1); filter: brightness(1); }
}

/* Fumble effect */
.animate-fumble {
    animation: fumble 0.6s ease-out;
}

@keyframes fumble {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); filter: brightness(0.8); }
    20%, 40%, 60%, 80% { transform: translateX(5px); filter: hue-rotate(-20deg); }
}

/* Skeleton loader shimmer */
.skeleton-loader {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.05) 25%,
        rgba(255,255,255,0.1) 50%,
        rgba(255,255,255,0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* D20 spinner for loading - FORÇAR */
.animate-d20-spin {
    animation: d20Spin 2s ease-in-out infinite !important;
    will-change: transform;
}

@keyframes d20Spin {
    0% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(90deg) scale(1.1); }
    50% { transform: rotate(180deg) scale(1); }
    75% { transform: rotate(270deg) scale(1.1); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Achievement unlock effect */
.animate-achievement {
    animation: achievementUnlock 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes achievementUnlock {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(10deg); }
    70% { transform: scale(0.9) rotate(-5deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

/* Save indicator pulse */
.animate-save-pulse {
    animation: savePulse 1s ease-in-out infinite;
}

@keyframes savePulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Holographic shimmer for RPG profile */
.holographic-shimmer {
    background: linear-gradient(
        135deg,
        rgba(14, 165, 233, 0.1) 0%,
        rgba(217, 70, 239, 0.1) 25%,
        rgba(14, 165, 233, 0.2) 50%,
        rgba(217, 70, 239, 0.1) 75%,
        rgba(14, 165, 233, 0.1) 100%
    );
    background-size: 400% 400%;
    animation: holographic 8s ease infinite;
}

@keyframes holographic {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Scanline effect for cyber aesthetic */
.scanlines::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.1) 2px,
        rgba(0, 0, 0, 0.1) 4px
    );
    pointer-events: none;
    opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   🍎 PREMIUM ANIMATIONS - macOS-STYLE SMOOTH EXPERIENCE
   ═══════════════════════════════════════════════════════════════════════════
   Animações suaves, profissionais, 60fps+.
   Inspirado em macOS, iOS e interfaces premium.
   Efeitos sutis, sem exagero de brilho.
*/

/* ═══════════════════════════════════════════════════════════════════════════
   GLOBAL PERFORMANCE OPTIMIZATIONS
   ═══════════════════════════════════════════════════════════════════════════ */
/* Desabilita animações brutas - apenas transições suaves */
@media (prefers-reduced-motion: no-preference) {
    * {
        /* Curva de animação ultra-suave estilo Apple */
        --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
        --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   GLASS PANELS - Hover suave estilo macOS
   ═══════════════════════════════════════════════════════════════════════════ */
.glass {
    transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease;
}

.glass:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS - Feedback tátil suave
   ═══════════════════════════════════════════════════════════════════════════ */
button, [role="button"], .btn {
    transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.2s ease,
                box-shadow 0.3s ease;
}

button:active:not(:disabled), 
[role="button"]:active:not(:disabled) {
    opacity: 0.8;
    transition-duration: 0.1s;
}

/* Glow sutil em botões coloridos */
button[class*="bg-purple"]:hover,
button[class*="bg-cyan"]:hover,
button[class*="bg-green"]:hover,
button[class*="bg-red"]:hover {
    box-shadow: 0 4px 15px rgba(var(--neon-rgb), 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INPUTS - Focus ring estilo Apple
   ═══════════════════════════════════════════════════════════════════════════ */
input, textarea, select {
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: rgba(var(--neon-rgb), 0.5);
    box-shadow: 0 0 0 3px rgba(var(--neon-rgb), 0.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS & CONTAINERS - Hover lift sutil
   ═══════════════════════════════════════════════════════════════════════════ */
.bg-black\/40, .bg-white\/5, .bg-white\/10 {
    transition: background-color 0.2s ease,
                transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.bg-black\/40:hover, .bg-white\/5:hover, .bg-white\/10:hover {
    background: rgba(255, 255, 255, 0.06);
}

/* Border highlight sutil */
[class*="border-white\/10"]:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ICONS - Transições suaves
   ═══════════════════════════════════════════════════════════════════════════ */
i.fa-solid, i.fa-regular, i.fa-brands {
    transition: color 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAT BARS - Transição suave de largura
   ═══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════════
   PROGRESS BARS - Animação fluida estilo macOS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Barras de progresso - transição suave + glow */
.overflow-hidden > .bg-red-500,
.overflow-hidden > .bg-blue-500,
.overflow-hidden > .bg-purple-500,
.overflow-hidden > .bg-green-500,
.overflow-hidden > .bg-cyan-500,
.overflow-hidden > .bg-yellow-500,
.overflow-hidden > .bg-pink-500,
.overflow-hidden > [class*="bg-gradient"],
.stat-bar,
.progress-bar {
    transition: width 0.8s var(--ease-out-expo) !important;
    will-change: width;
    position: relative;
    overflow: hidden;
}

/* Shimmer effect nas barras de progresso */
.progress-bar::after,
.stat-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: progressShimmer 2s infinite !important;
}

@keyframes progressShimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Pulse para barras críticas */
.progress-critical {
    animation: progressPulse 1s ease-in-out infinite !important;
}

@keyframes progressPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% { 
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AVATARS & PHOTOS - Hover suave
   ═══════════════════════════════════════════════════════════════════════════ */
img {
    transition: opacity 0.3s ease;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS & OVERLAYS - Entrada premium estilo macOS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Modal enter - scale + fade + slide */
.modal-enter {
    animation: modalEnter 0.4s var(--ease-out-expo) !important;
}

@keyframes modalEnter {
    0% {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* Backdrop fade com blur progressivo */
[x-show] {
    transition: opacity 0.3s var(--ease-in-out-smooth),
                backdrop-filter 0.3s var(--ease-in-out-smooth) !important;
}

/* Glass effect premium com saturação */
.glass {
    backdrop-filter: blur(16px) saturate(180%) brightness(1.1) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) brightness(1.1) !important;
    transition: backdrop-filter 0.4s var(--ease-out-expo),
                background-color 0.3s var(--ease-in-out-smooth) !important;
}

/* Glass hover - intensifica efeito */
.glass:hover {
    backdrop-filter: blur(20px) saturate(200%) brightness(1.15) !important;
    -webkit-backdrop-filter: blur(20px) saturate(200%) brightness(1.15) !important;
    background-color: rgba(20, 20, 25, 0.9) !important;
}

/* Fade in genérico */
.fade-in {
    animation: fadeIn 0.3s var(--ease-out-expo) !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide from right (notifications) */
.slide-in-right {
    animation: slideInRight 0.4s var(--ease-out-expo) !important;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide from bottom (sheets) */
.slide-in-bottom {
    animation: slideInBottom 0.4s var(--ease-out-expo) !important;
}

@keyframes slideInBottom {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR - Simples e elegante
   ═══════════════════════════════════════════════════════════════════════════ */
.custom-scrollbar::-webkit-scrollbar-thumb {
    transition: background-color 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(var(--neon-rgb), 0.6);
}


/* ═══════════════════════════════════════════════════════════════════════════
   NOTIFICATIONS & TOASTS - Estilo macOS/iOS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Notification enter - slide + bounce */
.notification-enter {
    animation: notificationSlide 0.5s var(--ease-out-back) !important;
}

@keyframes notificationSlide {
    0% {
        opacity: 0;
        transform: translateX(120%) scale(0.9);
    }
    60% {
        transform: translateX(-5%) scale(1);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Notification exit - slide out */
.notification-exit {
    animation: notificationExit 0.3s var(--ease-in-out-smooth) !important;
}

@keyframes notificationExit {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(120%) scale(0.9);
    }
}

/* Toast bounce in from top */
.toast-enter {
    animation: toastBounce 0.5s var(--ease-out-back) !important;
}

@keyframes toastBounce {
    0% {
        opacity: 0;
        transform: translateY(-100%) scale(0.8);
    }
    60% {
        transform: translateY(10%) scale(1.05);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shake para erros */
.shake {
    animation: shake 0.5s var(--ease-out-expo) !important;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
    20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* Wiggle para atenção */
.wiggle {
    animation: wiggle 0.8s var(--ease-out-expo) !important;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-5deg); }
    75% { transform: rotate(5deg); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAYER CARDS - Status indicator suave
   ═══════════════════════════════════════════════════════════════════════════ */
.player-online::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: onlinePulse 2s ease-in-out infinite;
}

@keyframes onlinePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKILL DOTS - Feedback suave
   ═══════════════════════════════════════════════════════════════════════════ */
.skill-dot {
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.skill-dot:hover {
    transform: scale(1.15);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABS - Underline suave
   ═══════════════════════════════════════════════════════════════════════════ */
[role="tab"], .tab-button {
    position: relative;
    transition: color 0.2s ease;
}

[role="tab"]::after, .tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--neon-core);
    transition: width 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-50%);
}

[role="tab"]:hover::after, .tab-button:hover::after,
[role="tab"][aria-selected="true"]::after, .tab-button.active::after {
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOVER REVEAL - Fade suave
   ═══════════════════════════════════════════════════════════════════════════ */
.hover-reveal {
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

*:hover > .hover-reveal {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE OPTIMIZATIONS - Responsividade aprimorada
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    /* Textos mais legíveis */
    .text-\[9px\] { font-size: 10px !important; }
    .text-\[10px\] { font-size: 11px !important; }
    .text-\[8px\] { font-size: 10px !important; }
    
    /* Espaçamento melhorado */
    .p-2 { padding: 0.625rem !important; }
    .p-3 { padding: 0.875rem !important; }
    .gap-1 { gap: 0.375rem !important; }
    .gap-2 { gap: 0.625rem !important; }
    
    /* Botões mais tocáveis */
    button, [role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Inputs maiores */
    input, textarea, select {
        min-height: 44px;
        font-size: 16px !important;
    }
    
    /* Cards com mais respiro */
    .glass {
        padding: 1rem !important;
    }
    
    /* Sliders de volume - correção de posicionamento */
    input[type="range"] {
        height: 44px;
        padding: 0;
        margin: 0;
        -webkit-appearance: none;
        appearance: none;
        background: transparent;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        -webkit-appearance: none;
        appearance: none;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: var(--neon-core);
        cursor: pointer;
        margin-top: -8px;
    }
    
    input[type="range"]::-webkit-slider-runnable-track {
        width: 100%;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }
    
    /* Menus não espremidos */
    .flex.gap-2.flex-wrap {
        gap: 0.5rem !important;
    }
    
    /* Headers mais compactos mas legíveis */
    h1, h2, h3 {
        line-height: 1.3;
    }
}

/* Telas muito pequenas */
@media (max-width: 380px) {
    .text-xs { font-size: 0.8rem !important; }
    .text-sm { font-size: 0.875rem !important; }
    
    .p-4 { padding: 0.75rem !important; }
    .px-4 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
    
    /* Evita overflow */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ADDITIONAL PREMIUM ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Links - Underline animado */
a:not([class]) {
    position: relative;
    text-decoration: none;
}

a:not([class])::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.2s ease;
}

a:not([class]):hover::after {
    width: 100%;
}

/* Checkbox/Radio custom animation */
input[type="checkbox"], input[type="radio"] {
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

/* Select dropdown */
select {
    transition: border-color 0.2s ease;
}

select:hover {
    border-color: rgba(var(--neon-rgb), 0.3);
}

/* Tooltips fade */
[title]:hover::before {
    animation: tooltipFade 0.2s ease;
}

@keyframes tooltipFade {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Accordion/Collapse animation */
[x-collapse] {
    transition: height 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Switch toggle animation */
.toggle-switch {
    transition: background-color 0.2s ease;
}

.toggle-switch::after {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Badge pulse sutil */
.badge-new {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Card selection */
.card-selectable {
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.card-selectable:hover {
    border-color: rgba(var(--neon-rgb), 0.3);
    background-color: rgba(var(--neon-rgb), 0.02);
}

.card-selectable.selected {
    border-color: var(--neon-core);
    background-color: rgba(var(--neon-rgb), 0.05);
}

/* Drag handle */
.drag-handle {
    cursor: grab;
    transition: color 0.15s ease;
}

.drag-handle:hover {
    color: var(--neon-core);
}

.drag-handle:active {
    cursor: grabbing;
}

/* Expandable sections */
.expandable-header {
    transition: background-color 0.15s ease;
}

.expandable-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

.expandable-icon {
    transition: transform 0.2s ease;
}

.expandable-header[aria-expanded="true"] .expandable-icon {
    transform: rotate(180deg);
}

/* List item hover */
.list-item {
    transition: background-color 0.15s ease, padding-left 0.15s ease;
}

.list-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    padding-left: 1rem;
}

/* Chip/Tag remove animation */
.chip-remove {
    transition: color 0.15s ease, transform 0.15s ease;
}

.chip-remove:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* Progress indicator */
.progress-indicator {
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Skeleton shimmer suave */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 25%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Focus ring universal */
:focus-visible {
    outline: 2px solid rgba(var(--neon-rgb), 0.5);
    outline-offset: 2px;
}

/* Smooth page transitions */
.page-enter {
    animation: pageEnter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dice result animation */
.dice-result {
    animation: diceResult 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes diceResult {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Critical hit glow sutil */
.critical-hit {
    animation: criticalGlow 0.5s ease;
}

@keyframes criticalGlow {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

/* Fumble shake sutil */
.fumble {
    animation: fumbleShake 0.4s ease;
}

@keyframes fumbleShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHAT MESSAGES - Animações suaves
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mensagem entrando */
.chat-message-enter {
    animation: chatMessageEnter 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes chatMessageEnter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mensagem enviando (otimista) */
.chat-message-sending {
    opacity: 0.7;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 12px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: rgba(var(--neon-rgb), 0.5);
    border-radius: 50%;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS & LISTS - Animações de entrada e hover
   ═══════════════════════════════════════════════════════════════════════════ */

/* Card hover suave */
.friend-card,
[class*="rounded-xl"][class*="border"],
[class*="rounded-lg"][class*="border"] {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.friend-card:hover,
[class*="rounded-xl"][class*="border"]:hover,
[class*="rounded-lg"][class*="border"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    border-color: rgba(var(--neon-rgb), 0.3) !important;
}

/* Stagger animation para listas - FORÇAR */
[x-for] > * {
    animation: listItemEnter 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards !important;
}

[x-for] > *:nth-child(1) { animation-delay: 0.05s !important; }
[x-for] > *:nth-child(2) { animation-delay: 0.1s !important; }
[x-for] > *:nth-child(3) { animation-delay: 0.15s !important; }
[x-for] > *:nth-child(4) { animation-delay: 0.2s !important; }
[x-for] > *:nth-child(5) { animation-delay: 0.25s !important; }
[x-for] > *:nth-child(6) { animation-delay: 0.3s !important; }
[x-for] > *:nth-child(7) { animation-delay: 0.35s !important; }
[x-for] > *:nth-child(8) { animation-delay: 0.4s !important; }

@keyframes listItemEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Unread badge pulse */
.unread-badge {
    animation: unreadPulse 2s ease-in-out infinite;
}

@keyframes unreadPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTON MICRO-INTERACTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVE STATES - Press feedback estilo iOS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Active press - scale down rápido */
button:active:not(:disabled),
[role="button"]:active:not(:disabled) {
    transform: scale(0.95) !important;
    transition: transform 0.1s var(--ease-out-expo) !important;
    filter: brightness(0.9) !important;
}

/* Active para cards */
[class*="rounded-xl"]:active,
[class*="rounded-lg"]:active {
    transform: scale(0.98) !important;
    transition: transform 0.1s var(--ease-out-expo) !important;
}

/* Ripple effect sutil */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(var(--neon-rgb), 0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    pointer-events: none;
}

.ripple:active::after {
    animation: ripple 0.6s var(--ease-out-expo) !important;
}

/* Success flash */
.success-flash {
    animation: successFlash 0.3s ease;
}

@keyframes successFlash {
    0% { background-color: rgba(34, 197, 94, 0); }
    50% { background-color: rgba(34, 197, 94, 0.2); }
    100% { background-color: rgba(34, 197, 94, 0); }
}

/* Error shake */
.error-shake {
    animation: errorShake 0.4s ease;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}