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

body {
    background: #000;
    color: #fff;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow: hidden;
}

canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

/* Homepage */
#homepage {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
}

/* Homepage — Split Panel */
.home-left {
    width: 280px;
    flex-shrink: 0;
    background: #0d0b0b;
    border-right: 1px solid #1e1515;
    display: flex;
    flex-direction: column;
    padding: 40px 24px 32px;
    position: relative;
}

.home-left::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, #cc2222 25%, #cc2222 75%, transparent);
}

.home-right {
    flex: 1;
    background: #0b0b0b;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 40px;
    gap: 10px;
    position: relative;
}

#homepage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.04) 2px, rgba(0,0,0,0.04) 4px);
    pointer-events: none;
    z-index: 1;
}

.home-brand {
    margin-bottom: auto;
}

.home-title {
    font-size: 52px;
    font-weight: 900;
    letter-spacing: 4px;
    line-height: 0.88;
    background: linear-gradient(160deg, #ff4444 0%, #cc2222 60%, #8a1515 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.home-subtitle {
    font-size: 10px;
    letter-spacing: 3px;
    color: #442222;
    text-transform: uppercase;
    margin-top: 10px;
}

.home-divider {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, #662222, transparent);
    margin: 22px 0 16px;
}

.home-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.home-stat-label {
    font-size: 11px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #664444;
}

.home-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #ff4444;
}

.home-utils {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.home-utils-label {
    font-size: 10px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #884444;
    margin-bottom: 4px;
}

.util-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid #2a1818;
    border-radius: 4px;
    background: #100d0d;
    color: #664444;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s, color 0.15s;
    font-family: 'Segoe UI', Arial, sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-align: left;
}

.util-btn:hover {
    border-color: #cc3333;
    background: #150d0d;
    color: #ff4444;
    transform: translateX(3px);
}

.util-btn .util-icon {
    font-size: 14px;
    flex-shrink: 0;
    opacity: 0.7;
}

.util-btn:hover .util-icon {
    opacity: 1;
}

.home-modes-label {
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #884444;
    margin-bottom: 2px;
}

.mode-row {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    border: 1px solid #2e1a1a;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, transform 0.12s;
    display: flex;
    align-items: stretch;
    background: #100d0d;
    overflow: hidden;
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 0;
    text-align: left;
}

.mode-row:hover {
    border-color: #ff4444;
    background: #130d0d;
    transform: translateX(4px);
}

.mode-stripe {
    width: 4px;
    flex-shrink: 0;
    background: #3a1515;
    transition: background 0.15s;
}

.mode-row:hover .mode-stripe {
    background: #ff4444;
}

.mode-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 24px;
    flex: 1;
}

.mode-icon {
    font-size: 36px;
    flex-shrink: 0;
    width: 48px;
    text-align: center;
}

.mode-text {
    flex: 1;
}

.mode-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #884444;
    transition: color 0.15s;
}

.mode-desc {
    font-size: 12px;
    color: #3a2222;
    margin-top: 5px;
    letter-spacing: 0.5px;
    transition: color 0.15s;
}

