/* ═══════════════════════════════════════════════════════════════
 * Vibing with the Stars — Dark Theme Stylesheet
 * ═══════════════════════════════════════════════════════════════ */

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

body {
    background: #050510;
    color: #ccccdd;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

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

/* ── Title / Status (top-left) ───────────────────────────────── */

.title-panel {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 100;
    pointer-events: none;
}

.title-panel h1 {
    font-size: 18px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #bbaadd;
    text-shadow: 0 0 12px rgba(170,130,255,0.4);
    margin-bottom: 6px;
}

.title-panel .subtitle {
    font-size: 11px;
    color: #887799;
    letter-spacing: 1px;
}

.title-panel .credit {
    font-size: 10px;
    color: #776688;
    letter-spacing: 1px;
    margin-top: 6px;
}

.title-panel .hashtag {
    font-size: 10px;
    color: #6655aa;
    letter-spacing: 0.5px;
    margin-top: 2px;
    text-shadow: 0 0 8px rgba(100,80,200,0.3);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 11px;
    color: #999;
}

.status-badge .dot {
    font-size: 14px;
    line-height: 1;
}

/* ── Voice Controls (top-right) ──────────────────────────────── */

.voice-panel {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.mic-button {
    background: rgba(80, 40, 120, 0.4);
    border: 1px solid rgba(170, 130, 255, 0.3);
    color: #aa99cc;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    letter-spacing: 2px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mic-button:hover {
    background: rgba(100, 50, 150, 0.5);
    border-color: rgba(170, 130, 255, 0.5);
}

.mic-button.active {
    background: rgba(200, 50, 80, 0.5);
    border-color: rgba(255, 100, 130, 0.6);
    color: #ffaabb;
    box-shadow: 0 0 15px rgba(255, 80, 120, 0.3);
    animation: mic-pulse 1.5s ease-in-out infinite;
}

@keyframes mic-pulse {
    0%, 100% { box-shadow: 0 0 15px rgba(255, 80, 120, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 80, 120, 0.5); }
}

.interrupt-button {
    background: rgba(60, 30, 30, 0.4);
    border: 1px solid rgba(150, 80, 80, 0.3);
    color: #886666;
    font-family: 'Courier New', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 6px 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.interrupt-button:hover {
    background: rgba(120, 40, 40, 0.5);
    border-color: rgba(200, 80, 80, 0.5);
    color: #cc8888;
}

.voice-toggle {
    background: rgba(40, 80, 60, 0.4);
    border: 1px solid rgba(80, 200, 130, 0.3);
    color: #88ccaa;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.voice-toggle:hover {
    background: rgba(50, 100, 70, 0.5);
}

.voice-toggle.active {
    border-color: rgba(80, 200, 130, 0.5);
    color: #aaffcc;
}

.speaking-indicator {
    font-size: 10px;
    color: #88ccaa;
    text-align: right;
    animation: speak-pulse 1s ease-in-out infinite;
}

@keyframes speak-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1.0; }
}

.mic-status {
    font-size: 10px;
    color: #776666;
    text-align: right;
    min-height: 14px;
}

/* ── Transcript Panel (bottom-left) ──────────────────────────── */

.transcript-panel {
    position: fixed;
    bottom: 40px;
    left: 16px;
    z-index: 100;
    pointer-events: none;
}

.transcript-display {
    font-size: 12px;
    color: #aa99cc;
    font-style: italic;
    max-width: 450px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 0 10px rgba(170,130,255,0.3);
}

/* ── Telemetry HUD (bottom-right) ────────────────────────────── */

.telemetry-panel {
    position: fixed;
    bottom: 40px;
    right: 16px;
    z-index: 100;
    pointer-events: none;
    text-align: right;
}

.telemetry-row {
    font-size: 11px;
    color: #776688;
    margin-bottom: 3px;
}

.telemetry-row .label {
    color: #665577;
}

.telemetry-row .value {
    color: #aa99cc;
    font-weight: bold;
    margin-left: 6px;
}

/* ── Status Bar (very bottom) ────────────────────────────────── */

.status-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: rgba(5,5,16,0.8);
    border-top: 1px solid rgba(100,80,150,0.2);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 24px;
    font-size: 10px;
    color: #554466;
    z-index: 100;
    pointer-events: none;
}

.status-bar span {
    white-space: nowrap;
}

/* ── Loading overlay ─────────────────────────────────────────── */

.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #050510;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.8s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-overlay h2 {
    font-size: 20px;
    font-weight: 200;
    letter-spacing: 4px;
    color: #aa88ff;
    text-shadow: 0 0 20px rgba(170,130,255,0.3);
    margin-bottom: 20px;
}

.loading-bar {
    width: 200px;
    height: 2px;
    background: rgba(100,80,150,0.2);
    border-radius: 1px;
    overflow: hidden;
}

.loading-bar .progress {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #aa88ff, #ff88aa);
    transition: width 0.3s ease;
    animation: loading-pulse 1.5s ease-in-out infinite;
}

@keyframes loading-pulse {
    0%, 100% { width: 20%; margin-left: 0; }
    50% { width: 60%; margin-left: 20%; }
}

/* ── Instruction Overlay ─────────────────────────────────────── */

.instruction-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    pointer-events: none;
    transition: opacity 1.5s ease;
}

.instruction-overlay.hidden {
    opacity: 0;
}

.instruction-content {
    text-align: center;
    max-width: 460px;
}

.instruction-title {
    font-size: 24px;
    font-weight: 200;
    letter-spacing: 6px;
    color: #8877cc;
    text-shadow: 0 0 30px rgba(130,100,220,0.4);
    margin-bottom: 30px;
    text-transform: uppercase;
}

.instruction-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
    text-align: left;
}

.step {
    display: grid;
    grid-template-columns: 24px 1fr;
    grid-template-rows: auto auto;
    gap: 2px 12px;
    align-items: baseline;
}

.step-number {
    grid-row: 1 / 3;
    font-size: 20px;
    font-weight: 200;
    color: #6655aa;
    text-align: center;
}

.step-text {
    font-size: 14px;
    color: #aa99cc;
    letter-spacing: 1px;
}

.step-example {
    font-size: 11px;
    color: #665577;
    font-style: italic;
}

.instruction-hint {
    font-size: 11px;
    color: #554466;
    margin-top: 28px;
    letter-spacing: 2px;
    text-align: center;
    animation: hint-pulse 2s ease-in-out infinite;
}

@keyframes hint-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1.0; }
}

/* ── Navigation HUD (top-center) ─────────────────────────────── */

.nav-panel {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    pointer-events: none;
    text-align: center;
}

.zodiac-label {
    font-size: 11px;
    letter-spacing: 3px;
    color: #8877aa;
    text-transform: uppercase;
    margin-bottom: 4px;
    min-height: 14px;
}

.current-star {
    font-size: 16px;
    font-weight: 300;
    letter-spacing: 2px;
    color: #ccbbee;
    text-shadow: 0 0 15px rgba(170,150,255,0.3);
}

.nav-status {
    font-size: 11px;
    color: #776688;
    margin-top: 4px;
    letter-spacing: 1px;
}
