@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    /* Remastered Design Tokens */
    --stone-darker: #0c0b0a;
    --stone-dark: #141210;
    --stone-mid: #1e1a16;
    --stone-light: #2a2520;
    --parchment: #c9b896;
    --parchment-dark: #a89470;
    --gold: #d4a851;
    --gold-light: #e8c872;
    --gold-dark: #b8920e;
    --border-outer: rgba(212, 168, 81, 0.12);
    --border-inner: rgba(212, 168, 81, 0.18);
    --text-light: #e8e2d6;
    --text-mid: #a09888;
    --text-dim: #6a6258;
    --red-dark: #5c2222;
    --red-mid: #7a3030;
    --green-dark: #2a4a2a;
    --green-mid: #3d6b3d;
    --panel-bg: rgba(14, 13, 11, 0.88);
    --panel-border: rgba(212, 168, 81, 0.12);
    --gold-glow: rgba(212, 168, 81, 0.08);
    --radius: 6px;
    --radius-sm: 4px;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-display: 'Cinzel', serif;
    --font-mono: 'JetBrains Mono', monospace;
}

body {
    font-family: var(--font-body);
    background: #0c0b0a;
    color: var(--text-light);
    overflow: hidden;
}

/* ==================== CANVAS CONTAINER ==================== */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: grab;
}

#canvas-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.35) 100%);
}

#canvas-container.rotating {
    cursor: grabbing;
}

/* ==================== TOP BAR ==================== */
#top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-outer);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1100;
}

#game-title {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

#stats-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.phase-indicator {
    padding: 0 14px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    background: var(--stone-light);
    border: 1px solid var(--panel-border);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-sizing: border-box;
}

.stat-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    box-sizing: border-box;
}

.stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-value {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 8px var(--gold);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot.waiting { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.status-dot.playing { background: #4ade80; box-shadow: 0 0 8px #4ade80; }
.status-dot.dead { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.status-dot.winner { background: #fbbf24; box-shadow: 0 0 8px #fbbf24; }

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ==================== SIDE PANEL ==================== */
#side-panel {
    position: fixed;
    top: 60px;
    right: 16px;
    width: 300px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    border-radius: var(--radius);
}

.panel-section {
    padding: 16px;
    border-bottom: 1px solid var(--panel-border);
}

.panel-section:last-child {
    border-bottom: none;
}

.section-title {
    font-family: var(--font-body);
    font-size: 11px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 14px;
    text-align: center;
    position: relative;
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--panel-border);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==================== INPUT STYLING ==================== */
.name-input-section {
    margin-bottom: 16px;
}

.input-label {
    display: block;
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

input[type="text"] {
    width: 100%;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color 0.2s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--gold-dark);
}

input[type="text"]::placeholder {
    color: var(--text-dim);
    font-style: italic;
}

/* ==================== GAME MODE CARDS ==================== */
#game-modes-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-mode-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.game-mode-card:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--gold-dark);
}

.game-mode-card.selected {
    background: rgba(212, 168, 81, 0.1);
    border-color: var(--gold);
    box-shadow: inset 0 0 20px rgba(212, 168, 81, 0.1);
}

.game-mode-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-mode-card.disabled:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--border-inner);
}

.mode-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.mode-icon {
    width: 36px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
}

.mode-icon svg {
    width: 18px;
    height: 18px;
    fill: var(--gold);
}

.mode-info {
    flex: 1;
}

.mode-name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2px;
}

.mode-description {
    font-size: 11px;
    color: var(--text-dim);
}

.mode-fee {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 700;
    color: var(--gold);
}

.mode-stats {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.mode-stat {
    font-size: 11px;
    color: var(--text-dim);
}

.mode-stat .stat-text {
    color: var(--text-mid);
    font-weight: 600;
}

.mode-stat.timer-stat {
    flex: 1;
    text-align: right;
}

.mode-stat.timer-stat .stat-text {
    color: var(--text-dim);
}

.mode-stat.timer-stat .stat-text.countdown {
    color: #4ade80;
    font-family: var(--font-mono);
    font-weight: 700;
}

/* Mode lobby info container */
.mode-lobby-info {
    margin-top: 8px;
}

/* Prize Row */
.mode-prize-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    margin-top: 8px;
    background: var(--gold-glow);
    border: 1px solid rgba(212, 168, 81, 0.15);
    border-radius: var(--radius-sm);
}

.mode-prize-label {
    font-size: 10px;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.mode-prize-value {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
}

/* Live Game Indicator */
.mode-live-game {
    display: none;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 10px 12px;
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: var(--radius-sm);
}

.game-mode-card.has-live-game .mode-live-game {
    display: flex;
}

.game-mode-card.has-live-game .mode-lobby-info {
    display: none;
}

.game-mode-card.has-live-game {
    opacity: 0.7;
    cursor: not-allowed;
}

.game-mode-card.has-live-game:hover {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--border-inner);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: live-pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

@keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

.live-text {
    font-size: 11px;
    color: #4ade80;
    font-weight: 600;
}

.live-next {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-dim);
}

