body {
    background-color: #1a120b;
    color: #d4a373;
    font-family: 'Courier New', Courier, monospace;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    margin: 0;
    overflow: hidden;
}

#game-container {
    width: 100vw;
    height: 100vh;
    text-align: center;
    background: radial-gradient(circle, #3c2a21 0%, #1a120b 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

canvas {
    background-color: #000;
    display: block;
    width: 100%;
    height: 100%;
}

#ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.screen-title {
    font-size: 5vw;
    margin-bottom: 20px;
    color: #cd7f32; /* Bronze */
    text-shadow: 2px 2px 4px #000;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.screen-text {
    font-size: 2vw;
    color: #fff;
    text-shadow: 0 0 10px #cd7f32;
    margin-bottom: 10px;
}

.blink {
    animation: blink-animation 1s steps(2, start) infinite;
}

@keyframes blink-animation {
    to {
        visibility: hidden;
    }
}

.ship-selector {
    display: flex;
    gap: 20px;
    pointer-events: auto; /* Allow clicking */
    margin-top: 30px;
}

.ship-option {
    border: 2px solid transparent;
    padding: 10px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.3s;
}

.ship-option:hover, .ship-option.selected {
    border-color: #cd7f32;
    background: rgba(205, 127, 50, 0.2);
}

.ship-option img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

/* In-game UI */
.hud {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: bold;
    color: #cd7f32;
    pointer-events: none;
    text-shadow: 2px 2px 2px #000;
}

/* High Score System Styles */
.high-score-list-container {
    height: 400px;
    overflow: hidden;
    position: relative;
    width: 95%; /* Widened container */
    margin: 20px auto;
    border: 2px solid #cd7f32;
    background: rgba(0,0,0,0.95);
}

.high-score-list {
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.high-score-item {
    display: grid;
    /* Fixed widths for Rank and Score, middle for Name */
    grid-template-columns: 100px 1fr 280px;
    font-size: 32px;
    color: #fff;
    margin-bottom: 20px;
    text-align: left;
    border-bottom: 1px solid #3c2a21;
    padding: 10px;
    white-space: nowrap;
    align-items: center;
}

.high-score-item .name {
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 20px;
}

.high-score-item .rank { color: #cd7f32; }
.high-score-item .score { color: #ffff00; text-align: right; }

.high-score-item.new-entry-highlight {
    background: rgba(255, 255, 0, 0.2);
    border: 2px solid #ffff00;
    box-shadow: 0 0 20px #ffff00;
    color: #ffff00;
    transform: scale(1.05);
}

/* Wheel Entry Styles */
.name-display {
    font-size: 48px;
    color: #00ff00;
    font-family: monospace;
    letter-spacing: 10px;
    margin: 30px 0;
    background: #222;
    padding: 10px 20px;
    border-radius: 10px;
}

.char-wheel-container {
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.wheel-char {
    font-size: 60px;
    height: 80px;
    line-height: 80px;
    color: #fff;
    transition: all 0.15s ease-out;
    backface-visibility: hidden;
    position: absolute; /* Stacked for 3D rotation */
}

.wheel-char.selected {
    color: #ffff00;
    font-weight: bold;
    text-shadow: 0 0 30px #ffff00;
    z-index: 10;
}

.cursor {
    display: inline-block;
    color: #00ff00;
    animation: blink-animation 0.5s steps(2, start) infinite;
}