.mode-arrow {
    color: #2a1515;
    font-size: 24px;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.mode-row:hover .mode-name { color: #ff4444; }
.mode-row:hover .mode-desc { color: #774444; }
.mode-row:hover .mode-arrow { color: #ff4444; transform: translateX(4px); }

.menu-btn {
    width: 300px;
    padding: 16px;
    margin: 8px;
    font-size: 20px;
    font-weight: 700;
    border: 2px solid #ff4444;
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.menu-btn:hover {
    background: #ff4444;
    color: #fff;
    transform: scale(1.05);
}

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

/* Shop */
#shop-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    flex-direction: column;
    background: #0b0b0b;
}

.shop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 28px;
    background: #0d0b0b;
    border-bottom: 1px solid #1e1515;
    flex-shrink: 0;
    position: relative;
}

.shop-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, #cc2222 25%, #cc2222 75%, transparent);
}

.shop-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 6px;
    background: linear-gradient(160deg, #ff4444, #cc2222, #8a1515);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.shop-balance-wrap {
    text-align: right;
}

.shop-balance-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #664444;
}

.shop-balance {
    font-size: 22px;
    font-weight: 700;
    color: #cc4444;
}

.shop-tabs {
    display: flex;
    background: #0b0b0b;
    border-bottom: 1px solid #1e1515;
    flex-shrink: 0;
}

.shop-tab {
    appearance: none;
    -webkit-appearance: none;
    padding: 12px 24px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #442222;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: color 0.15s, border-color 0.15s;
}

.shop-tab:hover {
    color: #884444;
}

.shop-tab.active {
    color: #ff4444;
    border-bottom-color: #ff4444;
}

.shop-panels {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.shop-panel {
    display: none;
    height: 100%;
    overflow-y: auto;
    padding: 24px 28px;
}

.shop-panel.active {
    display: block;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    max-width: 1200px;
    margin: 0 auto;
}

.shop-section-header {
    grid-column: 1 / -1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #664444;
    padding: 14px 0 6px;
    border-bottom: 1px solid #1e1515;
    margin-bottom: 4px;
}

.shop-item {
    background: #100d0d;
    border: 1px solid #2e1a1a;
    border-radius: 6px;
    padding: 16px;
    transition: border-color 0.15s, transform 0.12s;
}

.shop-item:hover {
    border-color: #cc3333;
    transform: translateY(-2px);
}

.shop-item h3 {
    color: #884444;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.shop-item .price {
    color: #ff4444;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.shop-item .stats {
    color: #442222;
    font-size: 11px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.shop-item .buy-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #1a0808;
    border: 1px solid #3a1515;
    color: #cc4444;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background 0.15s, color 0.15s;
}

.shop-item .buy-btn:hover:not(:disabled) {
    background: #2a0d0d;
    color: #ff4444;
}

.shop-item .buy-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.shop-item .buy-btn.owned {
    background: #0a0a0a;
    color: #442222;
    border-color: #1a1a1a;
    cursor: default;
}

.shop-item .repair-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 7px;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: #1a0c00;
    border: 1px solid #3a2200;
    color: #cc6600;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background 0.15s;
}

.shop-item .repair-btn:hover {
    background: #251200;
}

/* Consumables tab — amber accent */
.shop-grid-consumable .shop-item {
    border-color: #2a1e08;
}

.shop-grid-consumable .shop-item:hover {
    border-color: #8a5500;
}

.shop-grid-consumable .shop-item h3 {
    color: #aa7700;
}

.shop-grid-consumable .shop-item .price {
    color: #ffaa00;
}

.shop-grid-consumable .shop-item .stats {
    color: #554422;
}

.shop-grid-consumable .shop-item .buy-btn {
    background: #1a1200;
    border-color: #3a2800;
    color: #aa7700;
}

.shop-grid-consumable .shop-item .buy-btn:hover:not(:disabled) {
    background: #251800;
    color: #ffaa00;
}

.shop-footer {
    padding: 14px 28px;
    background: #0d0b0b;
    border-top: 1px solid #1e1515;
    flex-shrink: 0;
    display: flex;
    justify-content: flex-end;
}

.shop-back-btn {
    appearance: none;
    -webkit-appearance: none;
    padding: 10px 32px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #cc4444;
    background: rgba(180, 30, 30, 0.12);
    border: 1px solid #7a2222;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.shop-back-btn:hover {
    color: #fff;
    border-color: #ff4444;
    background: rgba(200, 40, 40, 0.25);
}

/* XP tab */
.xp-info-card {
    background: #100d0d;
    border: 1px solid #2e1a1a;
    border-radius: 5px;
    padding: 14px 18px;
    max-width: 1200px;
    margin: 0 auto 18px;
}

.xp-info-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #664444;
    margin-bottom: 4px;
}

.xp-info-val {
    font-size: 15px;
    font-weight: 700;
    color: #ff4444;
}

.xp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.xp-card {
    background: #100d0d;
    border: 1px solid #2e1a1a;
    border-radius: 5px;
    padding: 16px 12px;
    text-align: center;
    transition: border-color 0.15s, transform 0.12s;
}

.xp-card:hover {
    border-color: #cc3333;
    transform: translateY(-2px);
}

.xp-amount {
    font-size: 26px;
    font-weight: 900;
    color: #ff4444;
    line-height: 1;
}

.xp-unit {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #664444;
    margin: 3px 0 10px;
}

.xp-cost {
    font-size: 13px;
    font-weight: 700;
    color: #884444;
    margin-bottom: 12px;
}

