/* ═══════════════════════════════════════════════════════════════
   PREMIUM THEME EFFECTS — Profile Modal overrides & animations
   v2.0 — Elegância máxima, animações -40%, micro-interações finas
   ═══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════
   SISTEMA BASE — Tokens de efeito
══════════════════════════════════════════════════ */

/* Noise texture quase invisível — aplicado a todos os cards */
.glass-profile-card,
#profile-modal-card {
    position: relative;
}

.glass-profile-card::before,
#profile-modal-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 1;
    mix-blend-mode: overlay;
}

/* Reflexo de vidro nos cards — linha de brilho no topo */
.glass-profile-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.35) 30%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 255, 255, 0.35) 70%,
        transparent
    );
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
}

/* ══════════════════════════════════════════════════
   ENTRADA EM CASCATA (STAGGER)
══════════════════════════════════════════════════ */
.profile-stagger {
    opacity: 0;
    transform: translateY(12px);
    animation: profileStaggerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.stagger-1 { animation-delay: 60ms; }
.stagger-2 { animation-delay: 120ms; }
.stagger-3 { animation-delay: 180ms; }
.stagger-4 { animation-delay: 240ms; }
.stagger-5 { animation-delay: 300ms; }

@keyframes profileStaggerIn {
    to { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════
   AVATAR — Shine passando + Glow sutil
══════════════════════════════════════════════════ */

/* Glow — dispara uma vez ao abrir, depois fica sutil */
@keyframes avatar-glow-enter {
    0%   { box-shadow: 0 0 0px var(--accent-glow); }
    40%  { box-shadow: 0 0 28px var(--accent-glow), 0 0 0 2px var(--accent); }
    100% { box-shadow: 0 0 14px var(--accent-glow), 0 0 0 1.5px var(--accent); }
}

/* Shine que passa pelo avatar */
@keyframes avatar-shine {
    0%   { transform: translateX(-120%) rotate(-45deg); }
    100% { transform: translateX(220%) rotate(-45deg); }
}

#profile-avatar-ring {
    animation: avatar-glow-enter 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: box-shadow 0.4s ease;
    overflow: hidden;
    position: relative;
}

#profile-avatar-ring::after {
    content: '';
    position: absolute;
    top: -20%;
    left: 0;
    width: 40%;
    height: 140%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.28) 50%,
        transparent 100%
    );
    animation: avatar-shine 3.2s cubic-bezier(0.4, 0, 0.2, 1) 0.8s infinite;
    pointer-events: none;
    z-index: 10;
}

/* ══════════════════════════════════════════════════
   GLASSMORPHISM GERAL — Cards e Botões
══════════════════════════════════════════════════ */
.glass-profile-card {
    background: var(--profile-card-bg, rgba(255, 255, 255, 0.55)) !important;
    backdrop-filter: blur(16px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.06) inset,
        0 8px 24px rgba(0, 0, 0, 0.10);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.28s ease,
                border-color 0.2s ease;
}

.glass-profile-card:hover {
    transform: translateY(-3px) scale(1.005);
    border-color: var(--accent) !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.08) inset,
        0 12px 32px var(--accent-glow),
        0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Clique — feedback tátil */
.glass-profile-card:active {
    transform: translateY(0) scale(0.99);
    transition-duration: 0.1s;
}

/* ══════════════════════════════════════════════════
   BOTÕES DE AÇÃO
══════════════════════════════════════════════════ */
.profile-btn-action {
    position: relative;
    overflow: hidden;
    transition:
        transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease;
    border: 1px solid var(--border, rgba(0, 0, 0, 0.06));
    background: var(--surface-2, #F8FAFC);
}

/* Linha de brilho interna */
.profile-btn-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.25);
    pointer-events: none;
}

