* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
    background: #000;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #fff;
}

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* Shown instead of a silent blank screen when something fatal fails */
#fatalError {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px;
}

#fatalError h2 {
    color: #ff4444;
    font-size: 1.8rem;
    margin-bottom: 12px;
    text-transform: uppercase;
}

#fatalError p {
    color: #bbb;
    font-size: 0.95rem;
    max-width: 520px;
    line-height: 1.6;
}

/* Start Screen */
#startScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1a0000, #000000);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#startScreen h1 {
    font-size: 5rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #ff4444, #ff0000);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.3);
    letter-spacing: 0.2em;
    margin-bottom: 10px;
}

#startScreen h2 {
    font-size: 1.5rem;
    color: #aaa;
    letter-spacing: 0.5em;
    margin-bottom: 40px;
}

#nameInput {
    width: 300px;
    padding: 12px;
    font-size: 1.1rem;
    background: #222;
    border: 2px solid #ff4444;
    color: white;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    outline: none;
}

#nameInput:focus {
    border-color: #ff0000;
    box-shadow: 0 0 10px rgba(255,0,0,0.5);
}

#playBtn {
    width: 300px;
    padding: 15px;
    font-size: 1.3rem;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.2s;
}

#playBtn:hover {
    background: #ff3333;
    transform: scale(1.05);
}

.controls-info {
    max-width: 600px;
    color: #666;
    font-size: 0.8rem;
    margin-top: 30px;
    text-align: center;
    line-height: 1.5;
}

.menu-panel {
    width: 100%;
    max-width: 720px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.menu-title h1 {
    font-size: 4.5rem;
    font-weight: 900;
    text-transform: uppercase;
    background: linear-gradient(to bottom, #ff4444, #ff0000);
    -webkit-background-clip: text;
    color: transparent;
    text-shadow: 2px 2px 4px rgba(255, 0, 0, 0.3);
    letter-spacing: 0.2em;
    margin-bottom: 6px;
}

.menu-title h2 {
    font-size: 1.2rem;
    color: #aaa;
    letter-spacing: 0.4em;
    margin-bottom: 24px;
}

.menu-row {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 460px;
    margin-bottom: 6px;
}

.menu-row input {
    flex: 1;
}

.primary-btn {
    flex: 1;
    padding: 14px;
    font-size: 1.1rem;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background 0.2s, transform 0.2s;
}

.primary-btn:hover {
    background: #ff3333;
    transform: scale(1.02);
}

.primary-btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
}

.secondary-btn {
    padding: 10px 16px;
    font-size: 0.9rem;
    background: #222;
    color: #ddd;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    font-weight: bold;
    transition: background 0.2s, border-color 0.2s;
}

.secondary-btn:hover {
    background: #333;
    color: #fff;
    border-color: #ff4444;
}

.secondary-btn.danger {
    border-color: #555;
}

.secondary-btn.danger:hover {
    border-color: #ff4444;
    background: #2a0a0a;
}

.menu-secondary {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    margin-bottom: 14px;
}

.server-select {
    width: 100%;
    max-width: 520px;
    margin-top: 6px;
}

.server-select h3 {
    color: #ff4444;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
    text-align: center;
}

.server-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #141414;
    border: 2px solid #333;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    text-align: left;
}

.server-card:hover {
    border-color: #666;
    background: #1c1c1c;
}

.server-card.selected {
    border-color: #ff0000;
    background: rgba(255, 0, 0, 0.08);
}

.server-card.full {
    opacity: 0.5;
    cursor: not-allowed;
}

.server-card.loading {
    color: #888;
    justify-content: center;
    cursor: default;
}

.server-card-name {
    color: #fff;
    font-weight: bold;
    font-size: 0.9rem;
}

.server-card-count {
    color: #44ff44;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.server-card.full .server-card-count {
    color: #ff4444;
}

.menu-footer {
    margin-top: 18px;
    width: 100%;
    max-width: 600px;
}

.controls-info {
    max-width: 600px;
    color: #777;
    font-size: 0.8rem;
    margin-top: 0;
    text-align: center;
    line-height: 1.5;
}

.name-hint {
    margin-top: 6px;
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-bottom: 8px;
}

.server-row {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    align-items: center;
    background: rgba(0,0,0,0.5);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
}

.server-status-label {
    color: #aaa;
}

.server-status-label.connected {
    color: #44ff44;
}

.server-status-label.offline {
    color: #ff4444;
}

.server-status-label.waiting {
    color: #ffaa00;
}

.player-count-label {
    color: #fff;
    font-weight: bold;
}

/* Loading Screen */
#loadingScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.loading-text {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 5px;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* HUD Overlay */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

/* Health Bar */
#healthBarContainer {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 250px;
    height: 30px;
    background: #333;
    border: 2px solid #555;
    border-radius: 4px;
    overflow: hidden;
}

