/* ===== TOP HUD - Crime Syndicate Command Center ===== */
#top-hud {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top));
    background:
        linear-gradient(180deg,
            rgba(12, 10, 18, 0.98) 0%,
            rgba(12, 10, 18, 0.85) 60%,
            transparent 100%
        );
    border-bottom: 1px solid rgba(139, 92, 246, 0.15);
}

/* Scanline effect overlay */
#top-hud::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(139, 92, 246, 0.02) 2px,
        rgba(139, 92, 246, 0.02) 4px
    );
    pointer-events: none;
}

/* Corner accents */
#top-hud::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--violet) 30%,
        var(--violet) 70%,
        transparent 100%
    );
    opacity: 0.6;
    filter: blur(1px);
}

/* ===== RESPECT BADGE - Square Progress Icon ===== */
#respect-badge {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#respect-badge:hover {
    transform: scale(1.08);
}

#respect-badge.flash {
    transform: scale(1.15);
}

#respect-badge.level-up {
    animation: levelUpPulse 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes levelUpPulse {
    0% { transform: scale(1); filter: brightness(1); }
    20% { transform: scale(1.3); filter: brightness(1.5); }
    40% { transform: scale(1.15); filter: brightness(1.2); }
    100% { transform: scale(1); filter: brightness(1); }
}

.respect-square {
    position: relative;
    width: 100%;
    height: 100%;
}

.square-progress {
    position: absolute;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

.square-bg {
    fill: none;
    stroke: var(--steel);
    stroke-width: 3;
}

.square-fill {
    fill: none;
    stroke: url(#violet-gradient);
    stroke-width: 3;
    stroke-linecap: square;
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.8));
}

/* Gradient definition for square progress */
#top-hud .square-progress {
    overflow: visible;
}

.square-fill {
    stroke: #a855f7;
}

.respect-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background:
        linear-gradient(145deg, #1a1a24, #12121a);
    border: 2px solid rgba(139, 92, 246, 0.4);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 -2px 4px rgba(0, 0, 0, 0.4),
        0 4px 16px rgba(0, 0, 0, 0.6),
        0 0 20px rgba(139, 92, 246, 0.15);
}

.respect-label {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.5rem;
    font-weight: 600;
    color: #a855f7;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.9;
}

.respect-level {
    font-family: 'Oswald', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-bright);
    line-height: 1;
    text-shadow:
        0 0 10px rgba(139, 92, 246, 0.6),
        0 2px 4px rgba(0, 0, 0, 0.5);
}

.respect-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
}

/* ===== CURRENCY STRIP - Embedded Crime Style ===== */
#currency-strip {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 320px;
    height: 44px;
    margin: 0 12px;
    position: relative;
    background:
        linear-gradient(180deg,
            rgba(20, 18, 28, 0.95) 0%,
            rgba(14, 12, 20, 0.98) 100%
        );
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 4px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.03),
        inset 0 -1px 2px rgba(0, 0, 0, 0.3),
        0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Metal texture overlay */
#currency-strip::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 1px,
            rgba(255, 255, 255, 0.01) 1px,
            rgba(255, 255, 255, 0.01) 2px
        );
    pointer-events: none;
}

.strip-edge {
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg,
        rgba(139, 92, 246, 0.3) 0%,
        rgba(139, 92, 246, 0.1) 50%,
        rgba(139, 92, 246, 0.3) 100%
    );
    flex-shrink: 0;
}

.strip-edge.left {
    border-right: 1px solid rgba(139, 92, 246, 0.15);
}

.strip-edge.right {
    border-left: 1px solid rgba(139, 92, 246, 0.15);
}

.strip-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(139, 92, 246, 0.4) 20%,
        rgba(139, 92, 246, 0.4) 80%,
        transparent 100%
    );
    flex-shrink: 0;
}

.currency-slot {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 12px;
    position: relative;
    transition: background 0.2s ease;
}

.currency-slot:hover {
    background: rgba(139, 92, 246, 0.05);
}

.slot-accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cash-slot .slot-accent {
    background: linear-gradient(90deg, transparent, #22c55e, transparent);
}

.cigs-slot .slot-accent {
    background: linear-gradient(90deg, transparent, #f97316, transparent);
}

.currency-slot.flash .slot-accent {
    opacity: 1;
}

.currency-slot.flash {
    animation: slotFlash 0.3s ease;
}

@keyframes slotFlash {
    0% { background: rgba(255, 255, 255, 0); }
    50% { background: rgba(255, 255, 255, 0.05); }
    100% { background: rgba(255, 255, 255, 0); }
}

.slot-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cash-slot .slot-icon {
    color: #22c55e;
    filter: drop-shadow(0 0 4px rgba(34, 197, 94, 0.5));
}

.cigs-slot .slot-icon {
    color: #f97316;
    filter: drop-shadow(0 0 4px rgba(249, 115, 22, 0.5));
}

.slot-icon svg {
    width: 100%;
    height: 100%;
}

.slot-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    min-width: 60px;
    text-align: right;
    letter-spacing: -0.02em;
}

.cash-slot .slot-value {
    color: #4ade80;
    text-shadow: 0 0 12px rgba(34, 197, 94, 0.4);
}

.cigs-slot .slot-value {
    color: #fb923c;
    text-shadow: 0 0 12px rgba(249, 115, 22, 0.4);
}

/* ===== LEGACY CURRENCY DISPLAY (hidden, for compatibility) ===== */
#currency-display {
    display: none;
}

/* ===== CHAMPION PROGRESS - Heat Level ===== */
#champion-progress {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

#champion-progress.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.champion-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.champion-ring-bg {
    fill: none;
    stroke: var(--steel);
    stroke-width: 4;
}

.champion-ring-progress {
    fill: none;
    stroke: var(--azure);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    transition: stroke-dashoffset 0.3s ease;
    filter: drop-shadow(0 0 6px rgba(59, 130, 246, 0.5));
}

#champion-progress.champion-active .champion-ring-progress {
    stroke: var(--crimson);
    filter: drop-shadow(0 0 8px var(--crimson-glow));
}

.champion-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: linear-gradient(145deg, #1a1a24, #12121a);
    border-radius: 50%;
    border: 2px solid var(--steel);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        inset 0 -2px 4px rgba(0, 0, 0, 0.3),
        0 4px 12px var(--shadow-heavy);
}

#champion-progress.champion-active .champion-center {
    border-color: rgba(220, 38, 38, 0.4);
}

.champion-icon {
    font-size: 0.9rem;
    line-height: 1;
}

.champion-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.55rem;
    font-weight: 600;
    color: var(--azure);
}

#champion-progress.champion-active .champion-value {
    color: var(--crimson);
}

.champion-sprite {
    display: none;
}

#champion-progress.champion-active .champion-sprite {
    display: block;
}

#champion-progress.champion-active .champion-icon {
    display: none;
}

#champion-progress.champion-active.drop-target {
    transform: scale(1.15);
    filter: drop-shadow(0 0 12px var(--crimson));
}

#champion-progress.champion-active.drop-target .champion-ring-progress {
    stroke: var(--gold);
}

/* ===== HUD ICON BUTTON - Settings, etc. ===== */
.hud-icon-btn {
    width: 36px;
    height: 36px;
    background: rgba(20, 18, 28, 0.8);
    border: 1px solid var(--steel);
    border-radius: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.hud-icon-btn:hover {
    background: var(--slate);
    border-color: var(--violet-dim);
    color: var(--violet-bright);
}

.hud-icon-btn svg {
    width: 18px;
    height: 18px;
}

