/* Glow.io — Styles */

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

html, body {
    width: 100%;
    height: 100%;
    background: #000;
    overflow: hidden;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: #fff;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

body.playing {
    cursor: none;
    touch-action: none;
}

#gameCanvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Start Screen */
#startScreen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 16px 40px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: radial-gradient(ellipse at center, rgba(0,20,40,0.95) 0%, rgba(0,0,0,0.98) 100%);
    z-index: 10;
}

#startScreen > * {
    flex-shrink: 0;
}

#startScreen.hidden {
    display: none;
}

.game-title {
    font-family: 'Orbitron', 'Segoe UI', Arial, sans-serif;
    font-size: 88px;
    font-weight: 900;
    letter-spacing: 12px;
    color: #fff;
    text-shadow:
        0 0 20px rgba(0, 255, 255, 0.8),
        0 0 40px rgba(0, 255, 255, 0.5),
        0 0 80px rgba(0, 255, 255, 0.3),
        0 0 120px rgba(0, 200, 255, 0.2);
    margin-bottom: 40px;
    user-select: none;
}

.name-input {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 20px;
    color: #fff;
    text-align: center;
    width: 280px;
    margin-bottom: 24px;
    outline: none;
    transition: border-color 0.3s;
}

.name-input:focus {
    border-color: rgba(0, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
}

.name-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Mode Selector */
.mode-selector {
    display: flex;
    flex-direction: row;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(0, 255, 255, 0.15);
    border-radius: 10px;
    padding: 12px 16px;
    width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 90px;
}

.mode-btn:hover {
    background: rgba(0, 255, 255, 0.06);
    border-color: rgba(0, 255, 255, 0.4);
}

.mode-btn-active {
    border-color: rgba(0, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.15);
    background: rgba(0, 255, 255, 0.08);
}

.mode-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 2px;
}

.mode-desc {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
    flex: 1;
}

.mode-btn-active .mode-desc {
    color: rgba(255, 255, 255, 0.6);
}

.mode-rank {
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 255, 255, 0.7);
    margin-top: 2px;
    min-height: 14px;
}

.koth-exit-btn {
    position: fixed;
    top: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 80, 80, 0.4);
    border-radius: 6px;
    padding: 6px 18px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255, 80, 80, 0.7);
    cursor: pointer;
    letter-spacing: 2px;
    transition: all 0.2s;
    z-index: 50;
}

.koth-exit-btn.hidden {
    display: none;
}

.koth-exit-btn:hover {
    background: rgba(255, 50, 50, 0.15);
    border-color: rgba(255, 80, 80, 0.8);
    color: rgba(255, 100, 100, 1);
}

.mode-rank:empty {
    display: none;
}

.play-btn {
    background: linear-gradient(135deg, rgba(0, 255, 200, 0.2), rgba(0, 200, 255, 0.2));
    border: 2px solid rgba(0, 255, 255, 0.6);
    border-radius: 12px;
    padding: 16px 64px;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    letter-spacing: 4px;
    text-transform: uppercase;
    transition: all 0.3s;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
    margin-bottom: 32px;
}

.play-btn:hover {
    background: linear-gradient(135deg, rgba(0, 255, 200, 0.4), rgba(0, 200, 255, 0.4));
    border-color: rgba(0, 255, 255, 1);
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    transform: scale(1.05);
}

.tutorial-btn {
    background: transparent;
    border: 1px solid rgba(0, 255, 255, 0.25);
    border-radius: 6px;
    padding: 6px 24px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 255, 255, 0.5);
    cursor: pointer;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s;
    margin-bottom: 16px;
}

.tutorial-btn:hover {
    border-color: rgba(0, 255, 255, 0.6);
    color: rgba(0, 255, 255, 0.9);
    background: rgba(0, 255, 255, 0.05);
}

.score-info {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin-bottom: 8px;
}

/* Two-column layout: Missions left, How-to-Play right */
.start-columns {
    display: flex;
    gap: 24px;
    width: 90%;
    max-width: 900px;
    margin-top: 16px;
    align-items: flex-start;
}

.start-col-left {
    flex: 0 0 340px;
    min-width: 0;
}

.start-col-right {
    flex: 1;
    min-width: 0;
}

/* Coming Soon Panel */
.coming-soon-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}

.cs-slot {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    opacity: 0.5;
}

.cs-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
    filter: grayscale(1);
}

.cs-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 600;
    letter-spacing: 0.5px;
    flex: 1;
}

.cs-tag {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(0, 200, 255, 0.4);
    background: rgba(0, 200, 255, 0.06);
    border: 1px solid rgba(0, 200, 255, 0.1);
    border-radius: 3px;
    padding: 2px 6px;
    text-transform: uppercase;
}

.how-to-play {
    width: 100%;
}

.htp-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    margin-bottom: 10px;
}

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

