/* --- MEDITATIVE.IN CORE TOKENS --- */
:root {
    --gold: #ffd700;
    --soft-white: rgba(255, 255, 255, 0.85);
    --bg-dark: #000;
    --accent-glow: rgba(255, 215, 0, 0.3);
}

/* FIXED: Universal selector applies proper box-sizing globally */
* {
    box-sizing: border-box;
}

body, html {
    margin: 0;
    padding: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: var(--bg-dark);
    font-family: 'Noto Sans', sans-serif;
    
    /* MOBILE OPTIMIZATION */
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

/* --- RENDER LAYERS --- */
/* Consolidated canvas rules with GPU hardware acceleration */
#manifold-canvas {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5;
    background: transparent !important;
    will-change: transform, opacity; /* GPU Acceleration */
}

/* --- HUD & BRANDING --- */
#tactical-header {
    position: absolute;
    /* Fluid positioning: scales cleanly between mobile and desktop */
    top: clamp(20px, 4vh, 40px);
    left: clamp(20px, 4vw, 40px);
    z-index: 100;
    color: var(--gold);
    font-weight: bold;
    
    /* Fluid typography */
    font-size: clamp(14px, 1.5vw, 18px);
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
    
    /* Smooth hover and layout transitions */
    transition: text-shadow 0.3s ease, color 0.3s ease, top 0.4s ease, left 0.4s ease;
    
    /* Readability protection */
    text-shadow: 0 0 10px var(--accent-glow), 0 2px 4px rgba(0,0,0,0.8);
}

#tactical-header:hover {
    text-shadow: 0 0 20px var(--gold);
    color: #fff;
}

#log-feed-container {
    position: absolute;
    /* Fluid positioning */
    bottom: clamp(20px, 4vh, 40px);
    left: clamp(20px, 4vw, 40px);
    z-index: 100;
    color: var(--soft-white);
    
    /* Fluid typography */
    font-size: clamp(9px, 1vw, 12px);
    letter-spacing: 1px;
    text-transform: uppercase;
    pointer-events: none;
    
    /* Smooth layout transitions */
    transition: bottom 0.4s ease, left 0.4s ease;
}

.neon-text {
    animation: pulse-glow 3s infinite ease-in-out;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.6;
        text-shadow: 0 0 5px var(--gold), 0 1px 3px rgba(0,0,0,0.9);
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 15px var(--gold), 0 2px 5px rgba(0,0,0,0.9);
    }
}
/* --- THE RESONANCE DISC --- */
#audio-disc {
    position: fixed;
    bottom: clamp(20px, 4vh, 40px);
    right: clamp(20px, 4vw, 40px);
    width: clamp(40px, 5vw, 55px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(4px);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* The inner glowing core */
#audio-disc::after {
    content: '';
    width: 40%;
    height: 40%;
    border-radius: 50%;
    background: var(--gold, #ffd700);
    box-shadow: 0 0 15px var(--gold, #ffd700);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* When active, the core breathes */
#audio-disc:not(.muted)::after {
    animation: disc-breathe 4s infinite ease-in-out;
}

/* Muted state: small, dim, silver core */
#audio-disc.muted::after {
    background: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    width: 20%;
    height: 20%;
}

#audio-disc:hover {
    border-color: var(--gold, #ffd700);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

@keyframes disc-breathe {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 25px var(--gold, #ffd700); }
}
