@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;600&family=Inter:wght@300;400;600;700&display=swap');

:root {
    --bg-color: #030305;
    --text-color: #ffffff;
    --accent-color: #bb86fc;
    --glass-bg: rgba(10, 10, 15, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    overflow: hidden; /* Prevent scrolling */
    width: 100vw;
    height: 100vh;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ASCII Canvas fills the screen */
#ascii-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Glassmorphism HUD Panel */
.hud-panel {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    z-index: 10;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.toggle-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.2s;
    z-index: 20;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hud-panel.minimized {
    width: auto;
    padding-top: 15px;
    padding-bottom: 15px;
}

.hud-panel.minimized #hud-collapsible,
.hud-panel.minimized #hud-recommendation {
    display: none;
}

.hud-panel.minimized .credit {
    margin-right: 30px; /* space for the toggle btn */
}

.hud-panel h1 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.subtitle {
    font-size: 11px;
    color: #999;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.galaxy-selector {
    margin-bottom: 20px;
}

#galaxy-dropdown {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: border-color 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
}

#galaxy-dropdown:hover,
#galaxy-dropdown:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
}

#galaxy-dropdown option {
    background: var(--bg-color);
    color: var(--text-color);
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
}

.stat-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Fira Code', monospace;
    font-size: 12px;
}

.stat-row .label {
    color: #777;
}

.stat-row .value {
    color: var(--accent-color);
    font-weight: 600;
}

.credit {
    font-size: 12px;
    line-height: 1.6;
    color: #888;
}

.credit strong {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
}

.recommendation {
    margin-top: 8px;
    font-size: 10px;
    color: var(--accent-color);
    font-style: italic;
    opacity: 0.8;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hud-panel {
        bottom: 15px;
        right: 15px;
        left: 15px; /* Stretch across bottom */
        width: auto; /* Allow it to scale */
        padding: 16px;
        background: rgba(10, 10, 15, 0.85); /* Slightly less transparent for readability */
    }

    .hud-panel h1 {
        font-size: 16px;
    }

    .subtitle {
        font-size: 9px;
        margin-bottom: 12px;
    }

    .stats {
        flex-direction: column; /* Stack vertically to ensure nothing is cut off */
        gap: 6px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .stat-row {
        width: 100%; 
        font-size: 11px;
    }

    .credit {
        font-size: 10px;
    }

    .credit strong {
        font-size: 12px;
    }
}