#healthBar {
    width: 100%;
    height: 100%;
    background: #ff3333;
    transition: width 0.3s ease-out;
}

#healthText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;
    font-size: 0.9rem;
    white-space: nowrap;
}

#dpsMeter {
    position: absolute;
    top: 55px;
    left: 20px;
    font-size: 0.9rem;
    color: #ffaa00;
    text-shadow: 1px 1px 2px #000;
}

/* Cash & KD */
#cashDisplay {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #44ff44;
    font-weight: bold;
    text-shadow: 1px 1px 4px #000;
}

#kdDisplay {
    position: absolute;
    top: 150px;
    right: 20px;
    font-size: 0.9rem;
    color: #aaa;
    text-shadow: 1px 1px 2px #000;
}

/* Money toasts: +$ gains stacked directly above the cash readout
   (which the HUD override pins to bottom-right; ammo pill sits at 76px). */
#moneyToasts {
    position: absolute;
    top: auto;
    bottom: 122px;
    right: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    pointer-events: none;
    z-index: 11;
}

.money-toast {
    background: rgba(0, 40, 0, 0.78);
    border: 1px solid #44ff44;
    color: #7dff7d;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    text-shadow: 1px 1px 2px #000;
    white-space: nowrap;
    animation: moneyToastIn 2.6s forwards;
}

@keyframes moneyToastIn {
    0% { opacity: 0; transform: translateY(6px); }
    10% { opacity: 1; transform: translateY(0); }
    75% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-6px); }
}

/* Kill Feed */
#killFeed {
    position: absolute;
    top: 178px;
    right: 20px;
    width: 300px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.player-count-badge {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #44ff44;
    font-weight: bold;
    pointer-events: none;
}

.kill-entry {
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.5);
    margin-bottom: 2px;
    font-size: 0.85rem;
    border-radius: 4px;
    animation: killFeedIn 0.3s ease-out forwards;
}

@keyframes killFeedIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Notifications */
#notifications {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.notification-entry {
    padding: 8px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    margin: 4px;
    font-size: 0.9rem;
    animation: fadeNotification 3s forwards;
}

@keyframes fadeNotification {
    0% { opacity: 0; transform: translateY(-10px); }
    10% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

/* Crosshair */
#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

#crosshair::before, #crosshair::after {
    content: '';
    position: absolute;
    background: white;
    box-shadow: 0 0 2px black;
}

#crosshair::before {
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
}

#crosshair::after {
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    transform: translateX(-50%);
}

.crosshair-hit::before, .crosshair-hit::after {
    background: red !important;
}

#interactionPrompt {
    position: absolute;
    top: 60%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 5px 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #fff;
    border: 1px solid #aaa;
}

/* Weapon Bar */
#weaponName {
    position: absolute;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #ccc;
    text-shadow: 1px 1px 2px #000;
}

#weaponBar {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
}

.weapon-slot {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #555;
    border-radius: 4px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 0.8rem;
    color: #ddd;
}

.weapon-slot.active {
    border-color: #ff4444;
    background: rgba(255, 0, 0, 0.2);
    color: #fff;
}

.weapon-slot-number {
    position: absolute;
    top: 2px;
    left: 4px;
    font-size: 0.7rem;
    color: #aaa;
}

/* Macro Indicator */
#macroIndicator {
    position: absolute;
    bottom: 20px;
    left: 20px;
    display: none;
    color: #ff4444;
    font-weight: bold;
    font-size: 1.2rem;
    animation: pulse 1s infinite;
    text-shadow: 1px 1px 2px #000;
}

.server-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #aaa;
    font-size: 0.75rem;
    text-shadow: 1px 1px 2px #000;
    pointer-events: none;
    font-family: monospace;
}

.server-info.connected {
    color: #44ff44;
}

.server-info.offline {
    color: #ff4444;
}

/* Ammo */
#ammoDisplay {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
}

/* Modals */
#shopModal, #customModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

.modal-content {
    width: 400px;
    background: #1a1a1a;
    border: 2px solid #ff4444;
    border-radius: 12px;
    padding: 20px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.wide {
    width: 500px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: #ff4444;
    text-transform: uppercase;
}

.close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
}

.close-btn:hover {
    color: #fff;
}

.shop-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #222;
}

.shop-item-name {
    color: #fff;
    flex: 1;
}

.shop-item-price {
    color: #44ff44;
    margin-right: 15px;
    font-weight: bold;
}

