/* ===== hub-base ===== */
/* Base del hub: reset, modo embed y sincronía del dock.
   Antes era el <style> inline que abría el footer de Thinkific. */
.products-coupon { top: 4rem; z-index: 10001; }

html.mode-embed .site-header, html.mode-embed .site-footer,
html.mode-embed header.header, html.mode-embed footer.footer,
html.mode-embed .nav-container, html.mode-embed .navbar,
html.mode-embed .thinkific-nav, html.mode-embed .thinkific-footer { display: none !important; }

/* Ocultar botones flotantes sueltos si no estamos en un curso. */
body:not(.course-player-active) #frogames-news-widget .news-fab,
body:not(.course-player-active) #podcast-widget-root .podcast-fab,
body:not(.course-player-active) #frogames-rpg-widget .rpg-pill,
body:not(.course-player-active) #gh-trigger {
    display: none !important;
}

/* ===== global-dock ===== */
/**
 * Frogames Global Portal Dock Styles 🚀
 */
.fg-global-dock {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
    background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 9999px; padding: 8px 16px;
    display: flex; align-items: center; gap: 12px; z-index: 999999;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4); opacity: 0; pointer-events: none;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.fg-global-dock.visible { transform: translateX(-50%) translateY(0); opacity: 1; pointer-events: all; }
.fg-dock-brand { cursor: pointer; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #3b82f6, #2563eb); border-radius: 50%; }
.fg-dock-item { cursor: pointer; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: #94a3b8; border-radius: 50%; position: relative; background: rgba(255, 255, 255, 0.03); transition: all 0.3s ease; }
.fg-dock-item:hover { background: rgba(55, 65, 81, 0.5); color: white; transform: translateY(-4px); }
.fg-dock-divider { width: 1px; height: 24px; background: rgba(255, 255, 255, 0.1); }
.fg-dock-item::before { content: attr(data-tooltip); position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(10px); background: #0f172a; color: white; padding: 6px 12px; border-radius: 6px; font-size: 11px; opacity: 0; pointer-events: none; transition: 0.2s; border: 1px solid rgba(255,255,255,0.1); white-space: nowrap; }
.fg-dock-item:hover::before { opacity: 1; transform: translateX(-50%) translateY(0); }
/* Pulse animation on click */
.fg-dock-item.active-pulse::after { content: ''; position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.2); border-radius: 50%; transform: translate(-50%, -50%) scale(1); animation: fg-pulse 0.4s ease-out; }
@keyframes fg-pulse { 0% { transform: translate(-50%,-50%) scale(1); opacity: 0.5; } 100% { transform: translate(-50%,-50%) scale(2); opacity: 0; } }
/* Info Modal Overlay */
.fg-dock-info-modal { position: absolute; bottom: calc(100% + 20px); left: 0; width: 280px; background: #0f172a; border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; display: none; flex-direction: column; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.5); }
.fg-dock-info-modal.active { display: flex; }
.fg-dock-info-header { padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; }
.fg-dock-info-body { padding: 16px; }
.fg-dock-info-links { display: flex; flex-direction: column; gap: 8px; }
.fg-dock-info-link { display: flex; align-items: center; gap: 8px; color: white; text-decoration: none; font-size: 13px; padding: 8px; background: rgba(255,255,255,0.05); border-radius: 8px; }
.fg-dock-info-link:hover { background: rgba(255,255,255,0.1); }
.fg-dock-info-footer { padding: 8px; background: rgba(0,0,0,0.2); font-size: 10px; color: #475569; text-align: center; }

/* Notification Badge */
.fg-dock-badge {
    position: absolute; top: 2px; right: 2px; width: 10px; height: 10px;
    background: #ef4444; border: 2px solid #0f172a; border-radius: 50%;
    animation: badge-pulse 2s infinite;
}
@keyframes badge-pulse { 
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1.2); box-shadow: 0 0 0 5px rgba(239, 68, 68, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* MOBILE CLEANUP: Hide the portal dock on screens smaller than 768px (Mobile & Tablets) */
@media (max-width: 768px) {
    .fg-global-dock {
        display: none !important;
    }
}

/* ===== rpg-floater ===== */
/* Widget Styles */
#frogames-rpg-widget {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9998;
    /* Below Cookie Banner (9999) */
    font-family: 'Inter', system-ui, sans-serif;
}

/* Pill Design (Cyberpunk/Glass) */
#frogames-rpg-widget .rpg-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.85);
    /* Slate 900 */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 16px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: grab;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s, border 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    position: relative;
}

/* Hover Effects */
#frogames-rpg-widget .rpg-pill:hover {
    transform: translateY(-2px);
    background: rgba(15, 23, 42, 0.95);
    border-color: rgba(68, 156, 185, 0.5);
    /* Frogames Teal */
    box-shadow: 0 8px 30px rgba(68, 156, 185, 0.25);
}

#frogames-rpg-widget .rpg-pill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

#frogames-rpg-widget .rpg-pill:hover::before {
    left: 100%;
}

/* Icon */
#frogames-rpg-widget .rpg-icon {
    color: #f1c40f;
    /* Gold Star */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Info Text */
#frogames-rpg-widget .rpg-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 80px;
}

#frogames-rpg-widget .rpg-level {
    font-size: 11px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Mini XP Bar */
