:root {
    --bg: #05070a;
    --panel: rgba(11, 15, 24, 0.92);
    --card: rgba(16, 22, 34, 0.88);
    --card-hover: rgba(24, 34, 52, 0.96);
    --border: rgba(102, 252, 241, 0.22);
    --accent: #66fcf1;
    --accent-dim: #45a29e;
    --gold: #f7c815;
    --danger: #ff5f56;
    --success: #27c93f;
    --text: #c5c6c7;
    --text-bright: #ffffff;
    --text-dim: #7b8898;

    --rarity-consumer: #b0c3d9;
    --rarity-industrial: #5e98d9;
    --rarity-milspec: #4b69ff;
    --rarity-restricted: #8847ff;
    --rarity-classified: #d32ce6;
    --rarity-covert: #eb4b4b;
    --rarity-contraband: #e4ae39;
    --rarity-extraordinary: #ffd700;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    min-height: 100%;
    background: radial-gradient(circle at top center, #0e1624 0%, #05070a 65%);
    color: var(--text);
    font-family: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.45;
}

.hidden {
    display: none !important;
}

.app-shell {
    max-width: 1460px;
    margin: 0 auto;
    padding: 18px 18px 36px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Terminal Top Bar */
.topbar {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-link {
    color: var(--accent-dim);
    text-decoration: none;
    border: 1px solid var(--border);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    transition: 0.2s;
}

.back-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(102, 252, 241, 0.08);
}

.brand-title {
    color: var(--accent);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-sub {
    color: var(--text-dim);
    font-size: 0.72rem;
}

.topbar-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--border);
    background: rgba(4, 6, 10, 0.65);
}

.pill.fresh { border-color: rgba(39, 201, 63, 0.4); color: var(--success); }
.pill.stale { border-color: rgba(255, 95, 86, 0.55); color: var(--danger); }
.pill.gold { border-color: rgba(247, 200, 21, 0.45); color: var(--gold); }

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(102, 252, 241, 0.07);
    border: 1px solid rgba(102, 252, 241, 0.28);
}

.user-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.btn {
    border: 1px solid var(--border);
    background: rgba(16, 24, 38, 0.9);
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 7px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--accent);
    color: #05070a;
    border-color: var(--accent);
}

.btn-primary:hover:not(:disabled) {
    background: #8ffdf5;
    color: #05070a;
    box-shadow: 0 0 22px rgba(102, 252, 241, 0.42);
}

.execute-btn {
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
}

.execute-btn.is-spinning {
    background: linear-gradient(90deg, #45a29e, #66fcf1, #45a29e);
    background-size: 200% 100%;
    animation: btnPulseGrad 1.4s linear infinite;
    color: #05070a;
    opacity: 0.85;
}

.btn-gold {
    background: rgba(247, 200, 21, 0.14);
    color: var(--gold);
    border-color: rgba(247, 200, 21, 0.48);
}

.btn-gold:hover:not(:disabled) {
    background: var(--gold);
    color: #05070a;
}

.btn-danger {
    background: rgba(255, 95, 86, 0.14);
    color: var(--danger);
    border-color: rgba(255, 95, 86, 0.45);
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger);
    color: #fff;
}

/* Password Lock Screen */
.gate-wrapper {
    min-height: 76vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.gate-card {
    width: 100%;
    max-width: 440px;
    background: var(--panel);
    border: 1px solid rgba(255, 95, 86, 0.4);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.gate-title {
    color: var(--accent);
    font-size: 1.15rem;
    font-weight: 800;
}

.input {
    width: 100%;
    background: rgba(4, 6, 10, 0.85);
    border: 1px solid var(--border);
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.85rem;
    padding: 9px 12px;
    border-radius: 6px;
    outline: none;
}

.input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(102, 252, 241, 0.15);
}

.alert {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(255, 95, 86, 0.12);
    border-color: rgba(255, 95, 86, 0.45);
    color: #ff9c96;
}

.alert-info {
    background: rgba(102, 252, 241, 0.08);
    border-color: rgba(102, 252, 241, 0.35);
    color: var(--accent);
}

.alert-gold {
    background: rgba(247, 200, 21, 0.1);
    border-color: rgba(247, 200, 21, 0.4);
    color: var(--gold);
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tab-btn {
    padding: 9px 16px;
    border-radius: 7px;
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--text-dim);
    font-family: inherit;
    font-weight: 800;
    font-size: 0.8rem;
    cursor: pointer;
    transition: 0.18s;
}

.tab-btn.active {
    color: #05070a;
    background: var(--accent);
    border-color: var(--accent);
}

/* Arena 3-Column Layout */
.arena-grid {
    display: grid;
    grid-template-columns: 1.02fr 1.05fr 1.13fr;
    gap: 16px;
    align-items: start;
}

.panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid rgba(102, 252, 241, 0.14);
    padding-bottom: 10px;
}