.buy-btn {
    background: #ff4444;
    color: white;
    padding: 4px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.buy-btn:hover {
    background: #ff0000;
}

.buy-btn.owned {
    background: #555;
    cursor: not-allowed;
}

/* Customization */
.custom-sections {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.custom-section {
    width: calc(50% - 7.5px);
    display: flex;
    flex-direction: column;
}

.custom-section.full-width {
    width: 100%;
}

.custom-section label {
    color: #ff4444;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.custom-section input[type="color"] {
    width: 100%;
    height: 35px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #222;
    cursor: pointer;
    padding: 2px;
}

.custom-section select {
    width: 100%;
    height: 35px;
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    padding: 5px;
    outline: none;
}

.weapon-skins-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.weapon-skin-item {
    display: flex;
    flex-direction: column;
}

.weapon-skin-item label {
    font-size: 0.8rem;
    color: #aaa;
}

#applyCustomBtn {
    width: 100%;
    background: #ff4444;
    color: white;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    text-transform: uppercase;
}

#applyCustomBtn:hover {
    background: #ff0000;
}

/* Pause Modal */
#pauseModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 130;
    pointer-events: auto;
}

.modal-content.medium {
    width: 420px;
}

.pause-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Skin Editor Modal (above the menu screens so it opens from the menu too) */
#skinEditorModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    pointer-events: auto;
}

.skin-editor-body {
    display: flex;
    gap: 20px;
}

.skin-preview {
    width: 220px;
    height: 260px;
    background: #000;
    border: 2px solid #333;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.skin-preview canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.skin-options {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.skin-section {
    display: flex;
    flex-direction: column;
}

.skin-section label {
    color: #ff4444;
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.skin-section input[type="color"] {
    width: 100%;
    height: 32px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #222;
    cursor: pointer;
    padding: 2px;
}

.skin-section select {
    width: 100%;
    padding: 6px;
    background: #222;
    color: #fff;
    border: 1px solid #555;
    border-radius: 4px;
    outline: none;
}

.skin-editor-footer {
    width: 100%;
    display: flex;
    gap: 10px;
    margin-top: 18px;
    justify-content: flex-end;
}

#settingsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    pointer-events: auto;
}

/* Chat Box */
#chatBox {
    position: absolute;
    bottom: 60px;
    left: 20px;
    width: 350px;
    pointer-events: auto;
    transition: opacity 0.2s;
    z-index: 20;
}

#chatBox.collapsed {
    opacity: 0.5;
}

#chatBox.collapsed:hover {
    opacity: 0.8;
}

#chatMessages {
    height: 150px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px;
    font-size: 0.85rem;
    border-radius: 4px 4px 0 0;
    text-shadow: 1px 1px 1px #000;
}

.chat-entry {
    margin-bottom: 3px;
    word-wrap: break-word;
}

.chat-name {
    font-weight: bold;
    color: #aaa;
}

/* Server/operator answers (/help, /money, bans) — visually distinct from chat. */
.chat-entry.system .chat-text {
    color: #ffd76e;
}

#chatInput {
    width: 100%;
    padding: 8px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #555;
    color: #fff;
    border-radius: 0 0 4px 4px;
    outline: none;
}

#chatInput:focus {
    border-color: #ff4444;
}

/* Settings Modal */
#settingsModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1500;
    pointer-events: auto;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.settings-section h3 {
    color: #ff4444;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    border-bottom: 1px solid #333;
    padding-bottom: 4px;
}

.setting-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.setting-row label {
    color: #ccc;
    font-size: 0.85rem;
    width: 120px;
    flex-shrink: 0;
}

.setting-row input[type="range"] {
    flex: 1;
    accent-color: #ff4444;
}

.setting-row select {
    flex: 1;
    padding: 6px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 4px;
    outline: none;
}

.setting-value {
    color: #ff4444;
    font-weight: bold;
    width: 48px;
    text-align: right;
    font-size: 0.85rem;
}

.apply-btn {
    width: 100%;
    padding: 12px;
    background: #ff0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 1rem;
}

.apply-btn:hover {
    background: #ff3333;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #333;
    padding-bottom: 8px;
}

.settings-tab {
    flex: 1;
    padding: 8px;
    background: transparent;
    color: #aaa;
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.75rem;
    transition: background 0.2s, color 0.2s;
}

.settings-tab:hover {
    color: #fff;
    background: #222;
}

.settings-tab.active {
    color: #fff;
    background: #ff0000;
    border-color: #ff4444;
}

.settings-panel {
    margin-bottom: 10px;
}

.settings-panel h3 {
    color: #ff4444;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.settings-panel.hidden {
    display: none;
}

.settings-footer {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    align-items: center;
}

.link-btn {
    background: transparent;
    color: #aaa;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem;
}

.link-btn:hover {
    color: #fff;
}

/* Keybinds */
.keybind-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.keybind-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
}

.keybind-label {
    color: #ccc;
    font-size: 0.85rem;
}

.keybind-key {
    background: #222;
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #444;
    font-weight: bold;
    font-size: 0.8rem;
    cursor: pointer;
    min-width: 90px;
    text-align: center;
    text-transform: uppercase;
    transition: border-color 0.2s;
}

