/**
 * LOUD COMPONENTS STYLE - Estilos para Cheat Sheets e Glossários
 */

/* ── CHEAT SHEET BUTTON ── */
.loud-cheatsheet-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 2px solid rgba(59, 130, 246, 0.3);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.2);
}

.loud-cheatsheet-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.4);
    border-color: rgba(59, 130, 246, 0.6);
}

.loud-cheatsheet-icon {
    display: block;
    animation: float 3s ease-in-out infinite;
}

/* ── CHEAT SHEET MODAL ── */
.loud-cheatsheet-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: 1001;
    animation: fade-in 0.3s ease;
}

.loud-cheatsheet-content {
    background: linear-gradient(135deg, #16161a, #1c1c21);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 40px;
    max-width: 700px;
    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;
}

.loud-cheatsheet-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 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-cheatsheet-close:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.4);
}

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

/* ── ABAS DO CHEAT SHEET ── */
.loud-cheatsheet-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    padding-bottom: 16px;
}

.loud-cheatsheet-tab {
    padding: 10px 16px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    color: #d4eaf7;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.loud-cheatsheet-tab:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
}

.loud-cheatsheet-tab.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(59, 130, 246, 0.2));
    border-color: rgba(59, 130, 246, 0.6);
    color: #3b82f6;
    font-weight: 700;
}

/* ── FÓRMULAS ── */
.loud-cheatsheet-formulas {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.loud-formula-item {
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.loud-formula-item:hover {
    background: rgba(59, 130, 246, 0.12);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateX(4px);
}

.loud-formula-item code {
    font-family: 'Space Mono', monospace;
    font-size: 0.9rem;
    color: #3b82f6;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex: 1;
}

.loud-formula-copy {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 6px;
    color: #3b82f6;
    font-size: 0.8rem;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: 12px;
    white-space: nowrap;
}

.loud-formula-copy:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}

/* ── GLOSSÁRIO (TOOLTIPS) ── */
.loud-glossary-term {
    position: relative;
    cursor: help;
    border-bottom: 2px dotted rgba(34, 197, 94, 0.4);
    transition: all 0.2s ease;
}

.loud-glossary-term:hover {
    border-bottom-color: rgba(34, 197, 94, 0.8);
}

.loud-glossary-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1c1c21, #16161a);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 0.8rem;
    color: #d4eaf7;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}

.loud-glossary-term:hover .loud-glossary-tooltip {
    opacity: 1;
    pointer-events: auto;
}

.loud-glossary-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(34, 197, 94, 0.3);
}

/* ── RESPONSIVIDADE ── */
@media (max-width: 768px) {
    .loud-cheatsheet-content {
        padding: 30px 20px;
    }

    .loud-cheatsheet-tabs {
        gap: 6px;
    }

    .loud-cheatsheet-tab {
        padding: 8px 12px;
        font-size: 0.75rem;
    }

    .loud-formula-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .loud-formula-copy {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        text-align: center;
    }

    .loud-glossary-tooltip {
        white-space: normal;
        max-width: 200px;
    }
}

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

.loud-cheatsheet-content::-webkit-scrollbar-track {
    background: rgba(59, 130, 246, 0.05);
    border-radius: 10px;
}

.loud-cheatsheet-content::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    transition: background 0.2s ease;
}

.loud-cheatsheet-content::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

/* ── ESTILOS COMUNS DE EXERCÍCIOS (PADRONIZADOS) ── */
.exercise-card {
    background: var(--card-bg, rgba(15,15,15,0.95));
    padding: 45px 50px;
    border-radius: 30px;
    border: 1px solid var(--border, rgba(59,130,246,0.2));
    margin-bottom: 35px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.exercise-card.show { opacity: 1; transform: translateY(0); }
.ex-tag { font-weight: 800; font-size: 0.65rem; color: var(--primary, #3b82f6); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 20px; display: block; }
.option-btn { display: block; width: 100%; padding: 18px 28px; background: #080808; border: 1px solid #222; border-radius: 15px; color: #fff; text-align: left; margin-bottom: 12px; transition: border-color 0.3s, transform 0.3s; font-size: 0.95rem; cursor: pointer; }
.option-btn:hover { border-color: var(--primary, #3b82f6); transform: translateX(8px); }
.option-btn.correct { background: rgba(34,197,94,0.15); border-color: #22c55e; color: #22c55e; font-weight: 700; }
.option-btn.wrong { background: rgba(239,68,68,0.15); border-color: #ef4444; color: #ef4444; }
.explanation { display: none; margin-top: 20px; padding: 20px 25px; background: #000; border-radius: 12px; border-left: 4px solid var(--primary, #3b82f6); font-size: 0.9rem; color: var(--text-dim, #71717a); line-height: 1.6; }
/* ── NAVEGAÇÃO ENTRE CAPÍTULOS ── */
.chapter-navigation { display: flex; justify-content: center; align-items: center; gap: 15px; padding: 50px 5% 40px; flex-wrap: wrap; }
.chapter-nav-btn { padding: 14px 28px; border-radius: 50px; font-family: var(--font-title, sans-serif); font-size: 1.1rem; letter-spacing: 1px; text-decoration: none; transition: all 0.3s ease; border: 2px solid var(--primary, #3b82f6); color: var(--primary, #3b82f6); background: transparent; }
.chapter-nav-btn:hover { background: var(--primary, #3b82f6); color: #000; transform: translateY(-3px); }
.chapter-nav-btn.disabled { opacity: 0.3; pointer-events: none; }
.chapter-nav-btn.index-btn { border-color: var(--accent, #00f2ff); color: var(--accent, #00f2ff); }
.chapter-nav-btn.index-btn:hover { background: var(--accent, #00f2ff); color: #000; }
/* ── RESPONSIVIDADE MOBILE GLOBAL ── */
@media (max-width: 768px) {
    * { cursor: auto !important; }
    #cursor-dot, #cursor-ring { display: none !important; }
    .exercise-card { padding: 25px 20px; }
    .option-btn { padding: 14px 18px; font-size: 0.9rem; }
    .chapter-navigation { gap: 10px; padding: 30px 5%; }
    .chapter-nav-btn { padding: 10px 18px; font-size: 0.95rem; }
}