.xp-card .buy-btn {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    padding: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    background: #1a0808;
    border: 1px solid #3a1515;
    color: #cc4444;
    border-radius: 3px;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background 0.15s, color 0.15s;
}

.xp-card .buy-btn:hover:not(:disabled) {
    background: #2a0d0d;
    color: #ff4444;
}

.xp-card .buy-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.back-btn {
    display: block;
    margin: 30px auto;
    padding: 14px 40px;
    font-size: 18px;
    background: none;
    border: 2px solid #666;
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    border-color: #fff;
}

/* Loadout */
#loadout-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    flex-direction: column;
    background: #0a0a0a;
    overflow: hidden;
}

.lo-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #0d0d0d;
    border-bottom: 2px solid #cc2200;
    flex-shrink: 0;
}

.lo-title {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 6px;
    color: #cc2200;
    text-transform: uppercase;
}

.lo-meta { display: flex; gap: 28px; }
.lo-meta-item { display: flex; flex-direction: column; }

.lo-meta-label {
    font-size: 9px;
    color: #555;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lo-meta-value { font-size: 15px; font-weight: 700; color: #fff; }
.lo-meta-value.lo-pts { color: #ffaa00; }

.lo-back-btn {
    background: none;
    border: 1px solid #333;
    color: #666;
    padding: 7px 18px;
    font-size: 12px;
    font-family: 'Segoe UI', Arial, sans-serif;
    letter-spacing: 2px;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s;
    appearance: none;
}

.lo-back-btn:hover { border-color: #fff; color: #fff; }

.lo-body { display: flex; flex: 1; overflow: hidden; }

.lo-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-right: 1px solid #1a1a1a;
}

.lo-col:last-child { border-right: none; }
.lo-col-weapons { flex: 1.2; }
.lo-col-armor   { flex: 1.1; }
.lo-col-stats   { flex: 1; }

.lo-col-header {
    padding: 12px 18px 10px;
    background: #0d0d0d;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
}

.lo-col-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #cc2200;
    text-transform: uppercase;
}

.lo-col-sub { font-size: 10px; color: #444; margin-top: 2px; }

.lo-col-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    scrollbar-width: thin;
    scrollbar-color: #222 #0d0d0d;
}

/* Weapon cards */
.lo-w-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 7px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.lo-w-card:hover:not(.lo-damaged) { border-color: #444; background: #141414; }
.lo-w-card.lo-equipped { border-color: #cc2200; background: rgba(204,34,0,0.07); }
.lo-w-card.lo-damaged  { border-color: #ff4444; background: rgba(255,68,68,0.05); cursor: default; }

.lo-w-icon {
    width: 32px;
    height: 32px;
    background: #1a1a1a;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.lo-w-info { flex: 1; min-width: 0; }

.lo-w-name {
    font-size: 13px;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lo-w-card.lo-equipped .lo-w-name { color: #fff; }
.lo-w-ammo { font-size: 10px; color: #444; margin-top: 1px; }

.lo-w-badge {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid transparent;
    background: none;
    cursor: inherit;
}

.lo-w-badge.lo-badge-on  { background: rgba(204,34,0,0.2); color: #cc2200; border-color: rgba(204,34,0,0.4); }
.lo-w-badge.lo-badge-off { color: #333; border-color: #222; }
.lo-w-badge.lo-badge-rep { background: rgba(255,68,68,0.15); color: #ff6666; border-color: rgba(255,68,68,0.3); cursor: pointer; }
.lo-w-badge.lo-badge-rep:hover { background: rgba(255,68,68,0.25); }

/* Armor column */
.lo-armor-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 14px;
}

.lo-a-slot {
    background: #111;
    border: 1px dashed #222;
    border-radius: 6px;
    padding: 10px;
    text-align: center;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: border-style 0.15s, background 0.15s;
}

.lo-a-slot.lo-a-filled             { border-style: solid; background: rgba(204,34,0,0.04); }
.lo-a-slot[data-slot-type="head"]  { border-color: #7755aa; }
.lo-a-slot[data-slot-type="armor"] { border-color: #cc2200; }
.lo-a-slot[data-slot-type="pants"] { border-color: #226644; }
.lo-a-slot[data-slot-type="boots"] { border-color: #664400; }

.lo-a-slot-label {
    font-size: 8px;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.lo-a-slot[data-slot-type="head"]  .lo-a-slot-label { color: #7755aa; }
.lo-a-slot[data-slot-type="armor"] .lo-a-slot-label { color: #cc2200; }
.lo-a-slot[data-slot-type="pants"] .lo-a-slot-label { color: #226644; }
.lo-a-slot[data-slot-type="boots"] .lo-a-slot-label { color: #664400; }

.lo-a-slot-name { font-size: 10px; color: #888; }
.lo-a-slot.lo-a-filled .lo-a-slot-name { color: #ddd; }
.lo-a-slot-stats { font-size: 9px; color: #444; margin-top: 2px; }

.lo-a-remove {
    font-size: 9px;
    color: #555;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 4px;
    padding: 0;
    appearance: none;
}

.lo-a-remove:hover { color: #ff4444; }
.lo-divider { height: 1px; background: #1a1a1a; margin: 10px 0; }

.lo-inv-label {
    font-size: 9px;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.lo-a-inv-card {
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 5px;
    padding: 8px 10px;
    margin-bottom: 6px;
    cursor: grab;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: border-color 0.15s, opacity 0.15s;
}

.lo-a-inv-card:hover { border-color: #333; }
.lo-a-inv-card.lo-inv-equipped { border-color: #cc2200; opacity: 0.5; }

.lo-a-inv-type {
    font-size: 8px;
    letter-spacing: 1px;
    color: #444;
    text-transform: uppercase;
    flex-shrink: 0;
    width: 34px;
}

.lo-a-inv-name { font-size: 11px; color: #bbb; flex: 1; }
.lo-a-inv-stat { font-size: 9px; color: #444; }

/* Stats column */
.lo-pts-banner {
    background: #111;
    border: 1px solid #222;
    border-radius: 5px;
    padding: 8px 12px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.lo-pts-label { font-size: 10px; color: #555; letter-spacing: 1px; text-transform: uppercase; }
.lo-pts-val   { font-size: 18px; font-weight: 700; color: #ffaa00; }
.lo-pts-left  { display: flex; align-items: center; gap: 8px; }
.lo-pts-step-wrap { display: flex; align-items: center; gap: 6px; }

.lo-stat-row {
    margin-bottom: 8px;
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 5px;
    padding: 9px 11px;
}

.lo-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}

.lo-stat-name { font-size: 11px; color: #aaa; flex: 1; }
.lo-stat-controls { display: flex; align-items: center; gap: 5px; }

.lo-stat-btn {
    width: 22px;
    height: 22px;
    border-radius: 3px;
    border: 1px solid #2a2a2a;
    background: #1a1a1a;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: all 0.12s;
    appearance: none;
}

.lo-stat-btn.lo-btn-add                      { border-color: #cc2200; color: #cc2200; }
.lo-stat-btn.lo-btn-add:hover                { background: rgba(204,34,0,0.15); }
.lo-stat-btn:disabled                         { opacity: 0.3; cursor: default; }
.lo-stat-btn.lo-btn-rem:hover:not(:disabled) { border-color: #555; color: #aaa; }

.lo-stat-val {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    min-width: 22px;
    text-align: center;
}

.lo-stat-bar-wrap { background: #1a1a1a; border-radius: 2px; height: 3px; }
.lo-stat-bar      { height: 3px; border-radius: 2px; transition: width 0.2s; }
.lo-stat-effect   { font-size: 9px; color: #333; margin-top: 4px; }

.lo-stat-step {
    width: 38px;
    background: #1a0a0a;
    border: 1px solid #cc2200;
    color: #fff;
    font-size: 12px;
    font-family: inherit;
    text-align: center;
    padding: 2px 0;
    border-radius: 2px;
    -moz-appearance: textfield;
}
.lo-stat-step::-webkit-inner-spin-button,
.lo-stat-step::-webkit-outer-spin-button { display: none; }
.lo-stat-step:focus { outline: none; border-color: #ff4422; }

.start-btn {
    display: block;
    margin: 30px auto;
    padding: 16px 60px;
    font-size: 22px;
    background: #ff4444;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
}

.start-btn:hover {
    background: #ff6666;
    transform: scale(1.05);
}


/* HUD */
#hud {
    position: fixed;
    inset: 0;
    z-index: 50;
    pointer-events: none;
    display: none;
}

#crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.8);
}

#crosshair::before {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

#crosshair::after {
    height: 2px;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
}

#crosshair .dot {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff4444;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#hp-bar {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 250px;
    height: 25px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #ff4444;
    border-radius: 4px;
    overflow: hidden;
}

#hp-bar .fill {
    height: 100%;
    background: #ff4444;
    transition: width 0.3s;
    width: 100%;
}

#hp-bar .label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

#armor-bar {
    position: absolute;
    bottom: 60px;
    left: 30px;
    width: 250px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0088ff;
    border-radius: 4px;
    overflow: hidden;
}

#armor-bar .fill {
    height: 100%;
    background: #0088ff;
    transition: width 0.3s;
    width: 0%;
}

#armor-bar .label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

#stamina-bar {
    position: absolute;
    bottom: 85px;
    left: 30px;
    width: 250px;
    height: 18px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #00ff88;
    border-radius: 4px;
    overflow: hidden;
}

#stamina-bar .fill {
    height: 100%;
    background: #00ff88;
    transition: width 0.3s;
    width: 100%;
}

#stamina-bar .label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #000;
}

#jump-charge-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 14px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #aadd00;
    border-radius: 4px;
    overflow: hidden;
}

#jump-charge-bar .fill {
    height: 100%;
    background: #aadd00;
    width: 0%;
    transition: none;
}

#jump-charge-bar .label {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #000;
    letter-spacing: 0.5px;
}

#weapon-hud {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-align: right;
    background: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #444;
}

#weapon-hud .weapon-name {
    font-size: 22px;
    font-weight: 700;
    color: #ffaa00;
}

#weapon-hud .ammo-display {
    font-size: 36px;
    font-weight: 700;
}

#weapon-hud .ammo-display .current {
    color: #fff;
}

#weapon-hud .ammo-display .separator {
    color: #666;
}

#weapon-hud .ammo-display .reserve {
    color: #aaa;
    font-size: 24px;
}

#weapon-hud .reload-text {
    color: #ff4444;
    font-size: 16px;
    font-weight: 700;
}

#xp-hud {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #ffdd00;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 12px;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

#money-hud {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: 700;
    color: #00ff88;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 6px;
}

#wave-hud {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 20px;
    border-radius: 6px;
}

#weapon-slots {
    position: absolute;
    bottom: 100px;
    right: 30px;
    display: flex;
    gap: 6px;
}

.slot-box {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #444;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #888;
    text-align: center;
    line-height: 1.1;
}

.slot-box.active {
    border-color: #ffaa00;
    color: #ffaa00;
}

#damage-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(255, 0, 0, 0.4) 100%);
    opacity: 0;
    transition: opacity 0.15s;
}

#kill-feed {
    position: absolute;
    top: 70px;
    right: 20px;
    text-align: right;
    font-size: 14px;
}

#kill-feed div {
    padding: 3px 0;
    opacity: 0.9;
}

#scope-overlay {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 55;
    pointer-events: none;
}

#scope-overlay .vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 30%, rgba(0, 0, 0, 0.95) 55%);
}

#scope-overlay .crosshair-h,
#scope-overlay .crosshair-v {
    position: absolute;
    background: rgba(0, 0, 0, 0.6);
}

#scope-overlay .crosshair-h {
    width: 100%;
    height: 1px;
    top: 50%;
}

#scope-overlay .crosshair-v {
    height: 100%;
    width: 1px;
    left: 50%;
}

#scope-overlay .scope-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #ff2222;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 3px rgba(255, 0, 0, 0.8);
}

#interaction-prompt {
    position: absolute;
    bottom: 200px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 20px;
    border-radius: 6px;
    display: none;
    border: 1px solid #ffaa00;
}

#round-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-size: 48px;
    font-weight: 700;
}

#round-overlay .sub {
    font-size: 24px;
    color: #aaa;
    margin-top: 10px;
}

#pause-menu {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#pause-menu h2 {
    font-size: 48px;
    margin-bottom: 30px;
}

/* Map selector */
#map-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    flex-direction: column;
    background: #0a0a0a;
    overflow: hidden;
}