#frogames-rpg-widget .rpg-xp-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

#frogames-rpg-widget .rpg-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
    box-shadow: 0 0 8px rgba(0, 242, 254, 0.6);
}

#frogames-rpg-widget .rpg-xp-text {
    font-size: 9px;
    color: #94a3b8;
    line-height: 1;
}

/* Streak (Racha diaria) */
#frogames-rpg-widget .rpg-streak {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 800;
    color: #fb923c;
    /* Amber 400 */
    line-height: 1;
}

#frogames-rpg-widget .rpg-streak .rpg-streak-flame {
    font-size: 15px;
    filter: drop-shadow(0 0 6px rgba(251, 146, 60, 0.6));
    transform-origin: center bottom;
}

/* At-risk: llama roja pulsante (aversión a la pérdida) */
#frogames-rpg-widget .rpg-streak.is-at-risk {
    color: #ef4444;
}

#frogames-rpg-widget .rpg-streak.is-at-risk .rpg-streak-flame {
    filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.7));
    animation: streakRiskPulse 1.2s infinite ease-in-out;
}

@keyframes streakRiskPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.5));
    }

    50% {
        transform: scale(1.18);
        filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.95));
    }
}

/* Mobile Hide? */
/* Mobile Hide */
@media (max-width: 768px) {
    #frogames-rpg-widget {
        display: none !important;
    }
}

/* MODAL STYLES */
#frogames-rpg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#frogames-rpg-modal.active {
    opacity: 1;
    pointer-events: all;
}

#frogames-rpg-modal .modal-content {
    width: 90%;
    height: 85%;
    max-width: 1200px;
    background: #0f172a;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#frogames-rpg-modal.active .modal-content {
    transform: scale(1);
}

#frogames-rpg-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Modal Navigation Tabs */
.modal-nav {
    display: flex;
    gap: 8px;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#frogames-rpg-modal .nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: #94a3b8;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s;
}

#frogames-rpg-modal .nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

#frogames-rpg-modal .nav-tab.active {
    color: #f1c40f !important;
    background: rgba(241, 196, 15, 0.1) !important;
    border-color: rgba(241, 196, 15, 0.2) !important;
}

.nav-tab svg {
    opacity: 0.7;
}

.nav-tab.active svg {
    opacity: 1;
}


#frogames-rpg-modal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

#frogames-rpg-modal .close-btn:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

#frogames-rpg-modal .loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-family: 'Inter', sans-serif;
}

/* LEVEL UP CELEBRATION */
.rpg-levelup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.rpg-levelup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.rpg-levelup-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 3rem;
    border-radius: 32px;
    border: 2px solid #f1c40f;
    box-shadow: 0 0 50px rgba(241, 196, 15, 0.3);
    text-align: center;
    transform: translateY(50px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 400px;
    position: relative;
    overflow: hidden;
}

.rpg-levelup-overlay.active .rpg-levelup-card {
    transform: translateY(0) scale(1);
}

.rpg-levelup-card h2 {
    color: #f1c40f;
    font-size: 2.5rem;
    margin: 0 0 1rem 0 !important;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 800;
}

.rpg-levelup-card .lvl-number {
    font-size: 6rem;
    font-weight: 900;
    background: linear-gradient(to bottom, #f1c40f, #e67e22);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin: 1rem 0;
    filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.5));
}

.rpg-levelup-card p {
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.rpg-levelup-card .btn-celebrate {
    background: #f1c40f;
    color: #0f172a;
    border: none;
    padding: 12px 32px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.rpg-levelup-card .btn-celebrate:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(241, 196, 15, 0.4);
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

.rpg-levelup-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

/* PENDING LEVEL UP STATE */
@keyframes goldPulse {
    0% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 0px rgba(241, 196, 15, 0);
        transform: scale(1);
    }

    50% {
        box-shadow: 0 0 30px 10px rgba(241, 196, 15, 0.6), 0 0 15px 5px rgba(241, 196, 15, 0.4);
        border-color: #f1c40f;
        transform: scale(1.05);
    }

    100% {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), 0 0 0 0px rgba(241, 196, 15, 0);
        transform: scale(1);
    }
}

.rpg-pill.is-levelup-pending {
    animation: goldPulse 1.5s infinite ease-in-out !important;
    border: 2px solid #f1c40f !important;
    background: rgba(15, 23, 42, 0.95) !important;
}

.rpg-pill.is-levelup-pending .rpg-level {
    color: #f1c40f !important;
    font-weight: 800;
}

.rpg-pill.is-levelup-pending .rpg-icon {
    filter: drop-shadow(0 0 5px #f1c40f);
}

/* Achievement Toast */
.rpg-achievement-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(10, 12, 16, 0.95);
    border: 2px solid #ffcc00;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10001;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 204, 0, 0.2);
    min-width: 280px;
}

.rpg-achievement-toast.visible {
    transform: translateX(0);
}

.rpg-achievement-toast .ach-icon {
    width: 40px;
    height: 40px;
    background: #ffcc00;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: ach-icon-bounce 1s infinite;
}

.rpg-achievement-toast .ach-text {
    display: flex;
    flex-direction: column;
}