.keybind-key:hover {
    border-color: #ff4444;
}

.keybind-key.listening {
    background: #3a1a1a;
    border-color: #ff0000;
    color: #ff4444;
}

.keybind-hint {
    color: #777;
    font-size: 0.8rem;
    margin-top: 10px;
    text-align: center;
}

/* Death Screen */
#deathScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

#deathScreen h1 {
    font-size: 4rem;
    font-weight: 900;
    color: #ff0000;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
    margin-bottom: 10px;
}

#killerInfo {
    font-size: 1.2rem;
    color: #fff;
    text-shadow: 1px 1px 4px #000;
    margin-bottom: 20px;
}

#respawnTimer {
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 1px 1px 4px #000;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #111;
}

::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

@media (max-width: 768px) {
    #healthBarContainer { width: 150px; }
    #cashDisplay { font-size: 1.2rem; }
    .weapon-slot { width: 45px; height: 45px; font-size: 0.7rem; }
    #chatBox { width: 250px; }
}

/* ===================== Casino (slots) ===================== */
.casino-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 18px 8px;
}

.slot-machine {
    display: flex;
    gap: 10px;
    background: #17141f;
    border: 2px solid #4a3860;
    border-radius: 10px;
    padding: 16px;
}

.slot-reel {
    width: 74px;
    height: 74px;
    font-size: 44px;
    line-height: 74px;
    text-align: center;
    background: #221c30;
    border-radius: 8px;
    border: 1px solid #3a2f4d;
    user-select: none;
}

.slot-reel.spinning {
    filter: blur(1px);
    opacity: 0.75;
}

.casino-result {
    font-size: 1.05rem;
    font-weight: bold;
    color: #ccc;
    min-height: 24px;
}

.casino-result.win { color: #6ee86e; }
.casino-result.lose { color: #ff6b6b; }
.casino-result.jackpot {
    color: #ffd700;
    font-size: 1.3rem;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.7);
}

.casino-bet-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.casino-bet-row input {
    width: 80px;
    padding: 8px;
    background: #222;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    text-align: center;
    font-size: 1rem;
}

.casino-spin {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px;
}

.casino-cash {
    color: #ffd700;
    font-weight: bold;
}

/* ===================== City services ===================== */
.service-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 8px;
}

.service-body p {
    color: #ccc;
    margin: 0;
}

.service-feedback {
    color: #ff8888;
    min-height: 20px;
    font-size: 0.9rem;
}

/* ===================== Hotbar (inventory slots) ===================== */
#weaponBar {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.weapon-slot {
    width: 56px;
    height: 56px;
    background: rgba(0, 0, 0, 0.55);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
}

.weapon-slot.active {
    border-color: #ff4444;
    background: rgba(255, 68, 68, 0.12);
}

.weapon-slot-number {
    position: absolute;
    top: 2px;
    left: 5px;
    font-size: 0.6rem;
    color: #888;
}

.weapon-slot .weapon-slot-icon {
    font-size: 20px;
    line-height: 1;
}

