/**
 * LOUD STYLE - Estilos Globais de Elite
 * Inclui: Filtro de Luz Azul, Controles Flutuantes, Modais, Animações
 */

/* ── FILTRO DE LUZ AZUL ── */
.loud-blue-filter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 180, 0, 0.08);
    pointer-events: none;
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loud-blue-filter.active {
    opacity: 1;
}

/* ── CONTROLES FLUTUANTES ── */
/* ══════════════════════════════════════
   LOUD PANEL — canto inferior direito
   ══════════════════════════════════════ */

/* Container principal */
.loud-panel {
    position: fixed;
    bottom: 28px;
    right: 24px;
    z-index: 997;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(14, 14, 18, 0.92);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    padding: 14px 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,.5);
    min-width: 52px;
}

/* XP */
.loud-panel-xp {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    margin-bottom: 2px;
}
.loud-panel-xp-val {
    font-size: .95rem;
    font-weight: 800;
    color: #22c55e;
    letter-spacing: -.5px;
}
.loud-panel-xp-label {
    font-size: .6rem;
    font-weight: 700;
    color: rgba(34,197,94,.5);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* Streak */
.loud-panel-streak {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: .8rem;
    font-weight: 700;
    color: #f97316;
}

/* Separador */
.loud-panel-sep {
    width: 28px;
    height: 1px;
    background: rgba(255,255,255,.07);
    margin: 2px 0;
}

/* Botões */
.loud-panel-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
    padding: 0;
    line-height: 1;
}
.loud-panel-btn:hover {
    background: rgba(255,255,255,.12);
    transform: scale(1.08);
}
.loud-panel-btn.active {
    background: rgba(249,115,22,.2);
    border-color: rgba(249,115,22,.4);
}
.loud-panel-btn--logout {
    font-size: .85rem;
    color: rgba(255,80,80,.8);
    border-color: rgba(255,80,80,.15);
}
.loud-panel-btn--logout:hover {
    background: rgba(255,80,80,.15);
    color: #ff5050;
    transform: scale(1.08);
}

/* Filtro de luz azul */
.loud-blue-filter {
    position: fixed;
    inset: 0;
    background: rgba(255,140,0,.08);
    pointer-events: none;
    z-index: 9990;
    display: none;
}
.loud-blue-filter.active { display: block; }

/* Mobile */
@media (max-width: 640px) {
    .loud-panel {
        bottom: 16px;
        right: 12px;
        padding: 10px 8px;
        gap: 6px;
        border-radius: 16px;
    }
    .loud-panel-xp-val { font-size: .8rem; }
    .loud-panel-btn { width: 32px; height: 32px; font-size: .9rem; }
}

/* ── MODAIS ── */
.loud-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fade-in 0.3s ease;
}

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

.loud-modal-content {
    background: linear-gradient(135deg, #16161a, #1c1c21);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 24px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slide-up 0.3s ease;
}

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.loud-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 50%;
    color: #f0f0f4;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.loud-modal-close:hover {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
}

.loud-stats-modal h2 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 2rem;
    margin-bottom: 30px;
    color: #f0f0f4;
    letter-spacing: 2px;
}

/* ── GRID DE ESTATÍSTICAS ── */
.loud-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.loud-stat-card {
    background: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.2);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.loud-stat-card:hover {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    transform: translateY(-4px);
}

.loud-stat-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #6b6b7a;
    margin-bottom: 8px;
}

.loud-stat-value {
    display: block;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    color: #22c55e;
    letter-spacing: 1px;
}

/* ── RESPONSIVIDADE ── */
@media (max-width: 768px) {
    .loud-floating-controls {
        bottom: 20px;
        right: 20px;
    }

    .loud-control-btn {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .loud-modal-content {
        padding: 30px 20px;
    }

    .loud-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── SCROLLBAR CUSTOMIZADO ── */
.loud-modal-content::-webkit-scrollbar {
    width: 8px;
}

.loud-modal-content::-webkit-scrollbar-track {
    background: rgba(34, 197, 94, 0.05);
    border-radius: 10px;
}

.loud-modal-content::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.loud-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.5);
}

/* ── UTILITÁRIOS ── */
.loud-hidden {
    display: none !important;
}

.loud-disabled {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* ── NOTIFICAÇÕES GLOBAIS ── */
.loud-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    animation: slide-in-notification 0.5s forwards, fade-out-notification 0.5s forwards 4.5s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-left: 5px solid var(--primary);
}
.loud-notification-success { border-color: #22c55e; }
.loud-notification-info { border-color: #3b82f6; }
.loud-notification-greeting { border-color: #f97316; }

@keyframes slide-in-notification {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fade-out-notification {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

/* ── CONFETES ── */
.loud-confetti {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}
.loud-confetti::before, .loud-confetti::after {
    content: 
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #f0f; /* Cor padrão, será sobrescrita */
    animation: confetti-fall 5s ease-out forwards;
    opacity: 0;
}
.loud-confetti::before { left: 20%; animation-delay: 0.5s; background-color: #0ff; }
.loud-confetti::after { left: 80%; animation-delay: 1s; background-color: #ff0; }

@keyframes confetti-fall {
    0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}