.rpg-achievement-toast .ach-title {
    font-size: 10px;
    font-weight: 800;
    color: #ffcc00;
    letter-spacing: 1px;
}

.rpg-achievement-toast .ach-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 2px 0;
}

.rpg-achievement-toast .ach-xp {
    font-size: 11px;
    font-weight: 600;
    color: #10b981;
}

@keyframes ach-icon-bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}
/* ===== notebook-widget ===== */
/* Frogames Ghost Notebook Widget 👻📓 Styles */

#fg-notebook-fab {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 60px;
    height: 60px;
    background: #449cb9;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    color: white;
}

#fg-notebook-fab:hover {
    transform: scale(1.1);
}

#fg-notebook-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    height: 100vh;
    background: rgba(30, 41, 59, 0.98);
    backdrop-filter: blur(10px);
    z-index: 99999 !important;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Inter', system-ui, sans-serif;
    color: #F8FAFC;
    box-sizing: border-box;
}

#fg-notebook-panel.open {
    right: 0 !important;
}

#fg-notebook-panel * {
    box-sizing: border-box;
}

.fg-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: rgba(0, 0, 0, 0.2);
}

.fg-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fg-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    line-height: 1.4;
}

.fg-subtitle {
    font-size: 0.8rem;
    color: #64748B;
}

.fg-close {
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0 5px;
}

.fg-notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    position: relative;
    padding-left: 30px;
}

.fg-timeline-line {
    position: absolute;
    left: 24px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 0;
}

.fg-note-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    position: relative;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.fg-note-card.active {
    border-color: #449cb9;
    background: rgba(68, 156, 185, 0.1);
    box-shadow: 0 0 15px rgba(68, 156, 185, 0.1);
    transform: translateX(5px);
}

.fg-note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #449cb9;
    margin-bottom: 6px;
}

.fg-note-dot {
    position: absolute;
    left: -25px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1E293B;
    border: 2px solid #64748B;
    z-index: 1;
    transition: all 0.3s;
}

.fg-note-card.active .fg-note-dot {
    border-color: #449cb9;
    background: #449cb9;
    transform: scale(1.2);
}

.fg-time-btn {
    background: rgba(68, 156, 185, 0.2);
    color: #449cb9;
    border: none;
    padding: 2px 8px;
    border-radius: 12px;
    cursor: pointer;
    font-family: monospace;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.fg-time-btn:hover {
    background: #449cb9;
    color: white;
}

.fg-delete {
    color: #ef4444;
    cursor: pointer;
    opacity: 0.5;
    padding: 0 5px;
}

.fg-delete:hover {
    opacity: 1;
}

.fg-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fg-tag-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.fg-tag-btn {
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.fg-tag-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-1px);
}

.fg-tag-btn.selected {
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fg-input-header {
    display: flex;
    gap: 10px;
    margin-bottom: 5px;
}

.fg-time-input {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #449cb9 !important;
    padding: 5px 10px !important;
    border-radius: 6px !important;
    font-family: monospace !important;
    width: 80px !important;
    text-align: center !important;
}

.fg-editor-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.fg-toolbar {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fg-tool-btn {
    background: none;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}

.fg-tool-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.fg-editor {
    padding: 10px;
    color: white;
    min-height: 80px;
    max-height: 30vh;
    overflow-y: auto;
    outline: none;
    line-height: 1.5;
    font-size: 0.95rem;
}

.fg-editor:focus {
    background: rgba(255, 255, 255, 0.02);
}

.fg-editor ul {
    padding-left: 20px;
    list-style-type: disc;
}

.fg-add-btn {
    width: 100%;
    padding: 10px !important;
    margin-top: 10px;
    background: #449cb9 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    text-align: center !important;
}

.fg-add-btn:hover {
    filter: brightness(1.1);
}

.fg-global-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fg-global-modal.open {
    display: flex;
    opacity: 1;
}

.fg-modal-content {
    width: 90%;
    height: 90%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.fg-modal-header {
    padding: 15px 20px;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fg-modal-title {
    font-weight: 700;
    color: #1E293B;
    font-size: 1.1rem;
}

.fg-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

@media (max-width: 600px) {
    #fg-notebook-panel {
        width: 100%;
        right: -100%;
    }

    .fg-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}

/* Hide on Mobile */
@media (max-width: 768px) {

    #fg-notebook-fab,
    #fg-notebook-panel {
        display: none !important;
    }
}
/* ===== podcast-player ===== */
/* Frogames Podcast Player Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700;900&display=swap');

:root {
    --pdc-primary: #449cb9;
    --pdc-primary-dark: #2a7a94;
    --pdc-primary-glow: rgba(68, 156, 185, 0.5);
    --pdc-bg-dark: #0f172a;
    --pdc-glass-border: rgba(68, 156, 185, 0.3);
    --pdc-text-muted: #94a3b8;
}

/* FAB (Floating Action Button) */
.podcast-fab {
    position: fixed;
    bottom: 15px;
    /* Volvemos abajo a la derecha */
    right: 15px;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--pdc-primary), var(--pdc-primary-dark));
    box-shadow:
        0 10px 25px -5px var(--pdc-primary-glow),
        inset 0 0 15px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: float-podcast 6s ease-in-out infinite;
}

.podcast-fab:hover {
    transform: scale(1.1) rotate(5deg);
}

