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

body {
    font-family: 'VT323', monospace;
    background: #000;
    color: #ff6600;
    overflow: hidden;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #0a0a0a;
    z-index: 1000;
    text-align: center;
    cursor: default;
}

.screen h1 {
    font-size: 6rem;
    color: #ff3300;
    text-shadow: 0 0 20px #ff0000, 0 0 40px #ff0000;
    margin-bottom: 1rem;
    letter-spacing: 0.5rem;
    animation: flicker 3s infinite;
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
    55% { opacity: 1; }
    57% { opacity: 0.9; }
    60% { opacity: 1; }
}

.subtitle {
    font-size: 1.5rem;
    color: #cc4400;
    margin-bottom: 3rem;
    text-shadow: 0 0 10px #ff3300;
}

.instruction {
    font-size: 1.2rem;
    color: #ff6600;
    animation: pulse 2s infinite;
    margin-top: 2rem;
}

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

.controls-info {
    position: absolute;
    bottom: 4rem;
    font-size: 0.9rem;
    color: #884400;
}

.signature {
    position: absolute;
    bottom: 0.5rem;
    font-size: 0.75rem;
    color: #996633;
    opacity: 0.85;
    text-align: center;
    line-height: 1.3;
    text-shadow: 0 0 8px rgba(255, 102, 0, 0.3);
}

.signature p {
    margin: 0.1rem 0;
}

#game-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    max-width: 133.33vh; /* Maintain 4:3 aspect ratio (640:480) */
    max-height: 75vw;
    background: #000;
    cursor: none;
}

#game-canvas {
    display: block;
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

#hud {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 100;
}

.hud-left, .hud-right {
    display: flex;
    gap: 2rem;
}

.hud-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hud-label {
    font-size: 0.7rem;
    color: #884400;
    letter-spacing: 0.1rem;
}

.hud-value {
    font-size: 1.5rem;
    color: #ff6600;
    text-shadow: 0 0 10px #ff3300;
    font-weight: bold;
}

.health-bar {
    width: 150px;
    height: 20px;
    background: #1a0000;
    border: 2px solid #ff3300;
    position: relative;
    margin-top: 0.2rem;
}

.health-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(to right, #ff3300, #ff6600);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px #ff0000;
}

#crosshair {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 50;
}

#crosshair::before,
#crosshair::after {
    content: '';
    position: absolute;
    background: #ff3300;
    box-shadow: 0 0 5px #ff0000;
}

#crosshair::before {
    width: 20px;
    height: 2px;
    top: 9px;
}

#crosshair::after {
    width: 2px;
    height: 20px;
    left: 9px;
}

.score-display {
    font-size: 2rem;
    color: #ff6600;
    margin: 1rem 0;
}

#game-over-title {
    color: #cc0000 !important;
    text-shadow: 0 0 30px #ff0000, 0 0 60px #ff0000 !important;
}

/* Damage flash effect */
@keyframes damage-flash {
    0% { box-shadow: inset 0 0 100px rgba(255, 0, 0, 0.8); }
    100% { box-shadow: none; }
}

.damage-flash {
    animation: damage-flash 0.3s ease-out;
}

/* Menu buttons */
.menu-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.menu-button {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    font-weight: bold;
    color: #ff6600;
    background: rgba(255, 102, 0, 0.1);
    border: 3px solid #ff6600;
    padding: 1rem 3rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    transition: all 0.2s ease;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.3);
}

.menu-button:hover {
    background: rgba(255, 102, 0, 0.3);
    border-color: #ff3300;
    color: #ff3300;
    text-shadow: 0 0 20px rgba(255, 51, 0, 0.8);
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.6);
    transform: scale(1.05);
}

.menu-button:active {
    transform: scale(0.98);
}

