/**
 * Pandora — Base Stylesheet
 * Vesperis engine base + loading screen
 * Adapted from NyxSoft corporate pattern, amber/navy palette
 */

/* ═══════════════════════════════════════════════
   CUSTOM PROPERTIES — Amber / Navy Palette
   ═══════════════════════════════════════════════ */
:root {
    --color-bg: #080a12;
    --color-bg-soft: #0c0e18;
    --color-bg-card: rgba(12, 14, 24, 0.85);

    --color-text: #b0b8c8;
    --color-text-bright: #d0d8e8;
    --color-text-muted: #607080;
    --color-text-dim: #405060;

    --color-accent: #C9A84C;
    --color-accent-soft: #A0823A;
    --color-accent-glow: rgba(201, 168, 76, 0.2);
    --color-accent-hover: #E0C060;

    --color-silver: #b0b8c8;
    --color-navy: #1a1e2e;

    --color-border: rgba(201, 168, 76, 0.12);
    --color-border-hover: rgba(201, 168, 76, 0.30);

    --font-heading: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
    --font-body: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    --shadow-dark: 0 4px 30px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px var(--color-accent-glow);

    --sidebar-width: 260px;
    --nav-height: 52px;
    --quick-entry-height: 64px;
}

/* ═══════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    overflow: hidden;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
}

a:hover {
    color: var(--color-accent-hover);
    text-shadow: 0 0 10px var(--color-accent-glow);
}

::selection {
    background: rgba(201, 168, 76, 0.20);
    color: var(--color-text-bright);
}

input, textarea, select, button {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

/* ═══════════════════════════════════════════════
   3D CANVAS CONTAINER
   ═══════════════════════════════════════════════ */
#canvas-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    touch-action: manipulation;
}

/* ═══════════════════════════════════════════════
   LOADING SCREEN — Brief loading bar
   ═══════════════════════════════════════════════ */
.loading-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    transition: opacity 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-screen.hidden {
    display: none;
}

.loading-brand {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 2rem;
    text-shadow: 0 0 20px var(--color-accent-glow);
}

.loading-bar-container {
    width: 200px;
    height: 2px;
    background: rgba(201, 168, 76, 0.10);
    border-radius: 1px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-bar {
    width: 0%;
    height: 100%;
    background: var(--color-accent);
    border-radius: 1px;
    transition: width 0.3s ease;
    animation: loading-progress 2s ease-in-out forwards;
}

@keyframes loading-progress {
    0%   { width: 0%; }
    20%  { width: 30%; }
    50%  { width: 60%; }
    80%  { width: 85%; }
    100% { width: 100%; }
}

.loading-text {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════
   PANDORA UI LAYER
   ═══════════════════════════════════════════════ */
#pandora-ui {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10;
    pointer-events: none;
}

#pandora-ui > * {
    pointer-events: auto;
}

/* ═══════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════ */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.30);
}

/* ═══════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════ */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