.live-next span {
    color: var(--text-mid);
    font-family: var(--font-mono);
}

.mode-progress {
    display: none;
}

/* ==================== QUEUE STATUS ==================== */
#queue-status {
    margin-top: 0;
}

.queued-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(74, 222, 128, 0.08);
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.queued-icon {
    width: 26px;
    height: 26px;
    background: var(--green-mid);
    border: 1px solid var(--green-dark);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.queued-info {
    flex: 1;
}

.queued-title {
    font-size: 9px;
    color: #4ade80;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.queued-mode {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--text-light);
    font-weight: 600;
}

.leave-queue-btn {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #ef4444 !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.leave-queue-btn:hover {
    background: rgba(239, 68, 68, 0.3) !important;
}

.queue-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.queue-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
}

.queue-detail-item.highlight {
    background: rgba(212, 168, 81, 0.1);
    border-color: rgba(212, 168, 81, 0.2);
}

.queue-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.queue-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-light);
}

.queue-value.timer {
    font-family: var(--font-mono);
    color: #4ade80;
}

.queue-value.gold {
    color: var(--gold);
    font-family: var(--font-body);
}

/* ==================== BUTTONS ==================== */
button {
    width: 100%;
    padding: 9px 16px;
    background: rgba(28, 25, 22, 0.9);
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 6px;
}

button:last-child {
    margin-bottom: 0;
}

button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--gold-dark);
}

button:active:not(:disabled) {
    transform: translateY(1px);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button.primary {
    background: rgba(61, 107, 61, 0.8);
    border-color: rgba(74, 222, 128, 0.2);
}

button.primary:hover:not(:disabled) {
    background: rgba(77, 139, 77, 0.9);
}

button.danger {
    background: rgba(122, 48, 48, 0.8);
    border-color: rgba(239, 68, 68, 0.2);
}

button.danger:hover:not(:disabled) {
    background: rgba(138, 64, 64, 0.9);
}

/* Dev Section */
#dev-controls {
    background: rgba(0,0,0,0.2);
}

#dev-controls .section-title {
    font-size: 9px;
    color: var(--text-dim);
    margin-bottom: 10px;
}

#dev-controls button {
    font-size: 9px;
    padding: 8px 12px;
    margin-bottom: 4px;
}

/* ==================== GAME CONTROLS (Active Game) ==================== */
#game-controls {
    display: none;
}

.timer-display {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.timer-item {
    flex: 1;
    padding: 10px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    text-align: center;
}

.timer-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.timer-value {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
}

.timer-value.warning {
    color: #fb923c;
}

.timer-value.critical {
    color: #ef4444;
    animation: pulse-critical 0.5s ease-in-out infinite;
}

@keyframes pulse-critical {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ==================== INFO PANEL ==================== */
#info-panel {
    position: fixed;
    bottom: 72px;
    left: 12px;
    width: 280px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    padding: 14px;
}

.info-title {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--gold);
    letter-spacing: 1px;
}

.toggle-btn {
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid var(--border-inner) !important;
    color: var(--text-dim) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.toggle-btn:hover {
    color: var(--text-light) !important;
}

.info-subtitle {
    font-size: 10px;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 12px 0 10px 0;
}

.info-content {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item {
    padding: 7px 10px;
    background: rgba(0, 0, 0, 0.12);
    border-left: 2px solid var(--panel-border);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.4;
}

.info-highlight {
    color: var(--gold);
    font-weight: 600;
}

.info-item.info-note {
    margin-top: 8px;
    padding: 10px;
    background: rgba(212, 168, 81, 0.08);
    border-left-color: var(--gold-dark);
    font-style: italic;
    color: var(--text-mid);
}

/* ==================== BOTTOM HUD ==================== */
#bottom-hud {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

#bottom-hud.collapsed {
    padding: 0;
}

#bottom-hud-content {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 20px;
    transition: all 0.3s ease;
}

#bottom-hud.collapsed #bottom-hud-content {
    width: 0;
    padding: 0;
    opacity: 0;
    overflow: hidden;
}

.control-hint {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hint-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hint-key {
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
}

.hint-text {
    font-size: 11px;
    color: var(--text-dim);
}

.bottom-toggle {
    padding: 10px 12px !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    border-left: 1px solid var(--border-inner) !important;
    background: transparent !important;
    margin: 0 !important;
}

#bottom-hud.collapsed .bottom-toggle {
    border-left: none !important;
    padding: 10px 14px !important;
}

/* ==================== MODALS ==================== */
#game-over-modal,
#victory-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

#game-over-modal.show,
#victory-modal.show,
#draw-modal.show {
    display: flex;
}

