/* ==================== UNIVERSE PAGE ==================== */

/* disable global overlays that block the 3D scene */
body::before, body::after { display: none !important; }
body { cursor: none !important; padding: 0 !important; display: block !important; }
@media (hover: none), (pointer: coarse) {
    body { cursor: auto !important; }
}

/* ---- full-page container ---- */
.u-page {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #020104;
    z-index: 1;
}

/* Three.js canvas mount */
#u-scene {
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: none !important;
}
#u-scene:active { cursor: none !important; }

/* ==================== TOP NAV ==================== */

/* The nav that used to be lifted above the scene here is gone: navigation now
   lives in the control panel, whose bar is z-index 100060 and therefore already
   well clear of the scene's z-index 1. */

/* keep the HUD clear of the navbar row */

/* ==================== HUD ==================== */

.u-hud {
    position: fixed;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    font-size: 0.68rem;
    letter-spacing: 0.5px;
}

.u-hud-left {
    position: absolute;
    /* Clears the control panel's fixed top bar. Must track .cp-bar's height in
       style.css (3.1rem) or the HUD slides under it. */
    top: 3.6rem;
    left: 1.1rem;
    color: var(--text-dim);
    text-shadow: 0 0 10px rgba(255,59,59,0.15);
}

.u-hud-left p { margin: 0.15rem 0; }

.u-sys {
    color: var(--red);
    opacity: 0.85;
    margin-bottom: 0.35rem;
}

.u-hud-right {
    position: absolute;
    bottom: 1.1rem;
    right: 1.1rem;
    color: var(--text-dim);
    opacity: 0.6;
    text-align: right;
}

/* ==================== BOTTOM INFO ==================== */

.u-bottom {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    text-align: center;
    padding: 2.25rem 1.25rem 1.4rem;
    background: linear-gradient(to top, rgba(2,1,4,0.92) 0%, rgba(2,1,4,0.6) 55%, transparent 100%);
    pointer-events: none;
}

.u-intro {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.45rem;
    line-height: 1.6;
}

.u-price {
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.5px;
}

/* keep hud-right clear of bottom bar; hud-left clear of the taller top bar */
@media (max-width: 600px) {
    .u-hud-right { bottom: 5.5rem; }
    .u-hud-left { top: 7.6rem; }
}

/* ==================== MODAL ==================== */

.u-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.u-modal[hidden] { display: none; }

.u-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.u-modal-card {
    position: relative;
    background: rgba(10, 6, 14, 0.96);
    border: 1px solid rgba(255,59,59,0.15);
    border-radius: 16px;
    padding: 2rem 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow:
        0 0 60px rgba(255,59,59,0.08),
        0 25px 50px rgba(0,0,0,0.6),
        inset 0 1px 0 rgba(255,59,59,0.05);
    animation: u-modal-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes u-modal-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.u-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.9rem;
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
}

.u-modal-close:hover { color: var(--red); }

.u-modal-title {
    font-size: 1.05rem;
    color: var(--text);
    margin-bottom: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.u-modal-text {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.u-modal-price {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 1.2rem;
}

.u-modal-btn {
    display: inline-block;
    background: var(--red);
    color: var(--selection);
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.8rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 0 20px rgba(255,59,59,0.2);
}

.u-modal-btn:hover {
    background: var(--red-bright);
    color: var(--selection);
    box-shadow: 0 0 30px rgba(255,59,59,0.4);
    transform: translateY(-1px);
}

/* ==================== TOOLTIP ==================== */

.u-tooltip {
    position: fixed;
    background: rgba(8, 4, 12, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,59,59,0.2);
    border-radius: 8px;
    padding: 0.35rem 0.75rem;
    font-size: 0.7rem;
    color: var(--text);
    white-space: nowrap;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 0 20px rgba(0,0,0,0.6), 0 0 10px rgba(255,59,59,0.08);
}

.u-tooltip[hidden] { display: none; }

/* ==================== FALLBACK ==================== */

.u-nogl {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red);
    font-size: 0.85rem;
    letter-spacing: 2px;
}

/* ---- light theme ---- */
body.light .u-page {
    background: radial-gradient(ellipse at 50% 50%, #120818 0%, #0a0412 35%, #05020a 70%, #020105 100%);
}

body.light .u-modal-card {
    background: rgba(15, 10, 20, 0.96);
    border-color: rgba(217,43,43,0.12);
}

/* ---- responsive ---- */
@media (max-width: 500px) {
    .u-modal-card { padding: 1.5rem 1.2rem; }
}