.panel-title {
    color: var(--text-bright);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.filter-row.three {
    grid-template-columns: 1fr 1fr 1fr;
}

.shop-filter-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
}

/* Skin Cards Grid & Selection Animations */
.skins-scroll {
    max-height: 580px;
    overflow-y: auto;
    padding-right: 4px;
}

.skins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 10px;
}

.skins-grid.wide {
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
}

.skin-card {
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 3px solid var(--rarity-milspec);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.22s ease, background 0.2s ease;
    position: relative;
    will-change: transform;
}

.skin-card:hover {
    background: var(--card-hover);
    transform: translateY(-3px);
}

.skin-card.selected {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(102, 252, 241, 0.11) 0%, rgba(16, 22, 34, 0.95) 65%);
    box-shadow: 0 0 0 1px var(--accent), 0 10px 24px rgba(102, 252, 241, 0.2);
}

.skin-card.just-selected {
    animation: skinSelectPop 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.skin-card.just-deselected {
    animation: skinDeselectPulse 0.22s ease-out;
}

.skin-card--newly-won {
    border-color: var(--success);
    box-shadow: 0 0 0 1px var(--success), 0 0 26px rgba(39, 201, 63, 0.35);
    animation: newlyWonReveal 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.badge-new-won {
    position: absolute;
    top: -8px;
    right: 8px;
    background: var(--success);
    color: #05070a;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.8px;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 0 0 12px rgba(39, 201, 63, 0.55);
}

.skin-card[data-rarity="consumer"] { border-top-color: var(--rarity-consumer); }
.skin-card[data-rarity="industrial"] { border-top-color: var(--rarity-industrial); }
.skin-card[data-rarity="mil_spec"], .skin-card[data-rarity="milspec"] { border-top-color: var(--rarity-milspec); }
.skin-card[data-rarity="restricted"] { border-top-color: var(--rarity-restricted); }
.skin-card[data-rarity="classified"] { border-top-color: var(--rarity-classified); }
.skin-card[data-rarity="covert"] { border-top-color: var(--rarity-covert); }
.skin-card[data-rarity="contraband"] { border-top-color: var(--rarity-contraband); }
.skin-card[data-rarity="extraordinary"] { border-top-color: var(--rarity-extraordinary); }

.skin-thumb {
    width: 100%;
    height: 76px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
    transition: transform 0.22s ease;
}

.skin-card:hover .skin-thumb,
.skin-card.selected .skin-thumb {
    transform: scale(1.06);
}

.skin-badges {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 800;
}

.badge-ext {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    padding: 2px 5px;
    border-radius: 4px;
}

.badge-st {
    background: rgba(228, 174, 57, 0.18);
    color: #f7b731;
    padding: 2px 5px;
    border-radius: 4px;
}

.badge-sv {
    background: rgba(255, 215, 0, 0.18);
    color: #ffd700;
    padding: 2px 5px;
    border-radius: 4px;
}

.badge-phase {
    background: rgba(136, 71, 255, 0.22);
    color: #c9a7ff;
    border: 1px solid rgba(136, 71, 255, 0.45);
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 800;
}

.badge-status {
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-status.is-live {
    background: rgba(39, 201, 63, 0.16);
    color: var(--success);
    border: 1px solid rgba(39, 201, 63, 0.35);
}

.badge-status.is-stale {
    background: rgba(247, 200, 21, 0.14);
    color: var(--gold);
    border: 1px solid rgba(247, 200, 21, 0.4);
}

.badge-status.is-unavailable {
    background: rgba(255, 95, 86, 0.14);
    color: var(--danger);
    border: 1px solid rgba(255, 95, 86, 0.4);
}

.skin-meta-line {
    font-size: 0.62rem;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.skin-meta-inline {
    font-size: 0.64rem;
    color: var(--text-dim);
}

.skin-card.is-unavailable,
.skin-card.is-stale {
    opacity: 0.72;
    border-color: rgba(255, 95, 86, 0.28);
}

.skin-thumb.is-loading,
.wheel-target-thumb.is-loading,
.target-preview-img.is-loading,
.result-skin-img.is-loading {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(102,252,241,0.09) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    border-radius: 6px;
}

.skin-name {
    color: var(--text-bright);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.25;
    min-height: 2.5em;
}

.skin-price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 4px;
    margin-top: auto;
}

.skin-usd {
    color: var(--accent);
    font-weight: 800;
    font-size: 0.84rem;
}

.skin-cp {
    color: var(--gold);
    font-size: 0.72rem;
    font-weight: 700;
}

/* Selected Input Strip */
.selected-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(4, 6, 10, 0.65);
    border: 1px solid rgba(102, 252, 241, 0.18);
}

.selected-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 7px;
    border-radius: 5px;
    background: rgba(102, 252, 241, 0.1);
    border: 1px solid rgba(102, 252, 241, 0.3);
    font-size: 0.68rem;
    color: var(--text-bright);
    animation: chipPopIn 0.24s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.selected-chip img {
    width: 22px;
    height: 15px;
    object-fit: contain;
}

.selected-chip-price {
    color: var(--gold);
    font-weight: 800;
}

.value-display.is-bump {
    animation: valueBump 0.28s ease-out;
}

/* Large Circular Roulette Wheel Stage */
.wheel-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 8px 10px;
    border-radius: 12px;
    background: radial-gradient(circle at center, rgba(18, 28, 44, 0.65) 0%, rgba(5, 7, 10, 0.4) 72%);
    border: 1px solid rgba(102, 252, 241, 0.14);
    overflow: hidden;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

.wheel-stage.is-spinning {
    border-color: rgba(102, 252, 241, 0.45);
    box-shadow: inset 0 0 38px rgba(102, 252, 241, 0.12), 0 0 32px rgba(102, 252, 241, 0.14);
}

.wheel-stage.is-win {
    border-color: rgba(39, 201, 63, 0.85);
    box-shadow: inset 0 0 46px rgba(39, 201, 63, 0.24), 0 0 38px rgba(39, 201, 63, 0.35);
    animation: winStagePulse 0.9s ease-out;
}

.wheel-stage.is-loss {
    border-color: rgba(255, 95, 86, 0.82);
    box-shadow: inset 0 0 46px rgba(255, 95, 86, 0.24), 0 0 34px rgba(255, 95, 86, 0.3);
    animation: lossStageShake 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.wheel-particles-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

.wheel-ambient-glow {
    position: absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102, 252, 241, 0.16) 0%, transparent 70%);
    filter: blur(18px);
    pointer-events: none;
    z-index: 0;
    transition: background 0.35s ease, transform 0.35s ease;
}

.wheel-stage.is-spinning .wheel-ambient-glow {
    transform: scale(1.16);
    background: radial-gradient(circle, rgba(102, 252, 241, 0.26) 0%, transparent 72%);
}

.wheel-stage.is-win .wheel-ambient-glow {
    transform: scale(1.26);
    background: radial-gradient(circle, rgba(39, 201, 63, 0.38) 0%, transparent 72%);
}

.wheel-stage.is-loss .wheel-ambient-glow {
    transform: scale(1.18);
    background: radial-gradient(circle, rgba(255, 95, 86, 0.35) 0%, transparent 72%);
}

/* Rotating Orbital Pointer */
.wheel-pointer-orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    transform-origin: 50% 50%;
    will-change: transform;
}

