/* Bottom-right collapsible stats panel */

.stats-panel {
    position: fixed;
    bottom: 22px;
    right: 0;
    z-index: 999;
    display: flex;
    align-items: center;
    transition: right 300ms ease;
}

.stats-panel.collapsed {
    right: -170px;
}

.stats-toggle {
    background: var(--Eclipse);
    border: 1px ridge var(--Penumbra);
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 12px 8px;
    cursor: var(--cursor-pointer);
    color: var(--Moonlight);
    font-size: 18px;
    box-shadow: -2px 2px 4px rgba(0,0,0,0.4);
    transition: background-color 180ms ease, color 180ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    width: 32px;
}

.stats-toggle:hover {
    background: rgba(255,255,255,0.08);
    color: var(--LinkLight);
}

.stats-toggle .arrow {
    display: block;
    transition: transform 300ms ease;
}

.stats-panel.collapsed .arrow {
    transform: rotate(180deg);
}

.stats-content {
    background: var(--Eclipse);
    border: 1px ridge var(--Penumbra);
    border-right: none;
    padding: 12px 14px;
    box-shadow: -3px 3px 6px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 140px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-family: 'Kulture';
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--BabyPur);
    opacity: 0.8;
}

.stat-value {
    font-family: 'SourceCode', 'FairFax', monospace;
    font-size: 16px;
    color: var(--LinkLight);
    font-weight: bold;
}

/* Mobile: make panel smaller and adjust position */
@media (max-width: 700px) {
    .stats-panel {
        bottom: 10px;
    }

    .stats-panel.collapsed {
        right: -160px;
    }

    .stats-content {
        min-width: 160px;
        padding: 12px 14px;
    }

    .stat-label {
        font-size: 10px;
    }

    .stat-value {
        font-size: 14px;
    }
}