.ms-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    border-bottom: 1px solid #1e1515;
    flex-shrink: 0;
    position: relative;
}

.ms-header::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: #cc2200;
}

.ms-title {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 4px;
    color: #fff;
    padding-left: 8px;
}

.ms-mode-badge {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #444;
    border: 1px solid #1a1a1a;
    padding: 4px 10px;
}

.ms-back-btn {
    appearance: none;
    -webkit-appearance: none;
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #555;
    border: 1px solid #222;
    padding: 5px 14px;
    cursor: pointer;
    background: none;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.ms-back-btn:hover {
    color: #fff;
    border-color: #ff4444;
    background: rgba(200, 40, 40, 0.2);
}

.ms-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.ms-list {
    width: 220px;
    flex-shrink: 0;
    border-right: 1px solid #1a1a1a;
    overflow-y: auto;
    background: #080808;
}

.ms-list-label {
    font-size: 8px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #333;
    padding: 10px 14px 6px;
    border-bottom: 1px solid #111;
}

.ms-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #0f0f0f;
    border-left: 2px solid transparent;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.ms-item:hover {
    background: #0f0808;
    border-left-color: #662200;
}

.ms-item.active {
    background: #1e0f0f;
    border-left-color: #cc2200;
}

.ms-item-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #222;
    flex-shrink: 0;
}

