html, body {
    margin: 0;
    overflow: hidden;
    height: 100%;
    width: 100%;
}


#graphics-options-button {
    position: absolute;
    top: 10px;
    right: 180px; /* Position to the left of stats-panel */
    background: rgba(0, 0, 0, 0.7);
    color: #00ff00;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    border: 1px solid #00ff00;
    cursor: pointer;
    z-index: 1000;
}

#graphics-options-menu {
    position: absolute;
    top: 40px; /* Below the button */
    right: 10px; /* Aligned with stats-panel */
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    z-index: 1001;
    min-width: 150px;
    border: 1px solid #00ff00;
}

#graphics-options-menu p {
    margin: 5px 0;
    cursor: pointer;
}

#graphics-options-menu p:hover {
    color: #00ffff;
}

/* ---- W1: Start screen / trajectory select ---- */
#start-screen {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at center, rgba(10, 16, 40, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
    font-family: Arial, sans-serif;
    color: #fff;
    -webkit-user-select: none;
    user-select: none;
}
#start-screen.hidden {
    display: none;
}
#start-inner {
    text-align: center;
    max-width: 900px;
    padding: 20px;
}
#start-title {
    font-size: 64px;
    margin: 0 0 8px;
    letter-spacing: 4px;
    color: #88ccff;
    text-shadow: 0 0 24px rgba(80, 160, 255, 0.7);
}
#start-subtitle {
    font-size: 18px;
    margin: 0 0 28px;
    color: #cfe4ff;
}
#journey-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 16px;
    justify-content: center;
}
.journey-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid #3a6ea5;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
    font-family: Arial, sans-serif;
}
.journey-card:hover,
.journey-card:focus {
    transform: translateY(-3px);
    border-color: #88ccff;
    background: rgba(30, 50, 90, 0.75);
    outline: none;
}
.jc-name {
    font-size: 22px;
    font-weight: bold;
    color: #88ccff;
}
.jc-desc {
    font-size: 13px;
    line-height: 1.4;
    color: #cbd8ea;
}
#start-hint {
    margin-top: 26px;
    font-size: 14px;
    color: #9fb6d4;
}
#start-controls {
    margin-top: 8px;
    font-size: 12px;
    color: #7f96b4;
}

/* ---- W2: Launch prompt (created in JS) ---- */
#launch-prompt {
    position: absolute;
    left: 50%;
    top: 68%;
    transform: translateX(-50%);
    z-index: 1500;
    padding: 14px 26px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid #88ccff;
    border-radius: 8px;
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 20px;
    text-align: center;
    pointer-events: none;
    animation: launchPulse 1.2s ease-in-out infinite;
}
@keyframes launchPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

@media (max-width: 620px) {
    #journey-cards { grid-template-columns: 1fr; }
    #start-title { font-size: 44px; }
}

/* ---- P1: world-state debug panel (toggle with G) ---- */
#worldstate-panel {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 1600;
    max-width: 46ch;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.72);
    border: 1px solid #66ffcc;
    border-radius: 6px;
    color: #b8ffe8;
    font-family: 'Courier New', Courier, monospace;
    font-size: 11px;
    line-height: 1.35;
    white-space: pre;
    pointer-events: none;
    text-shadow: 0 0 4px rgba(0, 0, 0, 0.9);
}