.htp-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.htp-heading {
    font-size: 11px;
    font-weight: 700;
    color: rgba(0, 230, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.htp-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    line-height: 1.4;
}

.htp-text b {
    color: rgba(255, 255, 255, 0.85);
}

.htp-best-rank {
    align-items: center;
    justify-content: center;
}

.htp-best-rank-value {
    font-size: 32px;
    font-weight: 900;
    color: #ffcc00;
    text-shadow: 0 0 16px rgba(255, 200, 0, 0.5);
    letter-spacing: 1px;
}

.htp-desktop { display: inline; }
.htp-mobile { display: none; }

@media (pointer: coarse) {
    .htp-desktop { display: none; }
    .htp-mobile { display: inline; }
}

/* Death Screen */
#deathScreen {
    --ui-scale: 1;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.75);
    z-index: 10;
}

#deathScreen.hidden {
    display: none;
}

.death-scroll {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 16px 8px;
    -webkit-overflow-scrolling: touch;
}

.death-scroll::-webkit-scrollbar {
    width: 4px;
}

.death-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.death-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.death-title {
    font-size: calc(48px * var(--ui-scale));
    font-weight: 900;
    color: #ff4444;
    text-shadow:
        0 0 20px rgba(255, 50, 50, 0.6),
        0 0 40px rgba(255, 50, 50, 0.3);
    margin-bottom: 8px;
    letter-spacing: 4px;
    flex-shrink: 0;
}

.death-killer {
    font-size: calc(16px * var(--ui-scale));
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 16px;
    flex-shrink: 0;
}

.death-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    flex-shrink: 0;
}

.death-panel-wide {
    min-width: 540px;
}

.death-summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.death-summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.death-summary-label {
    font-size: calc(9px * var(--ui-scale));
    font-weight: 700;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
}