.podcast-fab.active {
    transform: rotate(-90deg) scale(0.9);
    background: #1e293b;
    box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.5);
}

.podcast-fab i {
    color: white;
    width: 28px;
    height: 28px;
}

/* PLAYER CARD */
.podcast-player-card {
    position: fixed;
    bottom: 90px;
    /* Aparece encima del botón (15px + 75px offset) */
    right: 15px;
    width: 350px;
    max-width: 90vw;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--pdc-glass-border);
    border-radius: 20px;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.podcast-player-card.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.player-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    font-family: 'Outfit', sans-serif;
}

.player-title {
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
}

.player-title i {
    color: var(--pdc-primary);
    width: 18px;
    height: 18px;
}

.player-close {
    background: none;
    border: none;
    color: var(--pdc-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s;
}

.player-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.player-content {
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Tabs */
.player-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--pdc-text-muted);
    padding: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
}

.tab-btn i {
    width: 14px;
    height: 14px;
}

.tab-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: white;
    background: var(--pdc-primary);
    box-shadow: 0 4px 10px var(--pdc-primary-glow);
}

/* Fix for Embed Containers */
.embed-container {
    width: 100%;
    height: 352px;
    background: #000;
    display: none;
    align-items: center;
    justify-content: center;
}

.embed-container.active {
    display: flex;
}

/* ANIMATIONS */
@keyframes float-podcast {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Tooltip */
.podcast-tooltip {
    position: absolute;
    bottom: 75px;
    left: 50%;
    background: #1e293b;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 0.85rem;
    font-weight: 500;
    pointer-events: none;
    opacity: 0;
    z-index: 1000000;
    transform: translateX(-50%) translateY(10px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Outfit', sans-serif;
}

.podcast-fab:hover .podcast-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* MOBILE HIDING & OVERRIDES */
@media (max-width: 768px) {

    .podcast-fab,
    .podcast-player-card,
    #podcast-widget-root {
        display: none !important;
    }
}
/* ===== news-hub ===== */
/* News Hub Widget Styles */
#frogames-news-widget {
    position: fixed;
    bottom: 120px;
    right: 24px;
    z-index: 9997; /* Below RPG and Cookie banners */
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

#frogames-news-widget .news-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #449cb9; /* Frogames Teal */
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(68, 156, 185, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

#frogames-news-widget .news-fab:hover {
    transform: scale(1.1) rotate(5deg);
    background: #368aa5;
    box-shadow: 0 8px 25px rgba(68, 156, 185, 0.6);
}

#frogames-news-widget .news-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #080708;
    display: none; /* Shown when there's new content */
}

/* MODAL / PANEL */
#news-hub-panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-height: 600px;
    background: #080708;
    border: 1px solid rgba(68, 156, 185, 0.3);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
}

#news-hub-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.news-header {
    background: linear-gradient(135deg, #0f172a 0%, #080708 100%);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-header h2 {
    color: white;
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.news-header h2 span {
    color: #449cb9;
}

.news-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s;
}

.news-close:hover {
    color: white;
}

/* TABS SYSTEM */
.news-tabs {
    display: flex;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    gap: 5px;
}

.news-tab {
    flex: 1;
    background: none;
    border: none;
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    padding: 8px 5px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #94a3b8;
}

.news-tab.active {
    background: rgba(68, 156, 185, 0.15);
    color: #449cb9;
}

.news-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: #449cb9 rgba(255, 255, 255, 0.05);
}

.news-content::-webkit-scrollbar {
    width: 6px;
}

.news-content::-webkit-scrollbar-thumb {
    background: #449cb9;
    border-radius: 10px;
}

/* CARDS */
.news-item {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.news-item:hover {
    background: rgba(68, 156, 185, 0.1);
    border-color: rgba(68, 156, 185, 0.3);
    transform: translateY(-2px);
}

.news-item-thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 10px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.news-item-type {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.news-item-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.news-item-title {
    color: #f1f5f9;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #94a3b8;
}

.news-item-source {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-footer {
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.news-footer a {
    color: #449cb9;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.news-footer a:hover {
    text-decoration: underline;
}

/* LOADING SHIMMER */
.news-skeleton {
    height: 120px;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 14px;
    margin-bottom: 15px;
}

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

@media (max-width: 480px) {
    #news-hub-panel {
        width: calc(100vw - 48px);
        right: 24px;
        bottom: 90px;
    }
}

/* ===== community-floater ===== */
/* Community Floater Widget Styles */
:root {
    --community-primary: #449cb9;
    --community-bg: rgba(20, 20, 30, 0.9);
    --community-text: #ffffff;
    --community-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    --community-radius: 999px;
    --community-anim: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.community-floater-root {
    position: fixed;
    bottom: 90px;
    /* Above the RPG widget if present */
    right: 25px;
    z-index: 10000;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    pointer-events: none;
}

.community-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--community-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--community-radius);
    color: var(--community-text);
    text-decoration: none;
    box-shadow: var(--community-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--community-anim);
    pointer-events: auto;
    cursor: pointer;
    overflow: hidden;
    max-width: 50px;
    /* Initially collapsed to icon */
    white-space: nowrap;
}

.community-pill:hover {
    max-width: 300px;
    /* Expand on hover */
    border-color: var(--community-primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 156, 185, 0.4);
}

.community-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    color: var(--community-primary);
}

.community-info {
    display: flex;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.2s ease-in;
}

.community-pill:hover .community-info {
    opacity: 1;
}

.community-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
}

