/* Ether Tides — Deep Ocean Exploration */

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

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

#gameCanvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

#ui-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#title-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, #0a1628 0%, #000810 100%);
    pointer-events: all;
}

#title-screen h1 {
    font-size: 4rem;
    letter-spacing: 0.5em;
    color: #40c8e0;
    text-shadow: 0 0 30px rgba(64, 200, 224, 0.5);
    margin-bottom: 0.5rem;
}

#title-screen .subtitle {
    font-size: 1.2rem;
    color: #5a8fa8;
    margin-bottom: 3rem;
    letter-spacing: 0.3em;
}

#title-screen button,
#pause-menu button {
    padding: 12px 32px;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    background: transparent;
    border: 1px solid #40c8e0;
    color: #40c8e0;
    cursor: pointer;
    letter-spacing: 0.2em;
    transition: all 0.3s;
    margin: 8px;
}

#title-screen button:hover,
#pause-menu button:hover {
    background: rgba(64, 200, 224, 0.15);
    box-shadow: 0 0 20px rgba(64, 200, 224, 0.3);
}

#hud {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

#oxygen-bar,
#power-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.bar-bg {
    width: 150px;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
}

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

#oxygen-fill {
    background: linear-gradient(90deg, #20a0d0, #40c8e0);
}

#power-fill {
    background: linear-gradient(90deg, #f0a030, #f0d030);
}

#hull-fill {
    background: linear-gradient(90deg, #40a060, #60d080);
}

#depth-indicator {
    font-size: 0.9rem;
    color: #5a8fa8;
}

#biome-indicator {
    font-size: 0.85rem;
    color: #6ab89a;
    margin-top: 4px;
    text-shadow: 0 0 8px rgba(106, 184, 154, 0.3);
}

#credits-indicator {
    font-size: 0.85rem;
    color: #e0d060;
    margin-top: 4px;
    text-shadow: 0 0 8px rgba(224, 208, 96, 0.3);
}

#research-log-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(64, 200, 224, 0.3);
    border-radius: 4px;
}

#pause-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 8, 16, 0.85);
    pointer-events: all;
}

#pause-menu h2 {
    font-size: 2rem;
    color: #40c8e0;
    margin-bottom: 2rem;
    letter-spacing: 0.3em;
}

/* ── Objectives Panel ───────────────────────────────────────────── */
#objectives-panel {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 320px;
    background: rgba(0, 8, 16, 0.65);
    border: 1px solid rgba(64, 200, 224, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    pointer-events: none;
    z-index: 10;
}

.objective-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: 0.8rem;
    color: #7ab0cc;
    border-bottom: 1px solid rgba(64, 200, 224, 0.08);
}

.objective-row:last-child {
    border-bottom: none;
}

.obj-status {
    font-weight: bold;
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
}

.obj-status.obj-active {
    color: #e0c040;
}

.obj-status.obj-done {
    color: #40d060;
}

.obj-icon {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.obj-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.obj-progress {
    color: #5a8fa8;
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.obj-reward {
    color: #e0d060;
    font-size: 0.75rem;
    width: 30px;
    text-align: right;
    flex-shrink: 0;
}