/* Release notes panel */
.release-notes-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.release-notes-content-wrapper {
    background: #0a0a0a;
    border: 3px solid #ff6600;
    padding: 2rem;
    max-width: 700px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(255, 102, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.release-notes-content-wrapper h2 {
    font-size: 2rem;
    color: #ff3300;
    text-shadow: 0 0 20px #ff0000;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: 0.3rem;
}

.release-notes-scroll {
    overflow-y: auto;
    margin-bottom: 1.5rem;
    padding-right: 1rem;
}

.release-notes-scroll::-webkit-scrollbar {
    width: 8px;
}

.release-notes-scroll::-webkit-scrollbar-track {
    background: #1a0a0a;
}

.release-notes-scroll::-webkit-scrollbar-thumb {
    background: #ff6600;
    border-radius: 4px;
}

.release-notes-scroll::-webkit-scrollbar-thumb:hover {
    background: #ff3300;
}

.release-entry {
    margin-bottom: 1.5rem;
    text-align: left;
}

.release-version {
    font-size: 1.2rem;
    color: #ff6600;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 102, 0, 0.3);
    display: block;
    margin-bottom: 0.5rem;
}

.release-changes {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.5rem;
}

.release-changes li {
    font-size: 0.9rem;
    color: #cc8866;
    margin: 0.4rem 0;
    text-shadow: 0 0 5px rgba(255, 102, 0, 0.2);
}

.change-type {
    color: #ff6600;
    font-weight: bold;
}

.close-button {
    align-self: center;
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
}

/* Version info */
.version-info {
    position: absolute;
    bottom: 0.5rem;
    font-size: 0.75rem;
    color: #996633;
    opacity: 0.85;
    text-align: center;
    text-shadow: 0 0 8px rgba(255, 102, 0, 0.3);
}

.version-info p {
    margin: 0;
}

/* Setup screen */
.setup-section {
    margin: 2rem 0;
}

.setup-label {
    font-size: 1.3rem;
    color: #ff6600;
    margin-bottom: 1rem;
    letter-spacing: 0.2rem;
    text-shadow: 0 0 15px rgba(255, 102, 0, 0.6);
}

.setup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.setup-button {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: bold;
    color: #996633;
    background: rgba(153, 102, 51, 0.1);
    border: 2px solid #996633;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.15rem;
    transition: all 0.2s ease;
    text-shadow: 0 0 5px rgba(153, 102, 51, 0.3);
    box-shadow: 0 0 10px rgba(153, 102, 51, 0.2);
}

.setup-button:hover {
    background: rgba(255, 102, 0, 0.2);
    border-color: #ff6600;
    color: #ff6600;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
    box-shadow: 0 0 20px rgba(255, 102, 0, 0.4);
}

.setup-button.active {
    background: rgba(255, 102, 0, 0.4);
    border-color: #ff3300;
    color: #ff3300;
    text-shadow: 0 0 15px rgba(255, 51, 0, 0.8);
    box-shadow: 0 0 25px rgba(255, 51, 0, 0.6);
}

.setup-button:disabled {
    background: rgba(50, 50, 50, 0.1);
    border-color: #444444;
    color: #555555;
    cursor: not-allowed;
    text-shadow: none;
    box-shadow: none;
    opacity: 0.5;
}

.setup-button:disabled:hover {
    background: rgba(50, 50, 50, 0.1);
    border-color: #444444;
    color: #555555;
    text-shadow: none;
    box-shadow: none;
}

.mode-description {
    font-size: 0.9rem;
    color: #cc8866;
    margin-top: 0.8rem;
    font-style: italic;
    text-shadow: 0 0 5px rgba(204, 136, 102, 0.3);
}

/* Leaderboard */
.leaderboard-list {
    text-align: left;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    margin: 0.5rem 0;
    background: rgba(255, 102, 0, 0.05);
    border-left: 3px solid #996633;
    gap: 1rem;
}

.leaderboard-entry .rank {
    font-size: 1.1rem;
    color: #ff6600;
    font-weight: bold;
    min-width: 3rem;
}

.leaderboard-entry .score-value {
    font-size: 1.2rem;
    color: #ff3300;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(255, 51, 0, 0.5);
    min-width: 5rem;
}

.leaderboard-entry .score-details {
    font-size: 0.85rem;
    color: #cc8866;
    flex: 1;
}