.wheel-pointer-trail-svg,
.wheel-pointer-head-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.wheel-pointer-trail {
    filter: drop-shadow(0 0 6px rgba(102, 252, 241, 0.72));
    will-change: opacity;
}

.wheel-pointer-pin {
    position: absolute;
    inset: 0;
    transform-origin: 50% 3.44%;
    will-change: transform;
    filter: drop-shadow(0 0 8px rgba(102, 252, 241, 0.75));
}

.wheel-stage.is-spinning .wheel-pointer-pin {
    filter: drop-shadow(0 0 11px rgba(102, 252, 241, 0.92));
}

.wheel-pointer-pin.is-impact {
    animation: pointerFinalImpact 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.wheel-svg-wrap {
    position: relative;
    width: clamp(248px, 26vw, 316px);
    height: clamp(248px, 26vw, 316px);
    z-index: 2;
}

.wheel-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.wheel-rotor {
    transform-origin: 160px 160px;
}

.wheel-win-arc {
    transition: stroke-dasharray 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

.wheel-stage.is-spinning .wheel-win-arc {
    transition: none;
}

.wheel-center-readout {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    text-align: center;
    padding: 36px;
    gap: 3px;
}

.wheel-target-thumb {
    width: 78px;
    height: 48px;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.8));
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.wheel-target-thumb.is-swapping {
    animation: targetThumbPop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.chance-big {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.5px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.wheel-stage.is-win .chance-big {
    color: var(--success);
}

.wheel-stage.is-loss .chance-big {
    color: #ff8f89;
}

.chance-sub {
    font-size: 0.7rem;
    color: var(--text-dim);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Target Skin Preview Card inside Engine */
.target-preview-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(16, 22, 34, 0.85);
    border: 1px solid rgba(102, 252, 241, 0.26);
    border-left: 3px solid var(--accent);
}

.target-preview-card.is-swapping {
    animation: targetCardSwap 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.target-preview-img {
    width: 64px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.65));
}

.target-preview-meta {
    min-width: 0;
    flex: 1;
}

.target-preview-kicker {
    font-size: 0.62rem;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: 0.7px;
}

.target-preview-name {
    font-size: 0.76rem;
    color: var(--text-bright);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.target-preview-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 0.72rem;
}

/* Result Showcase Card */
.result-card {
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    animation: resultCardReveal 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.result-card.win {
    background: linear-gradient(135deg, rgba(39, 201, 63, 0.2) 0%, rgba(10, 22, 16, 0.92) 85%);
    border: 1px solid rgba(39, 201, 63, 0.75);
    box-shadow: 0 0 28px rgba(39, 201, 63, 0.22);
}

.result-card.loss {
    background: linear-gradient(135deg, rgba(255, 95, 86, 0.18) 0%, rgba(24, 11, 14, 0.92) 85%);
    border: 1px solid rgba(255, 95, 86, 0.7);
    box-shadow: 0 0 24px rgba(255, 95, 86, 0.18);
}

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

.result-badge {
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.9px;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
}

.result-card.win .result-badge {
    background: var(--success);
    color: #05070a;
}

.result-card.loss .result-badge {
    background: var(--danger);
    color: #fff;
}

.result-close-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
}

.result-close-btn:hover {
    color: var(--text-bright);
}

.result-card-body {
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-skin-img {
    width: 78px;
    height: 52px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.75));
}

.result-copy {
    min-width: 0;
    flex: 1;
}

.result-title {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--text-bright);
}

