:root {
    --bg-color: #000002;
    --matrix-green: #39ff14;
    --matrix-orange: #ff5e00;
    --matrix-violet: #8b00ff;
    --gold-luxe: #d4af37;
    --text-muted: #666666;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-width: 100vw;
    min-height: 100dvh;
    overflow: hidden;
    background-color: var(--bg-color);
    font-family: 'Courier New', Courier, monospace;
    -webkit-user-select: none;
    user-select: none;
    color: #ffffff;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
    touch-action: none;
}

canvas {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: auto;
}

.ui-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    z-index: 10;
    background: transparent;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: max(12px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom)) 14px;
    box-sizing: border-box;
}

/* Ethereal ambient text only — no heavy banner */
.ambient-note {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(92vw, 560px);
    text-align: center;
    color: rgba(255, 255, 255, 0.86);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.08);
    pointer-events: none;
    z-index: 20;
}

.ambient-title {
    font-size: 0.86rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.92);
}

.ambient-equation {
    font-size: 1.1rem;
    font-family: 'Times New Roman', Times, serif;
    color: var(--gold-luxe);
    margin-top: 2px;
}

.ambient-status {
    font-size: 0.62rem;
    letter-spacing: 0.18em;
    color: rgba(220, 220, 220, 0.68);
    margin-top: 4px;
}

/* Coordinate-style mirror controls */
.dashboard {
    width: min(92vw, 420px);
    background: rgba(4, 5, 9, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: 10px;
    box-sizing: border-box;
    display: grid;
    gap: 8px;
    font-size: 9px;
    letter-spacing: 0.5px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    pointer-events: auto;
    margin-top: 18px;
    opacity: 0.82;
    box-shadow: 0 0 18px rgba(255,255,255,0.03);
}

.grid-core {
    display: grid;
    gap: 8px;
}

.orb-shell {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 120px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.05);
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.02), rgba(255,255,255,0.01) 45%, rgba(0,0,0,0) 70%),
        linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    box-shadow: inset 0 0 26px rgba(255,255,255,0.04), 0 0 18px rgba(255,255,255,0.02);
}

.spectral-orb {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.96), rgba(57,255,20,0.35) 33%, rgba(255,94,0,0.18) 68%, rgba(0,0,0,0.0) 100%);
    box-shadow: 0 0 34px rgba(57,255,20,0.38), 0 0 60px rgba(255,94,0,0.2);
    border: 1px solid rgba(255,255,255,0.14);
    transform: scale(1);
    transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.spectral-ring {
    position: absolute;
    inset: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 14px rgba(255,255,255,0.04), 0 0 16px rgba(255,255,255,0.03);
    pointer-events: none;
}

.sphere-grid {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.sphere-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 0 10px rgba(255,255,255,0.03), 0 0 10px rgba(255,255,255,0.02);
}

.ring-1 { width: 54px; height: 54px; transform: rotateX(70deg); }
.ring-2 { width: 74px; height: 74px; transform: rotateY(70deg); }
.ring-3 { width: 92px; height: 92px; transform: rotateZ(20deg); }

.coordinate-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    padding: 4px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border: 1px solid rgba(255,255,255,0.04);
}

.coord {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 20px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.02);
    font-size: 8px;
    letter-spacing: 0.25em;
    box-shadow: inset 0 0 10px rgba(255,255,255,0.02);
}

.mini-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.metric-chip {
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    color: rgba(255,255,255,0.8);
    font-size: 8px;
    text-transform: uppercase;
}

.metric-chip strong {
    color: #d4af37;
    margin-left: 4px;
}

.control-row {
    display: flex;
    gap: 8px;
}

.mini-note {
    font-size: 8px;
    color: rgba(255, 170, 0, 0.75);
    line-height: 1.3;
}

.dash-row {
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: rgba(255, 255, 255, 0.12);
}

.highlight { color: #abcdef; }
.processing-text {
    color: var(--matrix-orange);
    animation: pulseText 1.5s infinite alternate;
}

.terminal-log {
    grid-column: 1 / -1;
    margin-top: 6px;
    font-size: 8px;
    color: rgba(255, 170, 0, 0.18);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 6px;
    white-space: normal;
}

/* Button styles kept for any future use */
.btn-core {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    padding: 14px 10px;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 1.5px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 46px;
}

.btn-core.primary { border-color: var(--matrix-green); color: var(--matrix-green); }
.btn-core.secondary { border-color: var(--matrix-orange); color: var(--matrix-orange); }

.btn-core:hover:not(:disabled) {
    background: rgba(255,255,255,0.05);
    box-shadow: 0 0 12px rgba(255,255,255,0.1);
}

.btn-core:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    border-color: #333 !important;
    color: #333 !important;
}

@media (max-width: 600px) {
    .dashboard { grid-template-columns: repeat(2, 1fr); }
    .dash-row.clutter { display: none; }
}

@keyframes pulseText {
    0% { opacity: 0.4; }
    100% { opacity: 1; text-shadow: 0 0 4px var(--matrix-orange); }
}