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

body {
    font-family: 'Courier New', monospace;
    background: #000;
    color: #0f0;
    overflow: hidden;
}

.screen {
    width: 100vw;
    height: 100vh;
}

/* Auth Screen */
#auth-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a1a 0%, #1a0a2e 100%);
}

.auth-container {
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid #0ff;
    border-radius: 10px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.5);
}

.auth-container h1 {
    text-align: center;
    color: #0ff;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 0 0 10px #0ff;
}

.tagline {
    text-align: center;
    color: #aaa;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.auth-form h2 {
    color: #0f0;
    margin-bottom: 20px;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid #0f0;
    border-radius: 5px;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 1em;
}

.auth-form input:focus {
    outline: none;
    border-color: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #0a5, #0f7);
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-form button:hover {
    background: linear-gradient(135deg, #0f7, #0fa);
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.6);
}

.switch-auth {
    text-align: center;
    margin-top: 20px;
    color: #aaa;
}

.switch-auth a {
    color: #0ff;
    text-decoration: none;
}

.switch-auth a:hover {
    text-decoration: underline;
}

.error-message {
    color: #f33;
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #f33;
    border-radius: 5px;
    background: rgba(255, 50, 50, 0.1);
    display: none;
}

.error-message.show {
    display: block;
}

/* Game Screen */
#game-screen {
    display: flex;
}

#game-container {
    flex: 1;
    position: relative;
    background: #000011;
    overflow: hidden;
}

/* HUD */
#hud {
    width: 260px;
    background: linear-gradient(180deg, rgba(0, 5, 15, 0.98), rgba(0, 10, 25, 0.98));
    border-left: 2px solid #00ffff;
    box-shadow: -5px 0 20px rgba(0, 255, 255, 0.3), inset 0 0 30px rgba(0, 100, 150, 0.1);
    padding: 12px;
    overflow-y: auto;
    max-height: 100vh;
}

.hud-section {
    margin-bottom: 12px;
    padding: 8px;
    background: rgba(0, 20, 40, 0.4);
    border: 1px solid rgba(0, 255, 255, 0.2);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 100, 150, 0.2);
}