.modal-content,
.victory-modal-content {
    border-radius: var(--radius);
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    box-shadow: 
        0 16px 64px rgba(0, 0, 0, 0.8);
    padding: 40px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    max-height: 90vh;
    overflow-y: auto;
}

.victory-modal-content::-webkit-scrollbar {
    width: 8px;
}

.victory-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.victory-modal-content::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 81, 0.4);
    border-radius: 4px;
}

.victory-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 81, 0.6);
}

.modal-title {
    font-family: var(--font-body);
    font-size: 36px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.modal-title.death {
    color: #ef4444;
}

.modal-title.victory {
    color: var(--gold-light);
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.modal-stat {
    padding: 14px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
}

.modal-stat-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.modal-stat-value {
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}

/* Victory Specific */
.victory-crown {
    font-size: 48px;
    margin-bottom: 8px;
}

.victory-title {
    font-family: var(--font-body);
    font-size: 42px;
    font-weight: 700;
    color: var(--gold-light);
    letter-spacing: 4px;
    margin-bottom: 8px;
}

.victory-subtitle {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 24px;
}

.victory-winner-card {
    padding: 18px;
    background: rgba(212, 168, 81, 0.08);
    border: 1px solid rgba(212, 168, 81, 0.3);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.winner-label {
    font-size: 9px;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.winner-name {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 12px;
}

.winner-prize {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.prize-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.prize-amount {
    font-family: var(--font-body);
    font-size: 32px;
    font-weight: 700;
    color: #4ade80;
}

.victory-stats-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.victory-stat {
    flex: 1;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
}

.victory-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 2px;
}

.victory-stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.victory-leaderboard {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 20px;
    max-height: 180px;
    overflow-y: auto;
}

.leaderboard-title {
    font-family: var(--font-body);
    font-size: 10px;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    gap: 10px;
    background: rgba(255,255,255,0.02);
}

.leaderboard-entry.winner {
    background: rgba(212, 168, 81, 0.1);
    border: 1px solid rgba(212, 168, 81, 0.2);
}

.leaderboard-entry.top-three {
    background: rgba(251, 191, 36, 0.05);
}

.leaderboard-rank {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dim);
    min-width: 28px;
}

.leaderboard-entry.winner .leaderboard-rank {
    color: var(--gold);
}

.leaderboard-name {
    flex: 1;
    font-size: 13px;
    color: var(--text-mid);
    text-align: left;
}

.leaderboard-entry.winner .leaderboard-name {
    color: var(--text-light);
    font-weight: 600;
}

.leaderboard-prize {
    font-size: 12px;
    color: #4ade80;
    font-weight: 600;
}

.leaderboard-day {
    font-size: 11px;
    color: var(--text-dim);
}

/* ==================== DRAW MODAL ==================== */
#draw-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.draw-content .victory-crown {
    font-size: 48px;
    margin-bottom: 8px;
}

.draw-title {
    color: #60a5fa !important;
    letter-spacing: 6px;
}

.draw-players-card {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
    max-height: 300px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.draw-players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.draw-players-list::-webkit-scrollbar {
    width: 6px;
}

.draw-players-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.draw-players-list::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.4);
    border-radius: 3px;
}

.draw-players-list::-webkit-scrollbar-thumb:hover {
    background: rgba(96, 165, 250, 0.6);
}

.draw-player-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.draw-player-name {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-light);
}

.draw-player-you {
    font-size: 10px;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.draw-info {
    background: rgba(96, 165, 250, 0.08);
    border: 1px solid rgba(96, 165, 250, 0.15);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 20px;
}

.draw-info p {
    font-size: 12px;
    color: var(--text-mid);
    margin: 0;
}

/* ==================== TRANSITION OVERLAY ==================== */
#transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, var(--stone-dark) 0%, #000 100%);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

#transition-overlay.show {
    display: flex;
}

.transition-text {
    font-family: var(--font-body);
    font-size: 32px;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(212, 168, 81, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ==================== TOOLTIPS ==================== */
#tombstone-tooltip,
#player-tooltip {
    display: none;
    position: fixed;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    pointer-events: none;
    z-index: 2500;
    min-width: 160px;
}

#player-tooltip {
    border-color: rgba(74, 222, 128, 0.4);
}

/* ==================== MOBILE WARNING ==================== */
#mobile-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    background: var(--panel-bg);
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.mobile-warning-bg {
    display: none;
}

.mobile-warning-content {
    max-width: 320px;
    text-align: center;
}

.mobile-warning-header {
    margin-bottom: 32px;
}

.mobile-logo-mark {
    margin-bottom: 16px;
}

.mobile-logo-text {
    font-family: var(--font-body);
    font-size: 22px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 4px;
}

.mobile-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: var(--border-inner);
}

.divider-ornament {
    color: var(--gold-dark);
    font-size: 10px;
}

.mobile-message {
    margin-bottom: 24px;
}

.mobile-title {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 8px;
}

.mobile-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    line-height: 1.6;
}