.community-name {
    font-size: 14px;
    font-weight: 600;
}

/* Tooltip appearance */
.community-pill::after {
    content: "Ir a la Comunidad";
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    background: var(--community-bg);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    transition: var(--community-anim);
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.community-pill:hover::after {
    opacity: 0;
    /* Hide tooltip when expanded */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .community-floater-root {
        bottom: 20px;
        left: 20px;
        right: auto;
    }
}
/* ===== gamification-hub ===== */
/* Frogames Gamification Hub Styles */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700;900&display=swap');

:root {
    /* Frogames Brand Colors */
    --primary: #449cb9;
    --primary-dark: #2a7a94;
    --primary-glow: rgba(68, 156, 185, 0.5);

    --secondary: #2dd4bf;
    --accent: #f472b6;
    --warning: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;

    --bg-dark: #0f172a;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(68, 156, 185, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

/* =========================================
   WIDGET STYLES
   ========================================= */

/* Reset Box Sizing inside the widget to prevent overflow */
.gh-modal-overlay * {
    box-sizing: border-box;
}

/* FAB (Floating Action Button) */
.curiosity-fab {
    position: fixed !important;
    top: 120px !important;
    right: 60px !important;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--primary), var(--primary-dark));
    box-shadow:
        0 10px 25px -5px var(--primary-glow),
        inset 0 0 15px rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: float 6s ease-in-out infinite;
}

.curiosity-fab:hover {
    transform: scale(1.15) rotate(-5deg);
}

.curiosity-fab svg {
    color: white;
    width: 32px;
    height: 32px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    transition: transform 0.5s ease;
}

.curiosity-fab:hover svg {
    transform: rotate(360deg);
}

/* MODAL OVERLAY */
.gh-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* MODAL OVERLAY */
.gh-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.gh-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* MAIN CARD */
.gh-card {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 90%;
    max-width: 850px;
    /* Wider for menu */
    min-height: 450px;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gh-modal-overlay.open .gh-card {
    transform: scale(1) translateY(0);
}

/* HEADER */
.gh-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.2);
    position: relative;
    /* For absolute centering of title */
}

.gh-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.gh-title svg {
    color: var(--primary);
}

.gh-close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    margin-left: auto;
    /* Push to right if needed */
    z-index: 2;
}

.btn-back {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    /* margin-right: auto; Removed auto margin to not conflict with centering */
    z-index: 2;
}

.gh-close-btn:hover,
.btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* CONTENT AREA */
.gh-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    /* For transitions */
    width: 100%;
}

.gh-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    box-sizing: border-box;
    /* Ensure padding doesn't overflow width */
}

.gh-view.active {
    opacity: 1;
    pointer-events: all;
    transform: translateX(0);
    position: relative;
    /* Let it flow */
}

/* === MENU VIEW === */
.gh-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 800px;
}

.gh-menu-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.gh-menu-item:hover {
    transform: translateY(-5px) scale(1.05);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3);
}

.gh-menu-item h3 {
    font-size: 1.1rem;
    margin: 0;
    color: white;
    font-weight: 600;
}

.gh-menu-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

/* === BUG HUNTER STYLES === */
.bug-game-container {
    width: 100%;
    height: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bug {
    position: absolute;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: transform 0.1s;
    animation: jitter 0.5s infinite;
}

.bug:active {
    transform: scale(0.8);
}

@keyframes jitter {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(2px, 2px) rotate(5deg);
    }

    50% {
        transform: translate(0, 0) rotate(0deg);
    }

    75% {
        transform: translate(-2px, 2px) rotate(-5deg);
    }

    100% {
        transform: translate(0, 0) rotate(0deg);
    }
}

/* === MEMORY MATCH STYLES === */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
}