.hud-section:last-child {
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.hud-section h3 {
    color: #00ffff;
    font-size: 0.75em;
    margin: 0 0 6px 0;
    padding-bottom: 4px;
    text-shadow: 0 0 8px #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.hud-section p {
    color: #00ff88;
    margin: 3px 0;
    font-size: 0.7em;
    line-height: 1.3;
}

.stat-bar {
    margin: 5px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-bar span:first-child {
    color: #00ff88;
    font-size: 0.65em;
    min-width: 45px;
}

.stat-bar span:last-child {
    color: #00ffff;
    font-size: 0.65em;
    min-width: 50px;
    text-align: right;
}

.bar {
    flex: 1;
    height: 8px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 5px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.bar-fill {
    height: 100%;
    transition: width 0.3s;
    border-radius: 1px;
}

.bar-fill.fuel {
    background: linear-gradient(90deg, #ff8800, #ff5500);
    box-shadow: 0 0 10px rgba(255, 136, 0, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.bar-fill.oxygen {
    background: linear-gradient(90deg, #0088ff, #0055ff);
    box-shadow: 0 0 10px rgba(0, 136, 255, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.3);
}

.bar-fill.hull {
    background: linear-gradient(90deg, #00ff88, #00aa55);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.8), inset 0 0 5px rgba(255, 255, 255, 0.3);
}

#resources-list {
    font-size: 0.65em;
    margin-top: 4px;
}

#resources-list p {
    margin: 2px 0;
    padding: 2px 4px;
    background: rgba(0, 100, 150, 0.1);
    border-left: 2px solid rgba(0, 255, 255, 0.3);
}

.action-btn {
    width: 100%;
    padding: 6px 8px;
    margin: 4px 0;
    background: linear-gradient(135deg, rgba(0, 80, 150, 0.6), rgba(0, 120, 200, 0.6));
    border: 1px solid rgba(0, 170, 255, 0.5);
    border-radius: 3px;
    color: #00ffff;
    font-family: 'Courier New', monospace;
    font-size: 0.65em;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 5px rgba(0, 100, 150, 0.3), inset 0 0 10px rgba(0, 150, 200, 0.1);
}

.action-btn:hover {
    background: linear-gradient(135deg, rgba(0, 120, 200, 0.8), rgba(0, 170, 255, 0.8));
    box-shadow: 0 0 15px rgba(0, 170, 255, 0.6), inset 0 0 15px rgba(0, 200, 255, 0.2);
    transform: translateY(-1px);
}

.action-btn.danger {
    background: linear-gradient(135deg, rgba(150, 0, 80, 0.6), rgba(200, 0, 120, 0.6));
    border-color: rgba(255, 0, 170, 0.5);
    color: #ff00aa;
    text-shadow: 0 0 5px rgba(255, 0, 170, 0.5);
}

.action-btn.danger:hover {
    background: linear-gradient(135deg, rgba(200, 0, 120, 0.8), rgba(255, 0, 170, 0.8));
    box-shadow: 0 0 15px rgba(255, 0, 170, 0.6), inset 0 0 15px rgba(255, 100, 200, 0.2);
}

.action-btn.upgrade {
    background: linear-gradient(135deg, rgba(0, 150, 80, 0.6), rgba(0, 200, 120, 0.6));
    border-color: rgba(0, 255, 170, 0.5);
    color: #00ffaa;
    text-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
}

.action-btn.upgrade:hover {
    background: linear-gradient(135deg, rgba(0, 200, 120, 0.8), rgba(0, 255, 170, 0.8));
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.6), inset 0 0 15px rgba(100, 255, 200, 0.2);
}

/* Upgrades Section */
#upgrades-list {
    margin: 6px 0;
}

.upgrade-item {
    background: rgba(0, 40, 60, 0.3);
    border: 1px solid rgba(0, 255, 170, 0.3);
    border-radius: 3px;
    padding: 6px;
    margin: 4px 0;
    box-shadow: 0 0 8px rgba(0, 150, 100, 0.2);
}

.upgrade-item h4 {
    color: #00ffff;
    margin: 0 0 4px 0;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.upgrade-item p {
    color: #00ff88;
    margin: 2px 0;
    font-size: 0.65em;
    line-height: 1.2;
}

.upgrade-item .upgrade-level {
    color: #ffaa00;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 170, 0, 0.5);
}

.upgrade-item .upgrade-cost {
    color: #ffff00;
    text-shadow: 0 0 5px rgba(255, 255, 0, 0.5);
}

.upgrade-item button {
    width: 100%;
    margin-top: 4px;
    padding: 5px;
    background: linear-gradient(135deg, rgba(0, 150, 80, 0.6), rgba(0, 200, 120, 0.6));
    border: 1px solid rgba(0, 255, 170, 0.5);
    border-radius: 2px;
    color: #00ffaa;
    font-size: 0.65em;
    cursor: pointer;
    transition: all 0.2s;
    text-shadow: 0 0 5px rgba(0, 255, 170, 0.5);
    box-shadow: 0 0 5px rgba(0, 150, 100, 0.3);
}

.upgrade-item button:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(0, 200, 120, 0.8), rgba(0, 255, 170, 0.8));
    box-shadow: 0 0 12px rgba(0, 255, 170, 0.6);
    transform: translateY(-1px);
}

.upgrade-item button:disabled {
    background: rgba(50, 50, 50, 0.5);
    cursor: not-allowed;
    opacity: 0.4;
    color: #666;
    text-shadow: none;
}

#controls-help {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 5, 15, 0.9);
    padding: 6px 10px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 3px;
    color: #00ff88;
    font-size: 0.65em;
    box-shadow: 0 0 10px rgba(0, 100, 150, 0.3);
}

#controls-help strong {
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

/* Scrollbar styling */
#hud::-webkit-scrollbar {
    width: 6px;
}

#hud::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.7);
    border-left: 1px solid rgba(0, 255, 255, 0.1);
}

#hud::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #00ff88, #00aa55);
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(0, 255, 136, 0.5);
}

#hud::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #00ffff, #00aaaa);
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.7);
}

/* Version info section */
.version-info {
    background: rgba(0, 50, 80, 0.3) !important;
    padding: 4px 6px !important;
    margin-bottom: 8px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.version-info p {
    margin: 0 !important;
    font-size: 0.6em !important;
    color: rgba(0, 255, 255, 0.6) !important;
}

.version-info .version-number {
    color: #00ff88;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 255, 136, 0.5);
}