.mobile-requirements {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    padding: 4px 0;
    margin-bottom: 24px;
}

.requirement-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.requirement-row:last-child {
    border-bottom: none;
}

.requirement-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
}

.requirement-value {
    font-size: 12px;
    color: var(--text-mid);
}

.mobile-cta {
    padding: 20px;
    background: rgba(212, 168, 81, 0.05);
    border: 1px solid rgba(212, 168, 81, 0.2);
    border-radius: var(--radius-sm);
    margin-bottom: 24px;
}

.cta-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.cta-url {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--gold);
    letter-spacing: 2px;
}

.mobile-footer {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-line {
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.05);
}

.footer-text {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Mobile Detection */
@media (max-width: 768px), (max-height: 500px) {
    #mobile-warning { display: flex; }
    #canvas-container, #top-bar, #side-panel, #info-panel, #bottom-hud,
    #transition-overlay, #game-over-modal, #victory-modal,
    #tombstone-tooltip, #player-tooltip { display: none !important; }
}

@media (hover: none) and (pointer: coarse) {
    #mobile-warning { display: flex; }
    #canvas-container, #top-bar, #side-panel, #info-panel, #bottom-hud,
    #transition-overlay, #game-over-modal, #victory-modal,
    #tombstone-tooltip, #player-tooltip { display: none !important; }
}

/* ==================== KILL FEED ==================== */
#kill-feed {
    position: fixed;
    bottom: 100px;
    right: 16px;
    width: 280px;
    max-height: 200px;
    pointer-events: none;
    z-index: 900;
    overflow: hidden;
}

#kill-feed-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kill-feed-item {
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.7);
    border-left: 2px solid var(--gold-dark);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12px;
    color: var(--text-mid);
    animation: feed-slide-in 0.3s ease-out;
    backdrop-filter: blur(4px);
}

.kill-feed-item.death {
    border-left-color: #ef4444;
}

.kill-feed-item.day {
    border-left-color: var(--gold);
    background: rgba(212, 168, 81, 0.15);
}

.kill-feed-item.curse {
    border-left-color: #8b008b;
}

.kill-feed-item .player-name {
    color: var(--text-light);
    font-weight: 600;
}

.kill-feed-item .highlight {
    color: var(--gold);
    font-weight: 600;
}

.kill-feed-item.fade-out {
    animation: feed-fade-out 0.5s ease-out forwards;
}

@keyframes feed-slide-in {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes feed-fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* ==================== MOVE REMINDER ==================== */
#move-reminder {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1500;
    display: none;
    animation: reminder-slide-in 0.3s ease-out;
}

#move-reminder.show {
    display: block;
}

.reminder-content {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(80, 50, 15, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 168, 81, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    padding: 12px 20px;
    border-radius: var(--radius);
}

.reminder-icon {
    font-size: 20px;
}

.reminder-text {
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--gold-light);
    font-weight: 600;
}

.reminder-close {
    background: transparent;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 16px;
    transition: color 0.2s;
}

.reminder-close:hover {
    color: var(--text-light);
}

@keyframes reminder-slide-in {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* ==================== PLAYERS PANEL ==================== */
#players-panel {
    position: fixed;
    top: 56px;
    left: 0;
    width: 310px;
    height: calc(100vh - 56px);
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--panel-border);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    z-index: 1200;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

#players-panel.show {
    transform: translateX(0);
}

.players-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--panel-border);
}

.players-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
}

.players-icon {
    font-size: 20px;
}

.players-close {
    background: transparent;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.players-close:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
    color: #ef4444;
}

.players-panel-stats {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-inner);
}

.players-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.players-stat-value {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
}

.players-stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.players-panel-filters {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-inner);
}

.players-filter {
    flex: 1 1 0;
    min-width: 0;
    padding: 8px 12px;
    height: 30px;
    border-radius: var(--radius-sm);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-inner);
    color: var(--text-dim);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.players-filter:hover {
    background: rgba(212, 168, 81, 0.1);
    border-color: var(--gold-dark);
    color: var(--text-mid);
}

.players-filter.active {
    background: rgba(212, 168, 81, 0.15);
    border-color: var(--gold);
    color: var(--gold);
}

.players-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    padding-right: 8px;
}

.players-list::-webkit-scrollbar {
    width: 8px;
}

.players-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.players-list::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 81, 0.4);
    border-radius: 4px;
}

.players-list::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 81, 0.6);
}

.player-card {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: var(--radius-sm);
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0.1) 100%);
    border: 1px solid var(--border-inner);
    transition: all 0.2s;
    cursor: pointer;
}

.player-card:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0.15) 100%);
    border-color: var(--gold-dark);
    transform: translateX(4px);
}

.player-card:active {
    transform: translateX(2px);
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.2) 100%);
}

.player-card.dead {
    opacity: 0.6;
}