.result-sub {
    font-size: 0.74rem;
    color: var(--text);
    margin-top: 2px;
}

.result-telemetry {
    font-size: 0.68rem;
    color: var(--text-dim);
    margin-top: 4px;
}

.mode-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mode-pill {
    flex: 1 1 52px;
    padding: 6px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(4, 6, 10, 0.75);
    color: var(--text);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    text-align: center;
    transition: transform 0.14s ease, border-color 0.16s ease, background 0.16s ease;
}

.mode-pill:hover:not(:disabled) {
    border-color: var(--accent);
}

.mode-pill:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.mode-pill.active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(247, 200, 21, 0.12);
}

.target-header-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.target-header-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.target-range-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid rgba(102, 252, 241, 0.28);
    background: rgba(102, 252, 241, 0.08);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.target-group-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.target-group-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(4, 6, 10, 0.78);
    color: var(--text-dim);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.target-group-tab:hover:not(:disabled) {
    border-color: rgba(102, 252, 241, 0.5);
    color: var(--text);
}

.target-group-tab.active {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(102, 252, 241, 0.12);
    box-shadow: 0 0 12px rgba(102, 252, 241, 0.12);
}

.target-group-tab:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.target-group-count {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-dim);
}

.target-group-tab.active .target-group-count {
    background: rgba(102, 252, 241, 0.18);
    color: var(--accent);
}

