/* style.css */

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 10px; }

/* Sleek HUD Card */
.hud-card {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 320px;
    max-height: 480px;
    background: rgba(23, 23, 23, 0.7); /* Tailwind neutral-900 with opacity */
    backdrop-blur: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); /* Deep subtle shadow, no glow */
}

.hud-card.collapsed {
    transform: translateY(calc(100% - 48px));
}

.hud-header {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hud-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    margin: 16px 20px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hud-tab {
    flex: 1;
    padding: 6px;
    text-align: center;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    color: #737373; /* neutral-500 */
}

.hud-tab.active {
    background: #262626; /* neutral-800 */
    color: #e5e5e5; /* neutral-200 */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hud-content {
    padding: 0 20px 20px 20px;
    overflow-y: auto;
    flex: 1;
}

/* iOS style toggles */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
}

.switch {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.switch.small {
    width: 28px;
    height: 16px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #262626; /* neutral-800 */
    transition: .3s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.switch.small .slider:before {
    height: 12px;
    width: 12px;
}

input:checked + .slider {
    background-color: #3b82f6; /* brand-500 */
}

input:checked + .slider:before {
    transform: translateX(14px);
}
.switch.small input:checked + .slider:before {
    transform: translateX(12px);
}

/* Stat Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 9px;
    text-transform: uppercase;
    color: #737373; /* neutral-500 */
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.stat-val {
    font-size: 13px;
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #d4d4d4; /* neutral-300 */
}

.stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    color: #737373;
}

.stat-row span:last-child {
    font-family: ui-monospace, SFMono-Regular, monospace;
    color: #a3a3a3;
}

/* Sparkline Bars */
.spark-bar {
    flex: 1;
    background: #3b82f6; /* brand-500 */
    border-radius: 2px 2px 0 0;
    transition: height 0.2s ease-out;
    opacity: 0.8;
}

/* Launch Rocket */
@keyframes rocket-launch {
    0% { transform: translateY(0) scale(0.5); opacity: 1; }
    100% { transform: translateY(calc(-1 * var(--target-y))) scale(1); opacity: 1; }
}

.rocket {
    position: absolute;
    bottom: -50px;
    width: 4px;
    height: 40px;
    background: linear-gradient(to top, var(--brand-color, #3b82f6), transparent);
    border-radius: 4px;
    z-index: 20;
    animation: rocket-launch var(--duration, 1s) ease-out forwards;
}

/* Emoji Particle Explosion */
.emoji-particle {
    position: absolute;
    pointer-events: none;
    user-select: none;
    font-size: 24px;
    z-index: 30;
    transition: transform var(--p-duration, 1.5s) cubic-bezier(0.1, 0.8, 0.3, 1), 
                opacity var(--p-duration, 1.5s) ease-out;
    opacity: 1;
    will-change: transform, opacity;
}

.emoji-particle img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 4px;
}