.profile-btn-action:hover {
    transform: translateY(-2px) scale(1.01);
    background: var(--surface-3, #F1F5F9);
    border-color: var(--accent);
    box-shadow:
        0 6px 16px var(--accent-glow),
        0 2px 4px rgba(0, 0, 0, 0.08);
}

.profile-btn-action:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

/* Focus acessibilidade */
.profile-btn-action:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ══════════════════════════════════════════════════
   AURA ATRÁS DO MODAL — Blur radial de accent
══════════════════════════════════════════════════ */
@keyframes modal-aura-in {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

.profile-modal-aura {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modal-aura-in 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.profile-modal-aura::after {
    content: '';
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.08;
    filter: blur(80px);
}

/* ══════════════════════════════════════════════════
   ★ MIDNIGHT 🌌 — Astronomia + Dourado
══════════════════════════════════════════════════ */
.theme-midnight #profile-modal-card {
    background: linear-gradient(160deg, #090E22 0%, #070A18 100%) !important;
    border: 1px solid rgba(251, 191, 36, 0.12) !important;
    box-shadow:
        0 0 0 1px rgba(251, 191, 36, 0.06),
        0 24px 60px rgba(0, 0, 0, 0.9),
        0 0 80px rgba(251, 191, 36, 0.06) !important;
}

/* Aura dourada atrás do modal */
.theme-midnight .profile-modal-aura::after {
    background: radial-gradient(ellipse, #FBBF24, transparent 70%);
    opacity: 0.12;
    width: 500px;
    height: 300px;
    filter: blur(60px);
}

/* Cards internos */
.theme-midnight .glass-profile-card {
    background: rgba(16, 24, 51, 0.75) !important;
    border: 1px solid rgba(251, 191, 36, 0.10) !important;
    box-shadow:
        0 2px 0 rgba(251, 191, 36, 0.05) inset,
        0 8px 28px rgba(0, 0, 0, 0.5) !important;
}

.theme-midnight .glass-profile-card:hover {
    border-color: rgba(251, 191, 36, 0.3) !important;
    box-shadow:
        0 2px 0 rgba(251, 191, 36, 0.08) inset,
        0 12px 36px rgba(251, 191, 36, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.5) !important;
}

/* Botões */
.theme-midnight .profile-btn-action {
    background: rgba(22, 31, 61, 0.8) !important;
    border-color: rgba(251, 191, 36, 0.15) !important;
    color: #e2e8f0 !important;
}

.theme-midnight .profile-btn-action:hover {
    background: rgba(34, 46, 92, 0.9) !important;
    border-color: rgba(251, 191, 36, 0.4) !important;
    color: #FBBF24 !important;
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.15), 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Estrelas — twinkle mais lento (−40%) */
@keyframes star-twinkle {
    0%, 100% { opacity: 0.2; transform: scale(0.8); }
    50%       { opacity: 0.9; transform: scale(1.1); }
}

.floating-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 4px #ffffff, 0 0 8px rgba(251, 191, 36, 0.5);
    animation: star-twinkle 6s infinite ease-in-out; /* era 4s */
    pointer-events: none;
    z-index: 5;
}

/* Sombra colorida no avatar Midnight */
.theme-midnight #profile-avatar-ring {
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.4), 0 8px 24px rgba(251, 191, 36, 0.2);
}

/* ══════════════════════════════════════════════════
   ★ MINIMALISTA ⚫ — Grafia limpa + Contraste máximo
══════════════════════════════════════════════════ */
.theme-minimalista #profile-modal-card {
    background: #FFFFFF !important;
    border: 1.5px solid #E5E7EB !important;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 20px 48px rgba(0, 0, 0, 0.14),
        0 4px 8px rgba(0, 0, 0, 0.06) !important;
    border-radius: 20px !important;
}

/* Aura muito sutil — quase shadow */
.theme-minimalista .profile-modal-aura::after {
    background: rgba(0, 0, 0, 0.04);
    filter: blur(40px);
    width: 380px;
    height: 260px;
}

/* Cards — borda e sombra */
.theme-minimalista .glass-profile-card {
    background: #F9FAFB !important;
    border: 1px solid #E9ECEF !important;
    border-radius: 14px !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 1) inset,
        0 4px 16px rgba(0, 0, 0, 0.07) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.theme-minimalista .glass-profile-card:hover {
    background: #FFFFFF !important;
    border-color: #111111 !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 1) inset,
        0 8px 24px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(0, 0, 0, 0.08) !important;
}

/* Botões — flat com borda */
.theme-minimalista .profile-btn-action {
    background: #F4F4F5 !important;
    border: 1.5px solid #D1D5DB !important;
    color: #111111 !important;
    border-radius: 10px !important;
}

.theme-minimalista .profile-btn-action:hover {
    background: #FFFFFF !important;
    border-color: #111111 !important;
    color: #000000 !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.10) !important;
}

/* Avatar minimalista — anel preto elegante */
.theme-minimalista #profile-avatar-ring {
    box-shadow: 0 0 0 2px #111111, 0 4px 16px rgba(0, 0, 0, 0.20);
}

/* Sem noise — minimalismo puro */
.theme-minimalista #profile-modal-card::before,
.theme-minimalista .glass-profile-card::before {
    display: none;
}

/* ══════════════════════════════════════════════════
   ★ MATERIAL YOU 🎨 — Tonal + Blob orgânico
══════════════════════════════════════════════════ */
.theme-materialyou #profile-modal-card {
    background: linear-gradient(145deg, #F8F3FF 0%, #F3EDF7 100%) !important;
    border: 1px solid rgba(103, 80, 164, 0.14) !important;
    box-shadow:
        0 0 0 1px rgba(103, 80, 164, 0.06),
        0 20px 52px rgba(103, 80, 164, 0.14),
        0 6px 16px rgba(0, 0, 0, 0.06) !important;
    border-radius: 28px !important;
}