.player-card.hero {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(212, 168, 81, 0.1) 0%, rgba(0,0,0,0.15) 100%);
}

.player-card-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-right: 12px;
    border: 1px solid var(--panel-border);
}

.player-card.dead .player-card-avatar {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.player-card:not(.dead) .player-card-avatar {
    background: rgba(74, 222, 128, 0.2);
    border-color: #4ade80;
}

.player-card.hero .player-card-avatar {
    background: rgba(212, 168, 81, 0.3);
    border-color: var(--gold);
}

.player-card-info {
    flex: 1;
    min-width: 0;
}

.player-card-name {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-card.dead .player-card-name {
    color: var(--text-dim);
    text-decoration: line-through;
}

.player-card.hero .player-card-name {
    color: var(--gold);
}

.player-card-details {
    display: flex;
    gap: 12px;
    font-size: 11px;
}

.player-card-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-dim);
}

.player-card-detail.moved {
    color: #4ade80;
}

.player-card-detail.not-moved {
    color: #f59e0b;
}

.player-card-detail.dead {
    color: #ef4444;
}

.player-card-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.player-status-badge {
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.player-status-badge.alive {
    background: rgba(74, 222, 128, 0.2);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.player-status-badge.dead {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.player-status-badge.you {
    background: rgba(212, 168, 81, 0.2);
    color: var(--gold);
    border: 1px solid rgba(212, 168, 81, 0.3);
}

.player-survived-days {
    font-size: 10px;
    color: var(--text-dim);
}

.players-list-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-dim);
}

.players-list-empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.players-list-empty-text {
    font-size: 13px;
}

/* ==================== DAY TRANSITION ==================== */
#day-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#day-transition-overlay.show {
    display: flex;
    opacity: 1;
}

.day-transition-content {
    text-align: center;
    animation: day-zoom-in 0.5s ease-out;
}

.day-transition-number {
    font-family: var(--font-body);
    font-size: 72px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 
        0 0 40px rgba(212, 168, 81, 0.5),
        0 4px 8px rgba(0, 0, 0, 0.8);
    letter-spacing: 8px;
    margin-bottom: 16px;
}

.day-transition-subtitle {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 24px;
    letter-spacing: 2px;
}

.day-transition-survivors {
    font-size: 14px;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 3px;
}

@keyframes day-zoom-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); }
::-webkit-scrollbar-thumb { background: rgba(212, 168, 81, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dark); }

/* ==================== WALLET CONNECTION ==================== */

/* Connect Wallet Button (disconnected state) */
.connect-wallet-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 30px;
    background: rgba(212, 168, 81, 0.15);
    border: 1px solid rgba(212, 168, 81, 0.4);
    border-radius: var(--radius-sm);
    color: var(--stone-darker);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    width: auto;
    box-sizing: border-box;
}

.connect-wallet-btn:hover {
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 168, 81, 0.3);
}

.connect-wallet-btn svg {
    width: 14px;
    height: 14px;
    fill: var(--gold);
}

/* Connected Wallet Display */
.wallet-connected {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wallet-balance {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    box-sizing: border-box;
}

.wallet-balance svg {
    width: 14px;
    height: 14px;
    fill: var(--gold);
}

.balance-amount {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
}

.balance-currency {
    font-size: 11px;
    color: var(--text-dim);
    margin-left: 2px;
}

/* User Account Button */
.user-account {
    position: relative;
}

.user-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    border: 1px solid var(--panel-border);
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    width: auto;
    box-sizing: border-box;
}

.user-account-btn:hover {
    border-color: var(--gold-dark);
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    border: 1px solid var(--gold);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar svg {
    width: 14px;
    height: 14px;
    fill: var(--stone-darker);
}

.user-name {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Champion/Victory styling for players with wins */
.user-name.champion {
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 168, 81, 0.5);
}

.user-name.champion::before {
    content: attr(data-crown) ' ';
}

.user-name.champion::after {
    content: ' (' attr(data-wins) ')';
    font-size: 10px;
    color: var(--gold-dark);
}

.user-account-btn.champion {
    border-color: var(--gold-dark);
    background: linear-gradient(135deg, rgba(212, 168, 81, 0.15), rgba(0, 0, 0, 0.4));
    box-shadow: 0 0 15px rgba(212, 168, 81, 0.2);
}

.user-account-btn.champion:hover {
    border-color: var(--gold);
    box-shadow: 0 0 20px rgba(212, 168, 81, 0.3);
}

.dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--text-dim);
    transition: transform 0.2s ease;
}

.user-account.open .dropdown-arrow {
    transform: rotate(180deg);
}

.account-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.6);
    z-index: 20000;
    display: none;
}

.user-account.open .account-dropdown {
    display: block;
}

.dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.2);
}

.dropdown-wallet-address {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    word-break: break-all;
}

.dropdown-menu {
    padding: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.15s ease;
    margin: 0;
}