.weapon-slot .weapon-slot-name {
    font-size: 0.55rem;
    color: #ccc;
    margin-top: 3px;
    max-width: 50px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===================== Character creator ===================== */
.creator-modal .modal-content,
.creator-modal {
    max-width: 780px;
}

.creator-body {
    display: flex;
    gap: 18px;
    padding: 14px 8px;
    min-height: 380px;
}

.creator-left {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.creator-left .skin-preview {
    width: 280px;
    height: 340px;
    background: #14161c;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #333;
}

.preview-hint {
    margin-top: 6px;
    font-size: 0.75rem;
    color: #777;
}

.creator-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.creator-panel {
    padding-top: 12px;
}

.creator-panel.hidden { display: none; }

.creator-panel .skin-section {
    margin-bottom: 14px;
}

.creator-panel .skin-section label {
    display: flex;
    justify-content: space-between;
    color: #ccc;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

.creator-panel input[type="color"] {
    width: 100%;
    height: 38px;
    background: #222;
    border: 1px solid #444;
    border-radius: 6px;
    cursor: pointer;
}

.creator-panel select,
.creator-panel input[type="range"] {
    width: 100%;
}

.creator-tabs {
    margin-bottom: 4px;
}

.preset-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.preset-card {
    background: #1d1f26;
    border: 1px solid #3a3d46;
    border-radius: 8px;
    padding: 10px 6px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, transform 0.1s;
}

.preset-card:hover {
    border-color: #ff4444;
    transform: translateY(-2px);
}

.preset-swatches {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.preset-swatches span {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    margin: 0 -2px;
}

.preset-label {
    font-size: 0.72rem;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 720px) {
    .creator-body { flex-direction: column; }
    .creator-left { flex: none; }
    .preset-row { grid-template-columns: repeat(2, 1fr); }
}

/* ===================== KALDERA OVERHAUL ===================== */
/* Menu */
#startScreen {
    background: #0a0c12;
    overflow-y: auto;
}
.menu-bg {
    position: absolute; inset: 0;
    background:
        radial-gradient(1200px 600px at 50% -10%, rgba(255,120,40,0.18), transparent 60%),
        radial-gradient(900px 500px at 80% 110%, rgba(60,120,255,0.14), transparent 60%),
        linear-gradient(180deg, #141824 0%, #0a0c12 55%, #05060a 100%);
    pointer-events: none;
}
.menu-bg::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(closest-side at 50% 40%, black, transparent);
}
.menu-panel { position: relative; z-index: 1; }
.menu-title h1 {
    font-size: clamp(3rem, 8vw, 5.2rem);
    background: linear-gradient(180deg, #ffe9c8 0%, #ff9a3c 45%, #ff3b30 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    letter-spacing: 0.12em;
}
.menu-title h2 { color: #d8dce6; letter-spacing: 0.32em; }
.menu-tag { color: #8a93a8; font-size: 0.75rem; letter-spacing: 0.18em; margin-top: 6px; text-transform: uppercase; }
.tod-row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; color: #8a93a8; font-size: 0.75rem; letter-spacing: 0.12em; }
.tod-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tod-btns button {
    background: #171b26; color: #c8cede; border: 1px solid #2a3042; border-radius: 20px;
    padding: 6px 12px; font-size: 0.7rem; font-weight: bold; cursor: pointer; letter-spacing: 0.08em;
}
.tod-btns button.active, .tod-btns button:hover { border-color: #ff9a3c; color: #fff; background: #26200f; }
#playBtn, .primary-btn {
    background: linear-gradient(180deg, #ff5a3c, #e02020);
    box-shadow: 0 6px 24px rgba(255,60,30,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}
/* Loading */
#loadingScreen { background: radial-gradient(1000px 600px at 50% 30%, #1a2030, #05060a); }
.load-card { text-align: center; max-width: 420px; width: 90%; }
.load-title { font-size: 2.2rem; font-weight: 900; letter-spacing: 0.12em; color: #fff; }
.load-title span { color: #ff9a3c; font-size: 1rem; letter-spacing: 0.3em; }
.load-bar { height: 8px; background: #1a1e2a; border-radius: 99px; overflow: hidden; margin: 16px 0 8px; border: 1px solid #2a3042; }
#loadBarFill { height: 100%; width: 15%; background: linear-gradient(90deg, #ff9a3c, #ff3b30); border-radius: 99px; transition: width 0.3s; }
.load-tip { color: #8a93a8; font-size: 0.8rem; min-height: 20px; }
.spinner { width: 34px; height: 34px; margin: 14px auto 0; border: 3px solid #2a3042; border-top-color: #ff9a3c; border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Crosshair v2 */
#crosshair {
    --gap: 5px; --scale: 1; --ch-color: #ffffff;
    width: calc((var(--gap) * 2 + 18px) * var(--scale));
    height: calc((var(--gap) * 2 + 18px) * var(--scale));
    transform: translate(-50%, -50%) scale(1);
}
#crosshair::before, #crosshair::after { display: none; }
#crosshair .ch-dot {
    position: absolute; left: 50%; top: 50%; width: 3px; height: 3px;
    transform: translate(-50%, -50%); background: var(--ch-color); border-radius: 50%;
    box-shadow: 0 0 3px #000;
}
#crosshair .ch-t, #crosshair .ch-b {
    position: absolute; left: 50%; width: 2px; height: 8px;
    background: var(--ch-color); box-shadow: 0 0 3px #000; transform: translateX(-50%);
}
#crosshair .ch-t { top: calc(50% - var(--gap) - 8px); }
#crosshair .ch-b { top: calc(50% + var(--gap)); }
#crosshair .ch-l, #crosshair .ch-r {
    position: absolute; top: 50%; height: 2px; width: 8px;
    background: var(--ch-color); box-shadow: 0 0 3px #000; transform: translateY(-50%);
}
#crosshair .ch-l { left: calc(50% - var(--gap) - 8px); }
#crosshair .ch-r { left: calc(50% + var(--gap)); }
#crosshair.firing .ch-t, #crosshair.firing .ch-b, #crosshair.firing .ch-l, #crosshair.firing .ch-r { background: #ffb03c; }
#hitmarker {
    position: fixed; left: 50%; top: 50%; width: 26px; height: 26px;
    transform: translate(-50%, -50%) rotate(45deg); pointer-events: none; opacity: 0;
}
#hitmarker::before, #hitmarker::after { content: ''; position: absolute; background: #ff4444; box-shadow: 0 0 4px #000; }
#hitmarker::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
#hitmarker::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); }
#hitmarker.show { animation: hitpop 0.18s ease-out; }
@keyframes hitpop { 0% { opacity: 1; transform: translate(-50%, -50%) rotate(45deg) scale(1.4); } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.9); } }
#todBtn {
    position: absolute; bottom: 90px; right: 20px; pointer-events: auto;
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.25);
    background: rgba(0,0,0,0.55); color: #fff; font-size: 1.1rem; cursor: pointer;
}
#todBtn:hover { border-color: #ff9a3c; }
/* Death screen choice */
#deathScreen { background: radial-gradient(ellipse at center, rgba(120,0,0,0.45), rgba(0,0,0,0.75)); z-index: 60; }
#deathBtnRow .primary-btn, #deathBtnRow .secondary-btn { pointer-events: auto; }
/* HUD responsive */
#hud { font-size: 16px; }
@media (max-width: 900px) {
    #killFeed { width: 200px; }
    #chatBox { width: 240px; bottom: 120px; }
    #weaponBar { bottom: 12px; max-width: 96vw; overflow-x: auto; }
    .weapon-slot { width: 46px; height: 46px; flex-shrink: 0; }
    #healthBarContainer { width: min(200px, 40vw); }
    #cashDisplay { font-size: 1.1rem; }
    #todBtn { bottom: 140px; }
}
@media (max-width: 600px) {
    #dpsMeter { display: none; }
    #serverInfo { display: none; }
    #weaponName { bottom: 70px; font-size: 0.75rem; }
    #crosshair { --scale: 0.9; }
}
.modal-content { max-width: min(560px, 94vw); }
.modal-content.wide { max-width: min(640px, 96vw); }
#shopModal .modal-content, #customModal .modal-content { max-height: 88vh; }

/* ===== FOLLOW-UP: HUD placement per spec (override) ===== */
#healthBarContainer { left: auto !important; right: 20px !important; top: 20px !important; width: min(250px, 34vw) !important; background: rgba(20,20,20,0.75) !important; border-radius: 8px !important; }
#cashDisplay { left: auto !important; right: 20px !important; top: 62px !important; bottom: auto !important; background: rgba(0,0,0,0.55) !important; padding: 6px 14px !important; border-radius: 10px !important; border: 1px solid rgba(68,255,68,0.35) !important; font-size: clamp(1.1rem, 2.4vw, 1.5rem) !important; }
#kdDisplay { top: 56px !important; right: 20px !important; }
#ammoDisplay { bottom: 76px !important; right: 20px !important; font-size: 1.1rem !important; opacity: 0.95; }
#killFeed { top: 130px !important; }
.weapon-slot.empty { opacity: 0.45; border-style: dashed !important; }
.weapon-slot-qty { position: absolute; bottom: 2px; right: 5px; font-size: 0.62rem; color: #ffd76e; font-weight: bold; }
.shop-hint { color: #8a93a8; font-size: 0.78rem; margin-bottom: 8px; }
@media (max-width: 900px) { #healthBarContainer { width: min(180px, 40vw) !important; } #moneyToasts { bottom: 178px !important; } }

/* ===== Account gate (register/login before the menu) ===== */
#authScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0a0c12;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
}
.auth-card {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(20, 24, 36, 0.85);
    border: 1px solid #2a3042;
    border-radius: 12px;
    padding: 20px;
}
.auth-card input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    background: #10131c;
    border: 1px solid #2a3042;
    border-radius: 8px;
    color: #fff;
    outline: none;
}
.auth-card input:focus { border-color: #ff9a3c; }
.auth-tabs { display: flex; gap: 6px; }
.auth-tabs .settings-tab { flex: 1; }
.auth-error {
    min-height: 20px;
    color: #ff6b6b;
    font-size: 0.85rem;
    text-align: center;
}
.account-row { align-items: center; justify-content: space-between; }
.account-btns { display: flex; gap: 8px; }
.skin-preview { position: relative; }
.skin-zoom-btns { position: absolute; right: 6px; bottom: 6px; display: flex; gap: 6px; }
.skin-zoom-btns button {
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid #555; background: rgba(20,22,30,0.9); color: #fff;
    font-size: 1.1rem; cursor: pointer; line-height: 1;
}
.skin-zoom-btns button:hover { border-color: #ff9a3c; }
/* Change-password dialog rides on the generic modal shell */
#passwordModal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex; justify-content: center; align-items: center;
    z-index: 1500; pointer-events: auto;
}
.account-label { color: #c8cede; font-size: 0.95rem; }
.account-label b { color: #ffd76e; }

/* ===== FIX PACK: casino/service modals were unpositioned (invisible) ===== */
#casinoModal, #serviceModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}
#todBtn { display: none !important; }

/* ===== FIX PACK: little-circle crosshair (overrides plus-style) ===== */
#crosshair {
    width: calc(26px * var(--scale, 1)) !important;
    height: calc(26px * var(--scale, 1)) !important;
}
#crosshair::before, #crosshair::after { display: none !important; }
#crosshair .ch-t, #crosshair .ch-b, #crosshair .ch-l, #crosshair .ch-r { display: none !important; }
#crosshair .ch-dot {
    position: absolute;
    left: 50%; top: 50%;
    width: calc(14px * var(--scale, 1));
    height: calc(14px * var(--scale, 1));
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: transparent !important;
    border: 2px solid var(--ch-color, #ffffff);
    box-shadow: 0 0 3px #000, inset 0 0 2px rgba(0,0,0,0.8);
}
#crosshair.firing .ch-dot { border-color: #ffb03c !important; }
#crosshair.crosshair-hit .ch-dot { border-color: #ff4444 !important; }

/* Retired HUD readouts (kept in DOM for compatibility, never shown) */
#serverInfo, #dpsMeter, #kdDisplay {
    display: none !important;
}

/* ---- Mobile touch controls (horizontal bottom bar) ---- */
#mobileControls {
    position: fixed; inset: 0; z-index: 40;
    pointer-events: none; display: none;
    touch-action: none;
}
#mStick {
    position: absolute; left: 14px; bottom: 14px;
    width: 112px; height: 112px; border-radius: 50%;
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(255,255,255,0.25);
    pointer-events: auto; touch-action: none;
}
#mKnob {
    position: absolute; left: 50%; top: 50%;
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(255,255,255,0.35);
    transform: translate(-50%, -50%);
}
#mBtns {
    position: absolute; right: 12px; bottom: 12px;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: auto; align-items: flex-end;
}
.mrow { display: flex; gap: 8px; }
.mbtn {
    width: 58px; height: 58px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.35);
    background: rgba(20,20,28,0.55); color: #fff;
    font-size: 0.68rem; font-weight: bold; touch-action: none;
}
.mbtn.big { width: 76px; height: 76px; background: rgba(180,30,30,0.6); font-size: 0.8rem; }
.mbtn:active, .mbtn.held { background: rgba(255,255,255,0.35); }
#mSysBtns {
    position: absolute; right: 12px; top: 84px;
    display: flex; flex-direction: column; gap: 8px;
    pointer-events: auto;
}
.mbtn.small { width: 46px; height: 46px; font-size: 0.62rem; }
body.mobile #gameCanvas { touch-action: none; }
/* Mobile HUD: compact, nothing overlaps the thumbs */
body.mobile #healthBarContainer { left: 12px !important; right: auto !important; top: 12px !important; width: min(200px, 42vw) !important; }
body.mobile #cashDisplay { left: 12px !important; right: auto !important; top: 52px !important; font-size: 1.05rem !important; }
body.mobile #playerCountBadge { font-size: 0.7rem !important; padding: 3px 10px !important; }
body.mobile #killFeed { top: 84px !important; right: 70px !important; width: 170px !important; font-size: 0.72rem !important; }
body.mobile #chatBox { left: 12px !important; width: min(300px, 44vw) !important; bottom: 140px !important; }
body.mobile #chatMessages { height: 86px !important; font-size: 0.75rem !important; }
body.mobile #weaponBar { bottom: 8px !important; left: 50% !important; transform: translateX(-50%); max-width: 44vw !important; }
body.mobile .weapon-slot { width: 42px !important; height: 42px !important; }
body.mobile .weapon-slot-name { display: none !important; }
body.mobile #weaponName { bottom: 58px !important; font-size: 0.68rem !important; }
body.mobile #ammoDisplay { bottom: 60px !important; right: auto !important; left: 50% !important; transform: translateX(-50%); font-size: 0.85rem !important; }
body.mobile #moneyToasts { bottom: 100px !important; }
body.mobile #interactionPrompt { bottom: 120px !important; font-size: 0.8rem !important; }
/* Desktop uses V for voice: no on-screen mic button needed there. */
body:not(.mobile) #voiceBtn { display: none !important; }
body.mobile #voiceBtn { display: none !important; }
@media (pointer: coarse) {
    .weapon-slot { min-width: 52px; min-height: 52px; }
}

