:root {
    --bg-color: #050505;
    --text-main: #f0f0f0;
    --text-muted: #888;
    --accent: #00f0ff;
    --accent-glow: rgba(0, 240, 255, 0.3);
    --panel-bg: rgba(10, 10, 12, 0.6);
    --panel-border: rgba(255, 255, 255, 0.05);
    
    --font-sans: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;
    
    --safe-bottom: env(safe-area-inset-bottom, 20px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100svh;
    overflow: hidden;
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-sans);
    overscroll-behavior: none;
}

/* 3D Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto; /* Let interaction happen */
}

/* UI Layer */
#app-container {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    pointer-events: none; /* Let touches pass through to canvas when not on UI */
}

/* Header / Nexus */
.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hero-section.active {
    opacity: 1;
}

h1.glitch-text {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    position: relative;
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(255,255,255,0.2);
}

.subtitle {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 300;
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.status-indicator {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--panel-border);
    backdrop-filter: blur(4px);
}

.dot {
    width: 6px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--accent);
    animation: pulse 2s infinite;
}

/* Panels */
.panel {
    position: absolute;
    bottom: 80px; /* Above nav */
    left: 4%;
    width: 92%;
    max-height: calc(100% - 140px);
    background: var(--panel-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.panel.active {
    transform: translateY(0);
    opacity: 1;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.panel-header h2 {
    font-family: var(--font-mono);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
}

.panel-content {
    overflow-y: auto;
    padding-bottom: 1rem;
}

.panel-content::-webkit-scrollbar {
    display: none;
}

.center-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 1;
    min-height: 200px;
}

/* Paradox Items */
.paradox-item {
    margin-bottom: 1.5rem;
}

.paradox-item:last-child {
    margin-bottom: 0;
}

.paradox-item h3 {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.paradox-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Action Button */
.action-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.action-btn:active {
    background: var(--accent-glow);
}

/* Bottom Nav */
.bottom-nav {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: calc(80px + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    pointer-events: auto;
    z-index: 20;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-btn.active {
    color: var(--accent);
}

.nav-btn .icon {
    font-size: 1.5rem;
    line-height: 1;
}

.nav-btn .label {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes pulse {
    0% { opacity: 0.5; box-shadow: 0 0 4px var(--accent); }
    50% { opacity: 1; box-shadow: 0 0 12px var(--accent); }
    100% { opacity: 0.5; box-shadow: 0 0 4px var(--accent); }
}

@keyframes glitch {
    0% { transform: translate(0) }
    20% { transform: translate(-2px, 1px) }
    40% { transform: translate(-1px, -1px) }
    60% { transform: translate(2px, 1px) }
    80% { transform: translate(1px, -1px) }
    100% { transform: translate(0) }
}