.memory-card {
    aspect-ratio: 1;
    perspective: 1000px;
    -webkit-perspective: 1000px;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.memory-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

.memory-card.flipped .memory-card-inner {
    transform: rotateY(180deg);
}

.memory-card.matched .memory-card-inner {
    opacity: 0.5;
}

.memory-front,
.memory-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.memory-front {
    background: linear-gradient(135deg, var(--bg-dark), #1e293b);
    color: var(--primary);
    z-index: 2;
    transform: rotateY(0deg);
}

.memory-back {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: rotateY(180deg);
    z-index: 1;
}

/* === COOKIE VIEW === */
.cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.cookie-icon {
    color: white;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2rem;
    background: rgba(68, 156, 185, 0.15);
    color: var(--primary);
    border: 1px solid rgba(68, 156, 185, 0.3);
}

.score-badge {
    background: rgba(68, 156, 185, 0.15);
    color: var(--primary);
    border: 1px solid rgba(68, 156, 185, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
}

.fact-text {
    font-size: 1.6rem;
    font-weight: 300;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    color: #f8fafc !important;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

/* Fixed mismatched class name from .btn-control to .btn-nav */
.btn-nav {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-nav:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.click-hint {
    position: absolute;
    bottom: 1rem;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.trivial-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    overflow-y: auto;
    /* Allow scrolling if text is too long */
    padding-bottom: 2rem;
}

.trivial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 0.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
}

.progress-text {
    margin-left: auto;
}

.trivial-timer-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    flex-shrink: 0;
    /* Prevent shrinking */
}

.trivial-timer-fill {
    height: 100%;
    background: var(--warning);
    width: 100%;
    transition: width 1s linear;
}

.trivial-question {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
    color: white;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
}

.trivial-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
}

.btn-option {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 12px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.btn-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.btn-option.correct {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: var(--success);
}

.btn-option.wrong {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: var(--danger);
    opacity: 0.6;
}

.trivial-start,
.trivial-end {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1.5rem;
    color: white;
    /* Ensure text is visible */
}

.trivial-start h3,
.trivial-end h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: white;
}

/* === CARDS VIEW === */
.cards-container {
    width: 100%;
    height: 100%;
    perspective: 1000px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Context for controls */
}

.flashcard {
    width: 100%;
    max-width: 400px;
    height: 250px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    cursor: pointer;
    margin-bottom: 2rem;
    z-index: 10;
    /* Ensure card is above background but allow controls */
}

.flashcard.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-front {
    background: linear-gradient(135deg, #1e293b, #0f172a);
}

.card-back {
    background: linear-gradient(135deg, var(--primary-dark), #1e293b);
    transform: rotateY(180deg);
}

.card-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.card-text {
    font-size: 1.3rem;
    color: white;
    line-height: 1.5;
    overflow-y: auto;
    /* Scroll if text is huge */
    max-height: 100%;
    scrollbar-width: thin;
}

.card-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 20;
    /* Higher than card to ensure clickability */
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    /* Slight contrast */
    border-radius: 50px;
}



.score-big {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
}

/* === GENERAL UTILS === */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
}

.btn-primary:active {
    transform: scale(0.95);
}

/* === CODE BREAKER STYLES === */
.breaker-board {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 350px;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    /* Space for controls */
    max-height: 280px;
    overflow-y: auto;
}

.breaker-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.breaker-row.active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.breaker-inputs {
    display: flex;
    gap: 0.5rem;
}

.breaker-slot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.1s;
}

.breaker-row.active .breaker-slot:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

.breaker-feedback {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin-left: auto;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.feedback-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.feedback-dot.correct {
    background: var(--success);
    box-shadow: 0 0 5px var(--success);
}

.feedback-dot.close {
    background: var(--warning);
    box-shadow: 0 0 5px var(--warning);
}

.breaker-controls {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    width: 100%;
    padding-top: 1rem;
}

.color-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-btn:hover {
    transform: scale(1.15);
}

.color-btn.selected {
    border-color: white;
    transform: scale(1.1);
}

/* Colors */
.cb-red {
    background: #ef4444;
}

.cb-blue {
    background: #3b82f6;
}

.cb-green {
    background: #10b981;
}

.cb-yellow {
    background: #f59e0b;
}

.cb-purple {
    background: #8b5cf6;
}

.cb-cyan {
    background: #06b6d4;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(calc(-50% - 10px));
    }
}

/* Hide on Mobile - UI not optimized yet */
@media (max-width: 768px) {

    .curiosity-fab,
    #gh-trigger,
    .gh-modal-overlay,
    #gh-modal {
        display: none !important;
    }
}
/* ===== mission-control ===== */
:root {
    --fg-blue: #449cb9;
    --fg-glass: rgba(15, 23, 42, 0.85);
    --fg-border: rgba(255, 255, 255, 0.1);
}

/* MISSION CONTROL DOCK */
.fg-mission-control-dock {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: var(--fg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--fg-border);
    border-radius: 100px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s;
    opacity: 0;
    pointer-events: none;
    cursor: grab;
    user-select: none;
}