.dropdown-item:hover {
    background: rgba(212, 168, 81, 0.1);
    color: var(--text-light);
}

.dropdown-item svg {
    width: 14px;
    height: 14px;
    fill: var(--text-dim);
}

.dropdown-item:hover svg {
    fill: var(--gold);
}

.dropdown-item.danger {
    color: #ef4444;
}

.dropdown-item.danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.dropdown-item.danger svg {
    fill: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-inner);
    margin: 4px 0;
}

/* ==================== WELCOME MODAL ==================== */
#welcome-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

#welcome-modal.show {
    display: flex;
}

.welcome-modal-content {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: 
        0 16px 64px rgba(0, 0, 0, 0.8);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.welcome-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px auto;
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    border: 1px solid var(--gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-icon svg {
    width: 32px;
    height: 32px;
    fill: var(--stone-darker);
}

.welcome-title {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
}

.welcome-subtitle {
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 24px;
    line-height: 1.5;
}

.welcome-wallet-info {
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.welcome-wallet-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.welcome-wallet-address {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-mid);
}

.welcome-name-section {
    margin-bottom: 24px;
}

.welcome-name-section .input-label {
    text-align: left;
    margin-bottom: 8px;
}

.welcome-name-section input[type="text"] {
    font-size: 16px;
    padding: 12px 14px;
    text-align: center;
}

.welcome-name-hint {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 8px;
}

.welcome-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-buttons .primary {
    font-size: 13px;
    padding: 12px 20px;
}

/* ==================== CONNECTING STATE ==================== */
.connecting-wallet-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: not-allowed;
    margin: 0;
    width: auto;
}

.spinner {
    width: 14px;
    height: 14px;
    border: 1px solid var(--panel-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== WALLET SELECT MODAL ==================== */
#wallet-select-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

#wallet-select-modal.show {
    display: flex;
}

.wallet-select-content {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: 
        0 16px 64px rgba(0, 0, 0, 0.8);
    padding: 32px;
    max-width: 360px;
    width: 90%;
}

.wallet-select-title {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 700;
    color: var(--gold);
    text-align: center;
    margin-bottom: 8px;
}

.wallet-select-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    text-align: center;
    margin-bottom: 20px;
}

.wallet-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.wallet-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin: 0;
}

.wallet-option:hover {
    background: rgba(212, 168, 81, 0.1);
    border-color: var(--gold-dark);
}

.wallet-option-icon {
    width: 36px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wallet-option-icon.phantom {
    background: linear-gradient(135deg, #ab9ff2 0%, #7c3aed 100%);
}

.wallet-option-icon.solflare {
    background: linear-gradient(135deg, #fc8c03 0%, #e55b00 100%);
}

.wallet-option-icon.backpack {
    background: linear-gradient(135deg, #e33e3f 0%, #b91c1c 100%);
}

.wallet-option-name {
    flex: 1;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    text-align: left;
}

.wallet-option-status {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wallet-option-status.detected {
    color: #4ade80;
}

.wallet-select-cancel {
    width: 100%;
    font-size: 11px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--border-inner);
    color: var(--text-dim);
}

.wallet-select-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-light);
}

/* ==================== CHARACTER SELECTOR ==================== */
#character-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 12px 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
}

.char-nav-btn {
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.char-nav-btn:hover {
    background: rgba(212, 168, 81, 0.2);
    border-color: var(--gold-dark);
    transform: scale(1.1);
}

.char-nav-btn:active {
    transform: scale(0.95);
}

.char-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.char-preview {
    width: 100px;
    height: 100px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.char-preview canvas {
    width: 100% !important;
    height: 100% !important;
}

.char-name {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.char-dots {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 16px;
    max-width: 180px;
    margin-left: auto;
    margin-right: auto;
}

.char-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--border-inner);
    cursor: pointer;
    transition: all 0.2s ease;
}

.char-dot:hover {
    background: rgba(212, 168, 81, 0.4);
}

.char-dot.active {
    background: var(--gold);
    border-color: var(--gold);
    box-shadow: 0 0 8px var(--gold);
}

/* ==================== HELP MODALS (How to Play & Controls) ==================== */
#how-to-play-modal,
#controls-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(4px);
}

#how-to-play-modal.show,
#controls-modal.show {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.help-modal-content {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: 
        0 24px 80px rgba(0, 0, 0, 0.9);
    max-width: 480px;
    width: 90%;
    animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.help-modal-header {
    padding: 24px 28px 18px;
    text-align: center;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.1);
}

.help-modal-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.help-modal-title {
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    margin-bottom: 6px;
}

.help-modal-subtitle {
    font-size: 12px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.help-modal-body {
    padding: 24px 28px;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--panel-border);
    transition: all 0.2s ease;
}

.help-step:hover {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: var(--gold-dark);
}

.help-step-number {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold-dark) 0%, var(--gold) 100%);
    color: var(--stone-darker);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.help-step-text {
    font-size: 13px;
    color: var(--text-mid);
    line-height: 1.5;
    padding-top: 3px;
}