/* Aura roxa suave */
.theme-materialyou .profile-modal-aura::after {
    background: radial-gradient(ellipse, #6750A4, transparent 70%);
    opacity: 0.10;
    width: 480px;
    height: 320px;
    filter: blur(70px);
}

/* Cards tonal */
.theme-materialyou .glass-profile-card {
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(103, 80, 164, 0.12) !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.9) inset,
        0 6px 20px rgba(103, 80, 164, 0.10) !important;
    border-radius: 20px !important;
}

.theme-materialyou .glass-profile-card:hover {
    border-color: rgba(103, 80, 164, 0.35) !important;
    box-shadow:
        0 2px 0 rgba(255, 255, 255, 0.9) inset,
        0 10px 28px rgba(103, 80, 164, 0.18),
        0 0 0 1px rgba(103, 80, 164, 0.10) !important;
}

/* Botões tonal */
.theme-materialyou .profile-btn-action {
    background: rgba(103, 80, 164, 0.07) !important;
    border: 1px solid rgba(103, 80, 164, 0.14) !important;
    color: #1C1B1F !important;
    border-radius: 12px !important;
}

.theme-materialyou .profile-btn-action:hover {
    background: rgba(103, 80, 164, 0.14) !important;
    border-color: rgba(103, 80, 164, 0.35) !important;
    color: #4F378B !important;
    box-shadow: 0 4px 14px rgba(103, 80, 164, 0.14) !important;
}

/* Avatar — anel roxo */
.theme-materialyou #profile-avatar-ring {
    box-shadow: 0 0 0 2.5px #6750A4, 0 6px 20px rgba(103, 80, 164, 0.30);
}

/* Blob — mais lento e sutil (−40%) */
@keyframes morphing-blob {
    0%, 100% { border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; transform: scale(1) rotate(0deg); }
    50%       { border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%; transform: scale(1.06) rotate(120deg); }
}

.material-blob {
    position: absolute;
    width: 160px;
    height: 160px;
    background: var(--accent);
    opacity: 0.10;
    filter: blur(28px);
    animation: morphing-blob 20s infinite ease-in-out; /* era 15s */
    pointer-events: none;
    z-index: 0;
}

/* ══════════════════════════════════════════════════
   ★ AMOLED ⬛ — Black glass supremo
══════════════════════════════════════════════════ */
.theme-amoled #profile-modal-card {
    background: #000000 !important;
    border: 1px solid rgba(0, 229, 255, 0.10) !important;
    box-shadow:
        0 0 0 1px rgba(0, 229, 255, 0.05),
        0 24px 64px rgba(0, 0, 0, 0.98),
        0 0 60px rgba(0, 229, 255, 0.04) !important;
    border-radius: 22px !important;
}

/* Aura ciano ultra-suave */
.theme-amoled .profile-modal-aura::after {
    background: radial-gradient(ellipse, #00E5FF, transparent 70%);
    opacity: 0.07;
    width: 500px;
    height: 280px;
    filter: blur(90px);
}

/* Cards */
.theme-amoled .glass-profile-card {
    background: #0a0a0a !important;
    border: 1px solid rgba(0, 229, 255, 0.07) !important;
    box-shadow:
        0 1px 0 rgba(0, 229, 255, 0.05) inset,
        0 6px 24px rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.theme-amoled .glass-profile-card:hover {
    border-color: rgba(0, 229, 255, 0.25) !important;
    box-shadow:
        0 1px 0 rgba(0, 229, 255, 0.08) inset,
        0 0 20px rgba(0, 229, 255, 0.10),
        0 8px 32px rgba(0, 0, 0, 0.95) !important;
}

/* Botões AMOLED */
.theme-amoled .profile-btn-action {
    background: #0d0d0d !important;
    border: 1px solid rgba(0, 229, 255, 0.10) !important;
    color: #cbd5e1 !important;
}

.theme-amoled .profile-btn-action:hover {
    background: #111111 !important;
    border-color: rgba(0, 229, 255, 0.35) !important;
    color: #00E5FF !important;
    box-shadow: 0 0 14px rgba(0, 229, 255, 0.12), 0 3px 8px rgba(0, 0, 0, 0.8) !important;
}

/* Avatar AMOLED — anel neon */
.theme-amoled #premium-profile-modal-avatar {
    border: 2px solid rgba(0, 229, 255, 0.5) !important;
    box-shadow: 0 0 16px rgba(0, 229, 255, 0.25), 0 0 32px rgba(0, 229, 255, 0.08);
}

/* Sem noise em AMOLED — preto puro */
.theme-amoled #profile-modal-card::before,
.theme-amoled .glass-profile-card::before {
    display: none;
}

/* ══════════════════════════════════════════════════
   TEMAS MANTIDOS — Gótico, Girl, Natureza, Praia, Alien
══════════════════════════════════════════════════ */

/* --- GÓTICO 🦇 --- */
.theme-gotico #profile-modal-card {
    font-family: var(--main-font), 'Cinzel Decorative', serif !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7), 0 0 40px rgba(139, 92, 246, 0.12) !important;
    border: 1px solid rgba(139, 92, 246, 0.15) !important;
}