.fg-mission-control-dock.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Dock Brand */
.fg-dock-brand {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--fg-blue) 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(68, 156, 185, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.fg-dock-brand:hover {
    transform: rotate(15deg) scale(1.1);
}

.fg-dock-brand svg {
    width: 20px;
    height: 20px;
}

/* Dock Divider */
.fg-dock-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

/* Dock Items */
.fg-dock-item {
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fg-dock-item i {
    width: 20px;
    height: 20px;
}

.fg-dock-item:hover {
    background: var(--fg-blue);
    transform: translateY(-6px) scale(1.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 15px rgba(68, 156, 185, 0.3);
}

/* Tooltip */
.fg-dock-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    padding: 6px 12px;
    background: #0f172a;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-bottom: 12px;
    pointer-events: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fg-dock-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Active State */
.fg-dock-item.active-pulse {
    animation: fg-pulse 0.4s ease-out;
}

@keyframes fg-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* HIDE ORIGINAL FABS ACROSS PORTAL WHEN DOCK IS ACTIVE */
.fg-mission-control-active #fg-notebook-fab,
.fg-mission-control-active #fg-ai-fab,
.fg-mission-control-active #fg-ai-fab-transcript,
.fg-mission-control-active #frogames-community-floater,
.fg-mission-control-active #frogames-rpg-widget,
.fg-mission-control-active #podcast-trigger,
.fg-mission-control-active #frogames-news-widget .news-fab {
    display: none !important;
}

/* Ensure children modals Still Work */
.fg-mission-control-active #frogames-news-widget {
    display: block !important;
}

/* INFO MODAL */
.fg-dock-info-modal {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 320px;
    background: var(--fg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--fg-border);
    border-radius: 20px;
    padding: 20px;
    color: white;
    z-index: 100000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fg-dock-info-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.fg-dock-info-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.fg-dock-info-header h4 {
    margin: 0;
    font-size: 16px;
    background: linear-gradient(to right, #fff, var(--fg-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.fg-dock-info-body p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.fg-dock-info-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fg-dock-info-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.fg-dock-info-link:hover {
    background: rgba(68, 156, 185, 0.1);
    color: var(--fg-blue);
    border-color: rgba(68, 156, 185, 0.3);
}

.fg-dock-info-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 10px;
    color: #64748b;
    text-align: center;
}

/* MOBILE CLEANUP: Hide the course dock on screens smaller than 768px (Mobile & Tablets) */
@media (max-width: 768px) {
    .fg-mission-control-dock {
        display: none !important;
    }
}
/* ===== frogcards ===== */
#fcfab{position:fixed;left:20px;bottom:20px;z-index:2147483000;box-sizing:border-box;display:flex;
  align-items:center;gap:10px;max-width:230px;padding:12px 16px;text-decoration:none;border-radius:16px;
  background:linear-gradient(160deg,#12333f,#0a141a);border:1px solid #2f7f97;color:#eafaff;
  font-family:Inter,-apple-system,system-ui,sans-serif;
  box-shadow:0 8px 26px rgba(0,0,0,.5),0 0 18px rgba(82,181,214,.35);cursor:pointer;
  transition:transform .18s ease,box-shadow .18s ease;
  animation:fcfab-in .5s cubic-bezier(.2,.9,.3,1.1) .9s backwards,fcfab-glow 2.8s ease-in-out 1.4s infinite;}
#fcfab:hover{transform:translateY(-4px) scale(1.04);box-shadow:0 14px 34px rgba(0,0,0,.55),0 0 30px rgba(82,181,214,.65);}
#fcfab .fcfab-icon{font-size:26px;line-height:1;flex:none;filter:drop-shadow(0 2px 4px #000);}
#fcfab .fcfab-text{display:flex;flex-direction:column;line-height:1.2;min-width:0;}
#fcfab .fcfab-text b{font-size:15px;font-weight:800;color:#7fd6ee;}
#fcfab .fcfab-text small{font-size:12px;color:#9fd0e0;font-weight:600;}
#fcfab .fcfab-badge{position:absolute;top:-9px;right:12px;background:linear-gradient(180deg,#ffd66b,#f0a93c);
  color:#3a2600;font-size:10px;font-weight:900;letter-spacing:.5px;padding:2px 8px;border-radius:999px;
  box-shadow:0 2px 8px rgba(240,169,60,.5);}
#fcfab .fcfab-close{position:absolute;top:-9px;left:-9px;width:22px;height:22px;border-radius:50%;
  background:#22323b;color:#9fb4bd;font-size:15px;line-height:22px;text-align:center;opacity:0;transition:opacity .15s;}
#fcfab:hover .fcfab-close{opacity:1;}
@keyframes fcfab-in{from{opacity:0;transform:translateY(28px) scale(.92);}to{opacity:1;transform:none;}}
@keyframes fcfab-glow{0%,100%{box-shadow:0 8px 26px rgba(0,0,0,.5),0 0 16px rgba(82,181,214,.3);}
  50%{box-shadow:0 8px 26px rgba(0,0,0,.5),0 0 26px rgba(82,181,214,.65);}}
/* Movil: burbuja solo-icono, elevada sobre la barra de compra de Thinkific (no tapa el CTA).
   La x se muestra siempre (en tactil no hay :hover para revelarla). */
@media(max-width:600px){
  #fcfab{left:14px;bottom:calc(78px + env(safe-area-inset-bottom,0px));width:56px;height:56px;
    max-width:none;padding:0;gap:0;justify-content:center;border-radius:50%;}
  #fcfab .fcfab-text,#fcfab .fcfab-badge{display:none;}
  #fcfab .fcfab-icon{font-size:22px;}
  #fcfab .fcfab-close{opacity:1;top:-7px;left:-7px;}
}
@media(prefers-reduced-motion:reduce){#fcfab{animation:fcfab-in .4s backwards;}}

/* ===== language-buddy ===== */
/**
 * Frogames Language Buddy Widget — estilos
 *
 * El widget de ElevenLabs se ancla por defecto abajo a la DERECHA, donde Frogames
 * ya tiene el dock y los botones flotantes (comunidad, podcast, RPG, news...).
 * Lo movemos abajo a la IZQUIERDA para que no se solapen.
 */

/* Compañero anclado abajo a la DERECHA: dentro del reproductor de curso esa zona
   está libre (el FAB de FrogCards ocupa la izquierda). */
elevenlabs-convai.fg-language-buddy {
    position: fixed !important;
    right: 40px !important;
    left: auto !important;
    bottom: 32px !important;
    z-index: 9998; /* por debajo de los modales de Frogames, por encima del contenido */
}

/* El widget se pinta en shadow DOM y su contenedor interno puede traer su propio
   anclaje. Empujamos también desde dentro por si el anclaje del host no basta. */
elevenlabs-convai.fg-language-buddy::part(root),
elevenlabs-convai.fg-language-buddy::part(container) {
    margin-right: 20px !important;
    margin-bottom: 12px !important;
}

/* En móvil: menos margen lateral, pero elevado sobre la barra del reproductor */
@media (max-width: 768px) {
    elevenlabs-convai.fg-language-buddy {
        right: 16px !important;
        bottom: 90px !important;
    }
}

/* Fuera del reproductor de cursos no debe verse nunca (cinturón y tirantes:
   el JS ya no lo inyecta, pero por si acaso). */
body:not(.course-player-active) elevenlabs-convai.fg-language-buddy {
    display: none !important;
}

/* ===== materia ===== */
#mat-root { position: fixed; z-index: 9998; }

.mat-fab {
    position: fixed; right: 24px; bottom: 160px;
    width: 56px; height: 56px; border-radius: 50%;
    background: linear-gradient(135deg, #0f766e, #14b8a6);
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
}

.mat-overlay {
    position: fixed; inset: 0; background: rgba(2,6,23,.75);
    display: none; align-items: center; justify-content: center; padding: 1rem;
}
.mat-overlay.open { display: flex; }

.mat-card {
    background: #0f172a; color: #e2e8f0; border-radius: 16px;
    width: min(760px, 100%); max-height: 86vh; overflow-y: auto; padding: 1.5rem;
    border: 1px solid #1e293b;
}

.mat-slots { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1rem 0 1.5rem; }

.mat-slot {
    width: 92px; height: 92px; border-radius: 12px;
    border: 2px dashed #334155; background: #111c33;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-size: .72rem; text-align: center; cursor: pointer; padding: .25rem;
}
.mat-slot.filled { border-style: solid; border-color: #14b8a6; }
.mat-slot.linked { border-color: #3b82f6; }
/* El hueco bloqueado lleva texto ("Hueco 6 · Nivel 8"), no solo un candado:
   la opacidad atenúa sin volverlo ilegible. */
.mat-slot.locked { opacity: .65; cursor: not-allowed; }

.mat-pair { display: flex; gap: .25rem; padding: .25rem; border: 1px solid #1e40af; border-radius: 14px; }

.mat-collection { display: flex; flex-wrap: wrap; gap: .5rem; }

.mat-orb {
    padding: .4rem .7rem; border-radius: 999px; font-size: .78rem;
    background: #1e293b; border: 1px solid #334155; cursor: pointer;
}
.mat-orb[data-tipo="tecnica"]     { border-color: #22c55e; }
.mat-orb[data-tipo="metodologia"] { border-color: #3b82f6; }
.mat-orb[data-tipo="habito"]      { border-color: #a855f7; }
.mat-orb[data-tipo="herramienta"] { border-color: #eab308; }
.mat-orb[data-tipo="proyecto"]    { border-color: #ef4444; }
.mat-orb.equipped { opacity: .4; }

.mat-error { color: #fca5a5; font-size: .8rem; margin-top: .75rem; min-height: 1.2em; }

.mat-intro { color: #cbd5e1; font-size: .82rem; margin: .35rem 0 0; }

.mat-leyenda { display: flex; flex-wrap: wrap; gap: .4rem; margin: .9rem 0 .2rem; }
.mat-ley { font-size: .72rem; padding: .25rem .55rem; border-radius: 999px;
    background: #111c33; border: 1px solid #334155; color: #cbd5e1; }
.mat-ley[data-tipo="tecnica"]     { border-color: #22c55e; }
.mat-ley[data-tipo="metodologia"] { border-color: #3b82f6; }
.mat-ley[data-tipo="habito"]      { border-color: #a855f7; }
.mat-ley[data-tipo="herramienta"] { border-color: #eab308; }
.mat-ley[data-tipo="proyecto"]    { border-color: #ef4444; }

.mat-ficha:empty { display: none; }
.mat-ficha { background: #111c33; border: 1px solid #334155; border-radius: 12px;
    padding: .7rem .9rem; margin-bottom: 1rem; }
.mat-ficha-cab { font-size: .9rem; font-weight: 500; margin-bottom: .35rem; }
.mat-regla { font-size: .78rem; color: #cbd5e1; margin: .15rem 0; }
.mat-regla.cumplida { color: #14b8a6; }
.mat-nota { font-size: .78rem; color: #94a3b8; margin: .15rem 0; font-style: italic; }

.mat-slot.locked { font-size: .68rem; }
.mat-slot.linked { position: relative; }
.mat-slot.linked::after { content: ''; position: absolute; right: -.78rem; top: 50%;
    width: .75rem; height: 2px; background: #3b82f6; }
/* El conector se pinta solo en el hueco IZQUIERDO de cada par. Depende de que
   PARES (gamification-backend/src/utils/loadout.js) sean pares [impar, par]
   consecutivos — hoy [[1,2],[5,6]]. Si eso cambia, este selector falla en
   silencio. Conocido y diferido: si los huecos envuelven a 5 por fila, el
   conector del hueco 5 queda colgando al final de la fila. */
.mat-slot.linked:nth-of-type(even)::after { display: none; }
