:root {
    --c-olive: #4b5320;
    --c-olive-dark: #2b3014;
    --c-khaki: #8b8054;
    --c-steel: #71797e;
    --c-gunmetal: #2a2e33;
    --c-brass: #c5a059;
    --c-blood: #8b0000;
    --c-parchment: #e8e2ce;
    --c-ink: #1a1612;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ==========================================================================
   Visuell Roman & Escape Room Motor - Stilark og Animasjoner
   ========================================================================== */

/* Subtilt filmisk teksturoverlay */
body::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.75" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100" height="100" filter="url(%23noise)" opacity="0.04"/></svg>');
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* --------------------------------------------------------------------------
   Skjermeffekter (Risting, Blits/Artilleri)
   -------------------------------------------------------------------------- */
@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    15% { transform: translate(-8px, -6px) rotate(-0.4deg); }
    30% { transform: translate(7px, 5px) rotate(0.4deg); }
    45% { transform: translate(-6px, 4px); }
    60% { transform: translate(5px, -4px); }
    75% { transform: translate(-3px, 2px); }
    90% { transform: translate(2px, -1px); }
}
body.effect-shake #parallax-container,
body.effect-shake {
    animation: screenShake 0.65s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes screenFlash {
    0% { filter: brightness(2.8) contrast(1.4); }
    25% { filter: brightness(1.9) hue-rotate(50deg); }
    100% { filter: none; }
}
body.effect-flash {
    animation: screenFlash 0.85s ease-out both;
}

/* --------------------------------------------------------------------------
   Parallax Bakgrunn & Hotspots (Point & Click soner)
   -------------------------------------------------------------------------- */
#parallax-container {
    perspective: 1000px;
    background-color: #080808;
}

.parallax-layer {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.hotspot-zone {
    position: absolute;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease-out;
}

.hotspot-zone:hover {
    background-color: rgba(197, 160, 89, 0.18);
    box-shadow: 0 0 25px rgba(197, 160, 89, 0.35);
}

.hotspot-pin {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: radial-gradient(circle, #e2bb6b 0%, #8e7343 70%);
    border: 2px solid #fff;
    box-shadow: 0 0 16px rgba(245, 176, 65, 0.8), 0 2px 8px rgba(0,0,0,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #1a1612;
    animation: pulseGlow 2.2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 12px rgba(245, 176, 65, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 24px rgba(245, 176, 65, 0.95);
    }
}

.hotspot-tooltip {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 22, 16, 0.95);
    border: 1px solid rgba(197, 160, 89, 0.7);
    color: #f4ecd8;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.8);
    z-index: 100;
}

.hotspot-zone:hover .hotspot-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

/* --------------------------------------------------------------------------
   Filmatisk Dialog & Hovedperson HUD
   -------------------------------------------------------------------------- */
#dialogue-box {
    background: linear-gradient(180deg, rgba(16, 20, 15, 0.92) 0%, rgba(9, 12, 9, 0.98) 100%);
    border-top: 2px solid rgba(139, 128, 84, 0.6);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.9);
}

.char-portrait {
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.8));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --------------------------------------------------------------------------
   Dokumentviser / Diegetisk Etterforskning
   -------------------------------------------------------------------------- */
.theme-parchment {
    background: #f7f1e3;
    color: #2c1810;
    border: 3px solid #8b5a2b;
}

.theme-military {
    background: #242b20;
    color: #e5ecd8;
    border: 3px solid #5a6b4a;
}

.theme-telegram {
    background: #eef0ea;
    color: #1a2215;
    border: 2px dashed #445533;
    font-family: 'Roboto Mono', monospace;
}