.help-highlight {
    color: var(--gold);
    font-weight: 600;
}

.help-highlight-danger {
    color: #ef4444;
    font-weight: 600;
}

.help-note {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--gold-glow);
    border: 1px solid rgba(212, 168, 81, 0.15);
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: var(--text-mid);
    line-height: 1.4;
}

.help-note-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.help-modal-footer {
    padding: 20px 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--panel-border);
    background: rgba(0, 0, 0, 0.1);
}

.help-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-dim);
    cursor: pointer;
    user-select: none;
}

.help-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
    cursor: pointer;
}

.help-checkbox-label:hover {
    color: var(--text-mid);
}

.help-modal-footer .primary {
    padding: 10px 28px;
    font-size: 12px;
}

/* Controls Grid */
.controls-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border-left: 2px solid var(--panel-border);
    transition: all 0.2s ease;
}

.control-item:hover {
    background: rgba(0, 0, 0, 0.3);
    border-left-color: var(--gold-dark);
}

.control-keys {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.control-keys .key {
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--panel-border);
    border-radius: 3px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-description {
    font-size: 13px;
    color: var(--text-mid);
}

/* Dev Tools Section Additions */
.dev-divider {
    height: 1px;
    background: var(--border-inner);
    margin: 16px 0 12px 0;
}

button.secondary {
    width: 100%;
    padding: 10px 16px;
    margin-top: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    cursor: pointer;
    transition: all 0.2s ease;
}

button.secondary:hover {
    background: rgba(0, 0, 0, 0.4);
    border-color: var(--gold-dark);
    color: var(--text-light);
}

button.secondary:first-of-type {
    margin-top: 0;
}

/* Hide old floating panels - they've been replaced by modals */
#info-panel,
#bottom-hud {
    display: none !important;
}

/* ==================== SETTINGS PANEL ==================== */

.settings-btn {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius-sm);
    color: var(--text-mid);
    padding: 0 10px;
    height: 30px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    margin: 0;
    line-height: 1;
}

.settings-btn svg {
    display: block;
    pointer-events: none;
}

.settings-btn:hover {
    background: rgba(212, 168, 81, 0.2);
    border-color: var(--gold-dark);
    color: var(--gold);
}

#settings-panel {
    position: fixed;
    top: 58px;
    right: 16px;
    width: 300px;
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    border: 1px solid var(--border-outer);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(212, 168, 81, 0.1);
    z-index: 1000;
    display: none;
    flex-direction: column;
    max-height: calc(100vh - 100px);
}

#settings-panel.show {
    display: flex;
}

.settings-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid var(--panel-border);
}

.settings-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.settings-icon {
    font-size: 20px;
}

.settings-close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.settings-close-btn:hover {
    color: var(--gold);
}

.settings-section {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-inner);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section-title {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--gold-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.settings-row {
    margin-bottom: 16px;
}

.settings-row:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    font-size: 13px;
    color: var(--text-mid);
    margin-bottom: 8px;
}

.settings-slider {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.1s;
}

.settings-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.settings-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.settings-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-toggle-row .settings-slider {
    flex: 1;
}

.settings-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.settings-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-inner);
    border-radius: 12px;
    transition: all 0.2s;
}

.settings-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-dim);
    border-radius: 50%;
    transition: all 0.2s;
}

.settings-toggle input:checked + .settings-toggle-slider {
    background: rgba(212, 168, 81, 0.3);
    border-color: var(--gold-dark);
}

.settings-toggle input:checked + .settings-toggle-slider:before {
    transform: translateX(20px);
    background: var(--gold);
}

.share-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-inner);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: rgba(29, 161, 242, 0.2);
    border-color: #1da1f2;
    color: #1da1f2;
}

.share-btn svg {
    fill: currentColor;
}
/* ==================== CAREER STATS MODAL ==================== */

#stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#stats-modal.show {
    opacity: 1;
    visibility: visible;
}

.stats-modal-content {
    background: var(--panel-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.stats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-inner);
    position: relative;
}

.stats-modal-header h2 {
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 600;
    color: var(--gold);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.stats-modal-header .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    transition: color 0.2s ease;
    line-height: 1;
}

.stats-modal-header .modal-close:hover {
    color: var(--text-light);
}

.stats-modal-body {
    padding: 20px;
}

.stats-section {
    margin-bottom: 24px;
}

.stats-section:last-child {
    margin-bottom: 0;
}

.stats-section-title {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-inner);
}

.stats-grid-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.stat-item-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-sm);
}

.stat-item-modal.highlight {
    background: rgba(212, 168, 81, 0.1);
    border: 1px solid rgba(212, 168, 81, 0.2);
}

.stat-item-modal.subtle {
    opacity: 0.7;
}

.stat-item-modal .stat-label {
    font-size: 11px;
    color: var(--text-mid);
}