.target-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 14px;
    color: var(--text-dim);
    border: 1px dashed rgba(102, 252, 241, 0.22);
    border-radius: 8px;
    background: rgba(4, 6, 10, 0.45);
    font-size: 0.8rem;
    line-height: 1.45;
}

.badge-selected-target {
    display: inline-block;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #061318;
    background: var(--accent);
}

.summary-box {
    background: rgba(4, 6, 10, 0.72);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

/* Stats & History */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    text-transform: uppercase;
}

.stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-bright);
}

.table-wrap {
    overflow-x: auto;
}

table.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

table.history-table th,
table.history-table td {
    padding: 9px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}

table.history-table th {
    color: var(--accent);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.75rem;
}

.disclaimer-footer {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.75rem;
    padding: 12px 14px;
    border-top: 1px solid rgba(102, 252, 241, 0.15);
    margin-top: 6px;
}

/* Keyframe Animations */
@keyframes skinSelectPop {
    0% { transform: scale(0.95); }
    55% { transform: scale(1.04) translateY(-2px); }
    100% { transform: scale(1); }
}

@keyframes skinDeselectPulse {
    0% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

@keyframes chipPopIn {
    0% { opacity: 0; transform: scale(0.84) translateY(4px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes valueBump {
    0% { transform: scale(1); }
    45% { transform: scale(1.09); color: var(--accent); }
    100% { transform: scale(1); }
}

@keyframes targetCardSwap {
    0% { opacity: 0.35; transform: translateX(10px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes targetThumbPop {
    0% { opacity: 0; transform: scale(0.82); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes resultCardReveal {
    0% { opacity: 0; transform: translateY(10px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes newlyWonReveal {
    0% { opacity: 0; transform: scale(0.86) translateY(12px); }
    65% { opacity: 1; transform: scale(1.03); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes winStagePulse {
    0% { transform: scale(1); }
    35% { transform: scale(1.015); }
    100% { transform: scale(1); }
}

@keyframes lossStageShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

@keyframes pointerFinalImpact {
    0% { transform: rotate(0deg); }
    30% { transform: rotate(5deg); }
    62% { transform: rotate(-2.5deg); }
    82% { transform: rotate(1deg); }
    100% { transform: rotate(0deg); }
}

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

/* Responsive Breakpoints */
@media (max-width: 1120px) {
    .arena-grid {
        grid-template-columns: 1fr;
    }
    .skins-scroll {
        max-height: 360px;
    }
    .shop-filter-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 10px 10px 28px;
    }
    .filter-row.three,
    .shop-filter-row {
        grid-template-columns: 1fr;
    }
    .target-group-tab {
        padding: 6px 4px;
        font-size: 0.66rem;
        gap: 4px;
    }
    .target-range-pill {
        white-space: normal;
    }
    .wheel-svg-wrap {
        width: 248px;
        height: 248px;
    }
    .result-card-body {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Strict Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .wheel-win-arc,
    .wheel-pointer-orbit,
    .wheel-pointer-pin,
    .wheel-pointer-trail,
    .btn,
    .skin-card,
    .wheel-ambient-glow,
    .wheel-target-thumb {
        transition: none !important;
    }
    .wheel-pointer-trail {
        opacity: 0 !important;
    }
}