.death-summary-value {
    font-size: calc(16px * var(--ui-scale));
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.death-summary-kill {
    color: rgba(255, 100, 100, 0.95);
}

.death-summary-survival {
    color: rgba(100, 255, 150, 0.95);
}

.death-summary-final {
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.death-summary-final .death-summary-value {
    color: #ffcc00;
    font-size: calc(18px * var(--ui-scale));
    text-shadow: 0 0 12px rgba(255, 200, 0, 0.4);
}

.hs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: calc(13px * var(--ui-scale));
}

.hs-table thead th {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    font-size: calc(11px * var(--ui-scale));
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: left;
    padding: 0 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hs-table thead th:nth-child(1) { width: 28px; }
.hs-table thead th:nth-child(n+3) { text-align: right; }


.hs-table tbody td {
    padding: 6px 8px;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.hs-rank { color: rgba(255, 255, 255, 0.35); }
.hs-name { color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.hs-score { text-align: right; color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.hs-level { text-align: right; color: rgba(255, 255, 255, 0.5); }
.hs-kills { text-align: right; color: rgba(255, 100, 100, 0.7); }
.hs-time { text-align: right; color: rgba(255, 255, 255, 0.35); }

tr.hs-current td {
    color: rgba(255, 200, 0, 0.95) !important;
    font-weight: 700;
}

tr.hs-current .hs-rank { color: rgba(255, 200, 0, 0.7); }

.death-buttons {
    flex-shrink: 0;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.death-buttons .play-btn {
    margin-bottom: 0;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 32px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}


/* Daily Missions Panel (Menu + Death Screen) */
.daily-missions-panel {
    width: 100%;
    background: rgba(0, 20, 40, 0.7);
    border: 1px solid rgba(0, 200, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
}

.death-missions {
    width: 100%;
    max-width: 500px;
    margin: 16px 0;
    background: rgba(0, 20, 40, 0.7);
    border: 1px solid rgba(0, 200, 255, 0.15);
    border-radius: 8px;
    padding: 12px;
}

.dm-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(0, 200, 255, 0.7);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.dm-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dm-card {
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    border-left: 3px solid transparent;
}

.dm-card.completed {
    border-left-color: #0f6;
    opacity: 0.7;
}

.dm-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dm-icon {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.dm-icon-combat { color: rgba(255, 80, 80, 0.9); }
.dm-icon-collection { color: rgba(0, 200, 255, 0.9); }
.dm-icon-survival { color: rgba(80, 255, 120, 0.9); }

.dm-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    flex: 1;
}

.dm-card-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dm-progress-bar {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.dm-progress-fill {
    height: 100%;
    background: rgba(0, 200, 255, 0.6);
    border-radius: 3px;
    transition: width 0.3s;
}

.dm-card.completed .dm-progress-fill {
    background: rgba(0, 255, 100, 0.6);
}

.dm-progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    min-width: 50px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dm-card.completed .dm-progress-text {
    color: rgba(0, 255, 100, 0.8);
}

.dm-bonus {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-align: center;
    color: rgba(255, 200, 50, 0.8);
}

.dm-bonus.dm-all-complete {
    color: rgba(255, 200, 0, 1);
    text-shadow: 0 0 10px rgba(255, 200, 0, 0.4);
    font-size: 14px;
}

.dm-reset-timer {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    text-align: center;
    margin-top: 4px;
}

.dm-life-gain {
    font-size: 11px;
    color: rgba(0, 200, 255, 0.6);
    margin-left: 4px;
}

.dm-tier-stars {
    font-size: 10px;
    color: rgba(255, 200, 50, 0.85);
    min-width: 42px;
    letter-spacing: 1px;
}

.death-summary-mission {
    color: rgba(255, 200, 50, 0.95);
}

/* Weekly Missions Panel */
.weekly-missions-panel {
    width: 100%;
    margin-top: 8px;
    background: rgba(20, 15, 0, 0.7);
    border: 1px solid rgba(255, 200, 50, 0.2);
    border-radius: 8px;
    padding: 12px;
}

.wm-header {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255, 200, 50, 0.9);
    margin-bottom: 8px;
    text-transform: uppercase;
}

/* Mobile Controls */
#mobileControls {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
}

#joystickZone {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    pointer-events: auto;
    touch-action: none;
}

#joystickBase {
    display: none;
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(0, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#joystickKnob {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.5), rgba(0, 255, 255, 0.15));
    border: 2px solid rgba(0, 255, 255, 0.6);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.3);
}

.mobile-action-btn {
    position: absolute;
    pointer-events: auto;
    touch-action: none;
    border-radius: 50%;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.shoot-action-btn {
    right: 24px;
    bottom: 36px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 80, 80, 0.35), rgba(255, 40, 40, 0.15));
    border: 2px solid rgba(255, 80, 80, 0.5);
    box-shadow: 0 0 20px rgba(255, 60, 60, 0.2);
    font-size: 12px;
}

.shoot-action-btn:active,
.shoot-action-btn.active {
    background: radial-gradient(circle, rgba(255, 80, 80, 0.6), rgba(255, 40, 40, 0.3));
    border-color: rgba(255, 100, 100, 0.8);
    box-shadow: 0 0 30px rgba(255, 60, 60, 0.4);
}

.boost-action-btn {
    right: 120px;
    bottom: 48px;
    width: 64px;
    height: 64px;
    background: radial-gradient(circle, rgba(0, 200, 255, 0.3), rgba(0, 150, 255, 0.1));
    border: 2px solid rgba(0, 200, 255, 0.4);
    box-shadow: 0 0 15px rgba(0, 200, 255, 0.15);
    font-size: 10px;
}

.boost-action-btn:active,
.boost-action-btn.active {
    background: radial-gradient(circle, rgba(0, 200, 255, 0.55), rgba(0, 150, 255, 0.25));
    border-color: rgba(0, 220, 255, 0.8);
    box-shadow: 0 0 25px rgba(0, 200, 255, 0.4);
}

.mobile-desktop-hint {
    display: none;
    font-size: 12px;
    color: rgba(255, 200, 50, 0.7);
    margin-bottom: 12px;
    text-align: center;
    letter-spacing: 1px;
}

@media (pointer: coarse) {
    body.playing #mobileControls {
        display: block;
    }
    .mobile-desktop-hint {
        display: block;
    }
}

/* Responsive scaling for small iframes / viewports */
@media (max-height: 620px) {
    .game-title {
        font-size: 48px;
        letter-spacing: 4px;
        margin-bottom: 16px;
    }
    .name-input {
        padding: 8px 16px;
        font-size: 16px;
        width: 220px;
        margin-bottom: 12px;
    }
    .play-btn {
        padding: 10px 40px;
        font-size: 20px;
        letter-spacing: 3px;
        margin-bottom: 16px;
    }
    .score-info {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .htp-grid { gap: 6px; }
    .htp-item { padding: 6px 10px; }
    .htp-heading { font-size: 10px; }
    .htp-text { font-size: 11px; }
    .start-columns { gap: 16px; }
    .start-col-left { flex: 0 0 280px; }
    .death-scroll {
        padding: 10px 12px 4px;
    }
    .death-title {
        font-size: 24px;
        margin-bottom: 4px;
        letter-spacing: 2px;
    }
    .death-killer {
        font-size: 11px;
        margin-bottom: 8px;
    }
    .death-panel {
        padding: 8px 12px;
    }
    .death-panel-wide {
        min-width: unset;
        max-width: 500px;
    }
    .death-summary {
        gap: 6px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .death-summary-label { font-size: 7px; }
    .death-summary-value { font-size: 12px; }
    .death-summary-final .death-summary-value { font-size: 13px; }
    .hs-table { font-size: 10px; }
    .hs-table thead th { font-size: 8px; padding: 0 4px 4px; }
    .hs-table tbody td { padding: 3px 4px; }
    .death-buttons {
        gap: 10px;
        padding: 8px 12px;
    }
    .death-buttons .play-btn {
        font-size: 18px !important;
        padding: 10px 36px !important;
        margin-bottom: 0;
    }
    .menu-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
}

@media (max-width: 860px) {
    .game-title {
        font-size: 52px;
        letter-spacing: 4px;
        margin-bottom: 20px;
    }
    .name-input {
        width: 220px;
        font-size: 16px;
        padding: 8px 16px;
        margin-bottom: 14px;
    }
    .play-btn {
        padding: 12px 44px;
        font-size: 22px;
        margin-bottom: 20px;
    }
    .start-columns {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .start-col-left {
        flex: none;
        width: 100%;
        max-width: 420px;
    }
    .start-col-right {
        width: 100%;
        max-width: 420px;
    }
    .coming-soon-panel {
        flex-direction: row;
        gap: 8px;
    }
    .cs-slot {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 4px;
        padding: 6px 8px;
    }
}

/* Mobile phone screens */
@media (max-width: 480px) {
    .mode-selector {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-bottom: 14px;
    }
    .mode-btn {
        width: 200px;
        padding: 8px 12px;
    }
    .mode-name {
        font-size: 12px;
    }
    .mode-desc {
        font-size: 10px;
    }
    .daily-missions-panel {
        padding: 8px;
    }
    .death-missions {
        max-width: 320px;
        margin: 10px 0;
        padding: 8px;
    }
    .dm-card {
        padding: 6px 8px;
        gap: 4px;
    }
    .dm-icon {
        font-size: 8px;
    }
    .dm-desc {
        font-size: 11px;
    }
    .dm-progress-text {
        font-size: 10px;
    }
    .dm-tier-stars {
        font-size: 9px;
        min-width: 36px;
    }
    .start-columns {
        flex-direction: column;
        align-items: center;
        gap: 12px;
        width: 95%;
    }
    .start-col-left,
    .start-col-right {
        width: 100%;
        max-width: 320px;
    }
    .coming-soon-panel {
        flex-direction: row;
        gap: 6px;
    }
    .cs-slot {
        flex: 1;
        flex-direction: column;
        text-align: center;
        gap: 2px;
        padding: 5px 4px;
    }
    .cs-icon { font-size: 14px; }
    .cs-label { font-size: 10px; }
    .cs-tag { font-size: 7px; padding: 1px 4px; }

    /* Start Screen */
    .game-title {
        font-size: 36px;
        letter-spacing: 3px;
        margin-bottom: 20px;
        text-shadow:
            0 0 12px rgba(0, 255, 255, 0.6),
            0 0 24px rgba(0, 255, 255, 0.3);
    }
    .name-input {
        width: 200px;
        font-size: 16px;
        padding: 10px 16px;
        margin-bottom: 16px;
    }
    .play-btn {
        padding: 14px 48px;
        font-size: 20px;
        letter-spacing: 3px;
        margin-bottom: 16px;
    }
    .score-info {
        font-size: 11px;
        margin-bottom: 4px;
    }
    .htp-grid { grid-template-columns: 1fr; gap: 6px; }
    .htp-item { padding: 6px 10px; }
    .htp-heading { font-size: 10px; }
    .htp-text { font-size: 11px; }
    .how-to-play { margin-top: 0; }

    /* Start Screen — reduce top padding on small phones */
    #startScreen {
        padding-top: 30px;
    }

    /* Death Screen — mobile */
    .death-scroll {
        padding: 16px 12px 4px;
    }
    .death-title {
        font-size: 24px;
        letter-spacing: 2px;
        margin-bottom: 4px;
    }
    .death-killer {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .death-panel {
        padding: 10px 14px;
        min-width: unset;
        width: 100%;
    }
    .death-panel-wide {
        min-width: unset;
        width: 100%;
        max-width: 320px;
    }
    .death-summary {
        flex-wrap: wrap;
        gap: 8px 12px;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }
    .death-summary-label { font-size: 8px; }
    .death-summary-value { font-size: 13px; }
    .death-summary-final .death-summary-value { font-size: 14px; }
    .death-summary-final {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        border-left: none;
        padding-left: 0;
        padding-top: 6px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }
    .hs-table {
        font-size: 10px;
    }
    .hs-table thead th {
        font-size: 8px;
        letter-spacing: 0.5px;
        padding: 0 3px 5px;
    }
    .hs-table tbody td {
        padding: 3px;
    }

    /* Death buttons */
    .death-buttons {
        padding: 10px 12px;
    }
    .death-buttons .play-btn {
        font-size: 18px !important;
        padding: 12px 32px !important;
        margin-bottom: 0;
    }
    .menu-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

}
