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

body {
    background: #1a0a3e;
    overflow: hidden;
    cursor: crosshair;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* ========== LOBBY ========== */

#lobby {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    z-index: 100;
    overflow-y: auto;
    padding: 32px 16px;
    background: radial-gradient(ellipse at center, #1a0a3e 0%, #0d0520 70%);
}

#lobby.hidden {
    display: none;
}

.lobby-panel {
    background: rgba(15, 5, 40, 0.9);
    border: 2px solid rgba(0, 229, 255, 0.3);
    border-radius: 16px;
    padding: 40px 36px;
    text-align: center;
    width: min(400px, 100%);
    max-width: 400px;
    box-shadow: 0 0 60px rgba(0, 229, 255, 0.1), inset 0 0 30px rgba(0, 229, 255, 0.05);
}

.lobby-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 36px;
    color: #00e5ff;
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.6);
    margin-bottom: 4px;
}

.lobby-author {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 18px;
}

.lobby-subtitle {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 4px;
    margin-bottom: 24px;
}

.about-section {
    margin-top: 32px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
    font-family: Arial, sans-serif;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    line-height: 1.45;
}

.about-section h3 {
    margin: 0 0 5px;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    color: rgba(0, 229, 255, 0.78);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.about-section p {
    margin: 0 0 10px;
}

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

#lobby input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    outline: none;
    transition: border-color 0.2s;
    text-transform: uppercase;
}

#lobby input:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 12px rgba(0, 229, 255, 0.2);
}

#lobby input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    text-transform: none;
}

.lobby-btn {
    display: block;
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 8px;
    border: none;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    letter-spacing: 1px;
}

.lobby-btn:hover {
    transform: scale(1.03);
}

.lobby-btn:active {
    transform: scale(0.97);
}

.lobby-btn.solo {
    background: linear-gradient(135deg, #00e5ff, #0088cc);
    color: #000;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.lobby-btn.test {
    background: linear-gradient(135deg, #ffee33, #ff8c2d);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 190, 45, 0.3);
}

.lobby-btn.challenge {
    background: linear-gradient(135deg, #ff2d7b, #b44dff);
    color: #fff;
    box-shadow: 0 0 20px rgba(180, 77, 255, 0.3);
}

.lobby-btn.create {
    background: linear-gradient(135deg, #7dff2d, #44aa00);
    color: #000;
    box-shadow: 0 0 20px rgba(125, 255, 45, 0.3);
}

.lobby-btn.join {
    background: linear-gradient(135deg, #ffd700, #cc9900);
    color: #000;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.lobby-btn.start {
    background: linear-gradient(135deg, #ff2d7b, #cc0044);
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 45, 123, 0.3);
    margin-top: 12px;
}

.lobby-btn.leave {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 8px;
}

.lobby-btn.leave:hover {
    border-color: #ff4444;
    color: #ff4444;
}

.lobby-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 16px 0;
}

.room-code-display {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 28px;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 16px;
    letter-spacing: 6px;
}

#player-list {
    text-align: left;
    margin-bottom: 8px;
}

.player-entry {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}

.player-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.player-host-badge {
    font-size: 10px;
    color: #ffd700;
    margin-left: auto;
}

.color-picker-label {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 3px;
    margin-bottom: 8px;
}

.color-picker {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.2s, opacity 0.2s;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.selected {
    border-color: #fff;
    box-shadow: 0 0 15px var(--swatch-color);
    transform: scale(1.1);
}

.color-swatch.taken {
    opacity: 0.2;
    cursor: not-allowed;
}

.color-swatch.taken:hover {
    transform: none;
}

.lobby-error {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #ff4444;
    margin-top: 12px;
    min-height: 16px;
}