.ms-item.active .ms-item-dot { background: #cc2200; }

.ms-item-info { flex: 1; }

.ms-item-name {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #666;
}

.ms-item.active .ms-item-name { color: #fff; }
.ms-item:hover:not(.active) .ms-item-name { color: #994444; }

.ms-item-size {
    font-size: 8px;
    color: #333;
    margin-top: 1px;
}

.ms-item.active .ms-item-size { color: #553333; }

.ms-item-arrow {
    color: #222;
    font-size: 12px;
}

.ms-item.active .ms-item-arrow { color: #cc2200; }

.ms-preview {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ms-img-wrap {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #0d0d0d;
}

.ms-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.65;
    display: block;
}

.ms-img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 30%,
        rgba(0, 0, 0, 0.5) 65%,
        rgba(0, 0, 0, 0.92) 100%
    );
}

.ms-img-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 24px 18px;
}

.ms-map-name {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

.ms-map-desc {
    font-size: 12px;
    color: #888;
    margin-top: 6px;
    letter-spacing: 0.5px;
    line-height: 1.5;
    max-width: 480px;
}

.ms-map-tags {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.ms-tag {
    font-size: 8px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #444;
    border: 1px solid #1a1a1a;
    padding: 2px 8px;
}

.ms-footer {
    padding: 12px 24px;
    border-top: 1px solid #1a1a1a;
    background: #080808;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.ms-footer-hint {
    font-size: 9px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #333;
}

.ms-deploy-btn {
    appearance: none;
    -webkit-appearance: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    background: #cc2200;
    color: #fff;
    border: none;
    padding: 10px 28px;
    cursor: pointer;
    font-family: 'Segoe UI', Arial, sans-serif;
    transition: background 0.15s;
}

.ms-deploy-btn:hover { background: #ff3300; }

/* Cheats */
#cheat-console {
    position: fixed;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    display: none;
    pointer-events: all;
}

#cheat-input {
    width: 400px;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    font-family: monospace;
    font-size: 16px;
    border-radius: 20px;
    outline: none;
}

#cheat-input.cheat-mode {
    border-color: #00ff00;
    color: #00ff00;
}

#cheat-msg {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    color: #00ff00;
    font-family: monospace;
    font-size: 14px;
    display: none;
}

#cheat-menu {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cheat-menu .cheat-panel {
    width: min(580px, 90%);
    background: rgba(20, 20, 30, 0.95);
    border: 2px solid #00ff00;
    border-radius: 12px;
    padding: 20px;
}

#cheat-menu h2 {
    margin-bottom: 8px;
}

#cheat-menu p {
    margin-bottom: 16px;
    color: #ccc;
}

#cheat-menu .cheat-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

#cheat-menu .cheat-btn {
    background: #222;
    color: #fff;
    border: 1px solid #00ff00;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
}

#cheat-menu .cheat-btn:hover {
    background: #00ff00;
    color: #000;
}

#cheat-menu .close-btn {
    margin-top: 14px;
    background: #fff;
    color: #000;
    border-radius: 6px;
    width: 100%;
}

/* Tutorial */
#tutorial-box {
    background: linear-gradient(135deg, #0a0a1a, #1a1a2e);
    border: 1px solid #444;
    border-radius: 14px;
    padding: 40px 50px;
    max-width: 560px;
    width: 90%;
    text-align: center;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
}