.stat-item-modal .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.stat-item-modal .stat-value.gold {
    color: var(--gold);
}

.stat-item-modal .stat-value.positive {
    color: #4ade80;
}

.stat-item-modal .stat-value.negative {
    color: #ef4444;
}

.stats-modal-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-inner);
    display: flex;
    justify-content: center;
}

.stats-reset-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-sm);
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.6;
}

.stats-reset-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    opacity: 1;
}

/* ==================== PRE-GAME COUNTDOWN ==================== */

#pregame-countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#pregame-countdown-overlay.show {
    opacity: 1;
    visibility: visible;
}

.countdown-content {
    text-align: center;
}

.countdown-number {
    font-family: var(--font-body);
    font-size: 180px;
    font-weight: 700;
    color: var(--gold);
    text-shadow: 0 0 40px rgba(212, 168, 81, 0.8), 0 0 80px rgba(212, 168, 81, 0.4), 0 4px 8px rgba(0, 0, 0, 0.8);
    line-height: 1;
}

.countdown-number.pulse {
    animation: countdownPulse 0.3s ease-out;
}

.countdown-number.final {
    color: #4ade80;
    text-shadow: 0 0 40px rgba(74, 222, 128, 0.8), 0 0 80px rgba(74, 222, 128, 0.4), 0 4px 8px rgba(0, 0, 0, 0.8);
    animation: countdownFinal 0.5s ease-out;
}

@keyframes countdownPulse {
    0% { transform: scale(1.3); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes countdownFinal {
    0% { transform: scale(1.5); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.countdown-text {
    font-family: var(--font-body);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: 8px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.countdown-text.final {
    color: #4ade80;
    letter-spacing: 12px;
    font-size: 36px;
}

/* ==================== DEATH REPLAY ==================== */

#death-replay-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(60, 20, 20, 0.9) 0%, rgba(20, 0, 0, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#death-replay-overlay.show {
    opacity: 1;
    visibility: visible;
}

.death-replay-content {
    text-align: center;
    animation: deathReplaySlideIn 0.5s ease-out;
}

@keyframes deathReplaySlideIn {
    0% { transform: translateY(-30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.death-replay-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: deathIconPulse 1s ease-in-out infinite;
}

@keyframes deathIconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.death-replay-title {
    font-family: var(--font-body);
    font-size: 48px;
    font-weight: 700;
    color: #ef4444;
    text-shadow: 0 0 30px rgba(239, 68, 68, 0.6), 0 4px 8px rgba(0, 0, 0, 0.8);
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.death-replay-cause {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 16px;
    max-width: 500px;
    line-height: 1.5;
}

.death-replay-cause .highlight {
    color: var(--gold);
    font-weight: 600;
}

.death-replay-position {
    font-size: 14px;
    color: var(--text-dim);
    margin-bottom: 8px;
}

.death-replay-hint {
    font-size: 14px;
    color: var(--text-dim);
    font-style: italic;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ==================== MOVEMENT STATUS INDICATOR ==================== */

/* Sidebar version */
.movement-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.movement-status.needs-move {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.movement-status.has-moved {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.4);
}

.movement-status-icon {
    font-size: 18px;
    transition: all 0.3s ease;
}

.movement-status.needs-move .movement-status-icon {
    color: #ef4444;
    animation: pulseWarning 1.5s ease-in-out infinite;
}

.movement-status.has-moved .movement-status-icon {
    color: #4ade80;
}

@keyframes pulseWarning {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

.movement-status-text {
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.movement-status.needs-move .movement-status-text {
    color: #ef4444;
}

.movement-status.has-moved .movement-status-text {
    color: #4ade80;
}

/* Floating HUD version */
.movement-hud {
    position: fixed;
    bottom: 120px;
    left: 20px;
    display: none;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 6px;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.movement-hud.show {
    display: flex;
}

.movement-hud.needs-move {
    background: linear-gradient(135deg, rgba(60, 20, 20, 0.95) 0%, rgba(40, 10, 10, 0.95) 100%);
    border: 2px solid rgba(239, 68, 68, 0.6);
}

.movement-hud.has-moved {
    background: linear-gradient(135deg, rgba(20, 60, 30, 0.95) 0%, rgba(10, 40, 20, 0.95) 100%);
    border: 2px solid rgba(74, 222, 128, 0.6);
}

.movement-hud-icon {
    font-size: 24px;
    transition: all 0.3s ease;
}

.movement-hud.needs-move .movement-hud-icon {
    color: #ef4444;
    animation: pulseWarning 1.5s ease-in-out infinite;
}

.movement-hud.has-moved .movement-hud-icon {
    color: #4ade80;
}

.movement-hud-text {
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.movement-hud.needs-move .movement-hud-text {
    color: #fca5a5;
}

.movement-hud.has-moved .movement-hud-text {
    color: #86efac;
}