@keyframes gotico-drift {
    0%   { transform: translateY(110%) translateX(-15px) rotate(0deg) scale(0.6); opacity: 0; }
    20%  { opacity: 0.5; }
    80%  { opacity: 0.5; }
    100% { transform: translateY(-20%) translateX(60px) rotate(20deg) scale(1.1); opacity: 0; }
}

.floating-bat {
    position: absolute;
    font-size: 13px;
    animation: gotico-drift 12s infinite linear; /* era 9s */
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}

/* --- GIRL 💅 --- */
@keyframes girl-sakura {
    0%   { transform: translateY(-15%) translateX(0px) rotate(0deg); opacity: 0; }
    15%  { opacity: 0.6; }
    85%  { opacity: 0.6; }
    100% { transform: translateY(115%) translateX(70px) rotate(320deg); opacity: 0; }
}

.floating-sakura {
    position: absolute;
    font-size: 10px;
    animation: girl-sakura 10s infinite linear; /* era 7s */
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}

/* --- NATUREZA 🌿 --- */
@keyframes firefly-blink {
    0%, 100% { opacity: 0.08; transform: scale(0.7) translate(0, 0); }
    50%       { opacity: 0.85; transform: scale(1.1) translate(10px, -15px); }
}

.floating-firefly {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #58D66A;
    border-radius: 50%;
    box-shadow: 0 0 6px #58D66A, 0 0 12px #58D66A;
    animation: firefly-blink 7s infinite ease-in-out; /* era 5s */
    pointer-events: none;
    z-index: 5;
}

@keyframes leaf-spin {
    0%   { transform: translateY(-15%) translateX(0) rotate(0deg); opacity: 0; }
    20%  { opacity: 0.5; }
    80%  { opacity: 0.5; }
    100% { transform: translateY(115%) translateX(45px) rotate(240deg); opacity: 0; }
}

.floating-leaf {
    position: absolute;
    font-size: 10px;
    animation: leaf-spin 11s infinite linear; /* era 8s */
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}

/* --- PRAIA 🏖️ --- */
.praia-wave-container {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 25px;
    overflow: hidden;
    pointer-events: none;
    z-index: 6;
}

.praia-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200%;
    height: 20px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V0C26.9,3,57.05,11.52,83.07,17.43,158,34.52,234.34,68.61,321.39,56.44Z' fill='%23005580' fill-opacity='0.4'/%3E%3C/svg%3E") repeat-x;
    background-size: 50% 100%;
    animation: praiaWaveLeft 18s linear infinite; /* era 14s */
}

.praia-wave-secondary {
    position: absolute;
    bottom: -2px;
    left: -100%;
    width: 200%;
    height: 23px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V120H0V0C26.9,3,57.05,11.52,83.07,17.43,158,34.52,234.34,68.61,321.39,56.44Z' fill='%2300264d'/%3E%3C/svg%3E") repeat-x;
    background-size: 50% 100%;
    animation: praiaWaveRight 12s linear infinite; /* era 9s */
}

@keyframes praiaWaveLeft {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes praiaWaveRight {
    0%   { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

/* --- ALIEN / EXTRATERRESTRE 👽 --- */
.alien-cyber-grid {
    position: absolute;
    inset: -30px 0 0 0;
    background-image:
        linear-gradient(rgba(0, 255, 178, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 178, 0.06) 1px, transparent 1px);
    background-size: 16px 16px;
    transform: perspective(60px) rotateX(25deg);
    transform-origin: top;
    animation: alienGridScroll 8s linear infinite; /* era 5s */
    pointer-events: none;
}

@keyframes alienGridScroll {
    0%   { background-position: 0 0; }
    100% { background-position: 0 32px; }
}

.avatar-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00FFB2, transparent);
    box-shadow: 0 0 8px #00FFB2, 0 0 2px #00FFB2;
    animation: scanline-down 5s infinite linear; /* era 3s */
    pointer-events: none;
    z-index: 20;
    border-radius: 50%;
}

@keyframes scanline-down {
    0%   { top: 0%; opacity: 0; }
    10%  { opacity: 0.9; }
    90%  { opacity: 0.9; }
    100% { top: 100%; opacity: 0; }
}