/* ---- Fullscreen modern character creator (fivem-style) ---- */
#skinEditorModal {
    background: radial-gradient(1200px 800px at 30% 20%, #141824 0%, #07080d 60%, #040405 100%);
}
#skinEditorModal .modal-content.creator-modal {
    width: 100vw; height: 100vh; max-width: none; max-height: none;
    border-radius: 0; border: none;
    background: transparent;
    display: flex; flex-direction: column;
    padding: 26px 34px;
}
#skinEditorModal .modal-header { max-width: 1400px; width: 100%; margin: 0 auto; border-bottom: 1px solid #232838; padding-bottom: 14px; }
#skinEditorModal .modal-header h2 { font-size: 1.6rem; letter-spacing: 0.28em; }
#skinEditorModal .creator-body {
    flex: 1; width: 100%; max-width: 1400px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 400px; gap: 26px;
    min-height: 0; padding-top: 18px;
}
#skinEditorModal .creator-left {
    position: relative; min-height: 0;
    background: linear-gradient(180deg, #10131c 0%, #0a0c12 100%);
    border: 1px solid #232838; border-radius: 18px; overflow: hidden;
}
#skinEditorModal .skin-preview { width: 100%; height: 100%; min-height: 420px; border: none; border-radius: 0; background: transparent; }
#skinEditorModal .preview-hint {
    position: absolute; bottom: 12px; left: 0; right: 0; text-align: center;
    color: #8a93a8; font-size: 0.8rem; pointer-events: none;
}
#skinEditorModal .skin-zoom-btns { right: 12px; bottom: 12px; }
#skinEditorModal .skin-zoom-btns button { width: 38px; height: 38px; font-size: 1.3rem; }
#skinEditorModal .creator-right {
    min-height: 0; overflow-y: auto; padding-right: 6px;
    display: flex; flex-direction: column; gap: 12px;
}
#skinEditorModal .settings-tabs { position: sticky; top: 0; background: rgba(7,8,13,0.95); padding: 6px 0; z-index: 2; }
#skinEditorModal .creator-panel { background: rgba(20,24,36,0.7); border: 1px solid #232838; border-radius: 14px; padding: 16px; }
#skinEditorModal .preset-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
#skinEditorModal .preset-card {
    background: #141824; border: 1px solid #2a3042; border-radius: 12px;
    padding: 10px; cursor: pointer; transition: transform 0.12s, border-color 0.12s;
}
#skinEditorModal .preset-card:hover { transform: translateY(-2px); border-color: #ff9a3c; }
#skinEditorModal .preset-swatches { display: flex; gap: 5px; margin-bottom: 8px; }
#skinEditorModal .preset-swatches span { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.2); }
#skinEditorModal .preset-label { font-size: 0.8rem; color: #e8ecf4; font-weight: 600; }
#skinEditorModal .skin-section {
    background: #12151f; border: 1px solid #232838; border-radius: 10px; padding: 10px 12px;
}
#skinEditorModal .skin-section label { color: #ffb35c; font-size: 0.72rem; letter-spacing: 0.08em; }
#skinEditorModal .skin-section input[type="range"] { width: 100%; accent-color: #ff9a3c; }
#skinEditorModal .skin-section input[type="color"] { height: 38px; }
#skinEditorModal .skin-section select {
    padding: 9px; font-size: 0.9rem; border-radius: 8px;
    background: #0d1017; border: 1px solid #2a3042;
}
#skinEditorModal .skin-editor-footer {
    width: 100%; max-width: 1400px; margin: 0 auto; padding-top: 14px;
    border-top: 1px solid #232838;
}
#skinEditorModal .skin-editor-footer .primary-btn { padding: 13px 34px; font-size: 1rem; }
@media (max-width: 900px) {
    #skinEditorModal .creator-body { grid-template-columns: 1fr; overflow-y: auto; }
    #skinEditorModal .creator-left { min-height: 44vh; }
}

/* ---- Admin tools ---- */
#adminModal {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 1500; pointer-events: auto;
}
.admin-table-wrap { max-height: 46vh; overflow-y: auto; margin-top: 10px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-table th, .admin-table td { padding: 6px 8px; border-bottom: 1px solid #2a3042; text-align: left; }
.admin-table th { color: #8a93a8; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.08em; }
.mini { padding: 4px 10px !important; font-size: 0.7rem !important; margin-right: 6px; }
.admin-text-list { max-height: 46vh; overflow-y: auto; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.admin-text-row { display: grid; grid-template-columns: 220px 1fr; gap: 8px; align-items: center; }
.admin-text-row label { color: #8a93a8; font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-text-row input { width: 100%; padding: 6px 8px; background: #10131c; border: 1px solid #2a3042; border-radius: 6px; color: #fff; }
.secondary-btn.danger { border-color: #7a1f1f; color: #ff8a8a; }

/* ---- Proximity voice chat mic button ---- */
#voiceBtn {
    position: fixed; right: 14px; bottom: 14px; z-index: 45;
    padding: 10px 14px; border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(20,20,28,0.65); color: #fff;
    font-size: 0.75rem; font-weight: bold; cursor: pointer;
}
#voiceBtn.live { background: rgba(30,160,60,0.75); border-color: #7dff9a; }
body.mobile #voiceBtn { bottom: 170px; }

/* Dropped-item marker label */
.drop-label {
    position: absolute;
    transform: translate(-50%, -130%);
    background: rgba(0,0,0,0.65);
    color: #ffd76e;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
    pointer-events: none;
}
