/* ==========================================================================
   Cozy Room & CollectorOS Stylesheet
   Designed by Antigravity
   ========================================================================== */

/* --- Custom Variables & Theme Setup --- */
:root {
  /* Ambient colors */
  --room-wall-day: #dfdbd8;
  --room-wall-night: #1a1a2e;
  --room-wall-ambient: var(--room-wall-night);
  --desk-wood: #5c3a21;
  --desk-wood-light: #7c4f30;
  --accent-neon-green: #00ff66;
  --accent-neon-blue: #00d2ff;
  --accent-neon-pink: #ff007f;
  --text-dark: #2a2a2a;

  /* Fonts */
  --font-os: 'Inter', system-ui, sans-serif;
  --font-title: 'Outfit', sans-serif;
  --font-mono: 'Fira Code', monospace;
  --font-hand: 'Caveat', cursive;
  --font-retro: 'Press Start 2P', monospace;

  /* Windows 98 / Modern Glassmorphism hybrid OS variables */
  --os-bg: #008080;
  /* Classic Teal */
  --os-window-bg: rgba(240, 240, 240, 0.85);
  --os-window-border: #ffffff;
  --os-window-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  --os-active-header: linear-gradient(90deg, var(--accent-neon-pink), var(--accent-neon-blue));

  /* Room Light State - Night Cozy default */
  --lamp-opacity: 0.85;
  --ambient-dim: 0.6;
  --shadow-color: rgba(0, 0, 0, 0.8);
}

/* Day/Ambient mode toggled by Lamp */
body.day-mode {
  --room-wall-ambient: #dfdbd8;
  --lamp-opacity: 0;
  --ambient-dim: 0.15;
  --shadow-color: rgba(0, 0, 0, 0.2);
}

/* --- Base Resets --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body,
html {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #0d0d1a;
  font-family: var(--font-os);
  color: #fff;
}

/* --- Sound Panel Button --- */
.floating-panel {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 10000;
}

#audio-toggle {
  background: rgba(26, 26, 46, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 0.85rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

#audio-toggle:hover {
  background: var(--accent-neon-pink);
  border-color: #fff;
  transform: translateY(-2px);
}

/* --- Main Camera Viewport Framework --- */
#viewport {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#view-container {
  width: 1200px;
  height: 800px;
  position: absolute;
  top: 0;
  left: 0;
  /* transform-style: preserve-3d;
  transition: transform 1.3s cubic-bezier(0.65, 0.05, 0.36, 1);
  transform-origin: 0 0; */
}

/* --- Camera Zoom States (Managed Dynamically in JS for perfect responsiveness) --- */

/* ==========================================================================
   STAGE 1: COZY ROOM ENVIRONMENT
   ========================================================================== */
#room-stage {
  width: 102%;
  height: 100%;
  position: absolute;
  top: 0;
  left: -10px;
  background-color: var(--room-wall-ambient);
  overflow: hidden;
  transition: background-color 1s ease;
}

/* --- The Window --- */
.room-window {
  position: absolute;
  top: 40px;
  left: 60px;
  width: 280px;
  height: 250px;
  border: 12px solid #2d2620;
  border-bottom: 16px solid #2d2620;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.sky-background {
  width: 100%;
  height: 100%;
  position: relative;
  background: linear-gradient(to bottom, #050510, #131332);
  overflow: hidden;
}

.moon {
  position: absolute;
  top: 30px;
  right: 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fbf7eb;
  box-shadow: 0 0 20px #fbf7eb, inset -6px -2px 0 rgba(0, 0, 0, 0.1);
}

.stars-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  opacity: 0.6;
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.2;
    transform: scale(0.8);
  }

  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.blinds {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.blind-slat {
  width: 100%;
  height: 8px;
  background: rgba(30, 25, 20, 0.85);
  margin-bottom: 22px;
  border-bottom: 2px solid rgba(0, 0, 0, 0.4);
}

/* --- Wall Poster --- */
.wall-poster {
  position: absolute;
  top: 80px;
  left: 390px;
  width: 140px;
  height: 190px;
  border: 4px solid #111;
  background: #222;
  box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.6);
  z-index: 1;
  padding: 10px;
}

.poster-graphic {
  width: 100%;
  height: 100%;
  border: 1px solid #444;
  background: linear-gradient(135deg, #131332, #ff007f);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.poster-title {
  font-family: var(--font-title);
  font-size: 1.1rem;
  letter-spacing: 4px;
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
  font-weight: 700;
}

.poster-wave {
  width: 80px;
  height: 40px;
  background: repeating-linear-gradient(45deg, transparent, transparent 4px, var(--accent-neon-blue) 4px, var(--accent-neon-blue) 8px);
  border-radius: 50% 50% 0 0;
}

/* --- Plant Shelf --- */
.plant-shelf {
  position: absolute;
  top: 60px;
  right: 120px;
  width: 220px;
  height: 150px;
  z-index: 1;
}

.shelf-wood {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 14px;
  background: #3e2617;
  border-radius: 3px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.plant-pot {
  position: absolute;
  bottom: 14px;
  left: 70px;
  width: 60px;
  height: 45px;
  background: #cd853f;
  border-radius: 0 0 15px 15px;
}

.vine {
  position: absolute;
  background: #2e7d32;
  border-radius: 50%;
  transform-origin: top center;
}

.vine-1 {
  width: 8px;
  height: 120px;
  top: 20px;
  left: 10px;
  border-radius: 0 0 10px 10px;
}

.vine-2 {
  width: 6px;
  height: 90px;
  top: 25px;
  left: 30px;
  border-radius: 0 0 10px 10px;
}

.vine-3 {
  width: 7px;
  height: 140px;
  top: 15px;
  left: 45px;
  border-radius: 0 0 10px 10px;
}

/* --- The Desk Surface & Support --- */
.desk-area {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 407px;
  z-index: 10;
}

.desk-surface {
  width: 100%;
  height: 35px;
  background: linear-gradient(to bottom, var(--desk-wood-light), var(--desk-wood));
  border-bottom: 15px solid #362213;
  box-shadow: 0 15px 40px var(--shadow-color);
  border-radius: 8px 8px 0 0;
  position: relative;
}

/* --- Coffee Mug & Steam --- */
.coffee-mug {
  position: absolute;
  bottom: 395px;
  left: 150px;
  width: 32px;
  height: 36px;
  cursor: pointer;
  z-index: 12;
}

.mug-body {
  width: 100%;
  height: 100%;
  background: #ff5722;
  border-radius: 0 0 8px 8px;
  box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.4);
}

.mug-handle {
  position: absolute;
  right: -8px;
  top: 8px;
  width: 12px;
  height: 20px;
  border: 4px solid #ff5722;
  border-left: none;
  border-radius: 0 10px 10px 0;
}

.steam-container {
  position: absolute;
  top: -55px;
  left: -20px;
  width: 70px;
  height: 60px;
  pointer-events: none;
  overflow: hidden;
}

.steam-svg {
  width: 100%;
  height: 100%;
}

.steam-line {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
}

@keyframes steam-rise {
  0% {
    stroke-dashoffset: 80;
    opacity: 0;
  }

  20% {
    opacity: 0.5;
  }

  80% {
    opacity: 0.5;
  }

  100% {
    stroke-dashoffset: -80;
    opacity: 0;
  }
}

.steam-1 {
  animation: steam-rise 4s infinite linear;
}

.steam-2 {
  animation: steam-rise 4.5s infinite linear 1.5s;
}

.steam-3 {
  animation: steam-rise 3.5s infinite linear 0.7s;
}

/* --- Potted Plant on Desk --- */
.desk-plant {
  position: absolute;
  bottom: 395px;
  left: 60px;
  width: 50px;
  height: 50px;
  z-index: 12;
}

.desk-pot {
  width: 38px;
  height: 32px;
  background: #d84315;
  margin: 18px auto 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

.leaf {
  position: absolute;
  background: #388e3c;
  border-radius: 0 100% 0 100%;
  transform-origin: bottom left;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.leaf-1 {
  width: 25px;
  height: 25px;
  bottom: 25px;
  left: 5px;
  transform: rotate(-15deg);
}

.leaf-2 {
  width: 30px;
  height: 30px;
  bottom: 28px;
  left: 15px;
  transform: rotate(45deg);
  border-radius: 100% 0 100% 0;
}

.leaf-3 {
  width: 22px;
  height: 22px;
  bottom: 25px;
  left: 24px;
  transform: rotate(100deg);
}

/* --- Keyboard & Mouse --- */
.desk-keyboard {
  position: absolute;
  bottom: 395px;
  left: 360px;
  width: 210px;
  height: 12px;
  background: #e0e0e0;
  border-radius: 2px;
  box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.3);
  z-index: 12;
  border-bottom: 2px solid #b0b0b0;
}

.desk-mouse {
  position: absolute;
  bottom: 395px;
  left: 590px;
  width: 14px;
  height: 9px;
  background: #e0e0e0;
  border-radius: 6px 6px 2px 2px;
  box-shadow: 1px 2px 4px rgba(0, 0, 0, 0.3);
  z-index: 12;
}

/* --- Interactive Desk Lamp --- */
.desk-lamp {
  position: absolute;
  bottom: 395px;
  right: 160px;
  width: 110px;
  height: 180px;
  cursor: pointer;
  z-index: 25;
}

.lamp-base {
  position: absolute;
  bottom: 0;
  left: 20px;
  width: 50px;
  height: 10px;
  background: #2a2a2a;
  border-radius: 5px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
}

.lamp-arm {
  position: absolute;
  bottom: 10px;
  left: 35px;
  width: 8px;
  height: 120px;
  background: #2a2a2a;
  transform: rotate(-15deg);
  transform-origin: bottom center;
}

.lamp-joint {
  width: 16px;
  height: 16px;
  background: #e91e63;
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: -4px;
}

.lamp-stem {
  width: 8px;
  height: 50px;
  background: #2a2a2a;
  position: absolute;
  top: 8px;
  left: 0;
  transform: rotate(50deg);
  transform-origin: top center;
}

.lamp-shade {
  position: absolute;
  top: 50px;
  left: -20px;
  width: 60px;
  height: 35px;
  background: #ffc107;
  border-radius: 30px 30px 5px 5px;
  transform: rotate(35deg);
  box-shadow: inset -5px -2px 10px rgba(0, 0, 0, 0.3), 3px 3px 10px rgba(0, 0, 0, 0.4);
}

.lamp-bulb {
  position: absolute;
  bottom: -4px;
  left: 20px;
  width: 20px;
  height: 12px;
  background: #fff;
  border-radius: 50% 50% 0 0;
  box-shadow: 0 0 15px #fff;
}

/* Interactive Lamp Glow Cone */
.lamp-glow-cone {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 1200px;
  height: 800px;
  pointer-events: none;
  background: radial-gradient(circle at 1000px 350px, rgba(255, 235, 180, 0.45) 0%, rgba(255, 200, 100, 0.1) 40%, rgba(0, 0, 0, 0) 70%);
  opacity: var(--lamp-opacity);
  mix-blend-mode: screen;
  z-index: 20;
  transition: opacity 0.5s ease;
}

/* Ambient Overlay dims the entire room at night */
.room-ambient-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 30, var(--ambient-dim));
  pointer-events: none;
  z-index: 18;
  transition: background 0.8s ease;
}

/* --- Closed Binder Sitting on Desk --- */
.desk-binder-closed {
  position: absolute;
  bottom: 395px;
  right: 320px;
  width: 85px;
  height: 110px;
  cursor: pointer;
  z-index: 15;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  transform: rotate(-10deg) skewX(8deg);
  box-shadow: -5px 10px 15px rgba(0, 0, 0, 0.5);
  transform-style: preserve-3d;
}

.desk-binder-closed:hover {
  transform: rotate(-12deg) skewX(8deg) translateY(-8px);
  box-shadow: -8px 15px 22px rgba(0, 0, 0, 0.6), 0 0 10px rgba(0, 210, 255, 0.5);
}

.binder-cover-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 100%;
  background: #5d1515;
  border-radius: 3px 0 0 3px;
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.4);
}

.binder-cover-front {
  position: absolute;
  left: 16px;
  top: 0;
  width: 69px;
  height: 100%;
  background: #8b1e1e;
  border-radius: 0 5px 5px 0;
  box-shadow: inset 1px 0 2px rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5px;
}

.binder-label {
  background: #fdf5e6;
  border: 1px solid #dcdcdc;
  padding: 4px;
  width: 85%;
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-title);
  font-size: 0.45rem;
  font-weight: 700;
  color: #111;
  letter-spacing: 0.5px;
  box-shadow: inset 0 0 4px rgba(0, 0, 0, 0.2);
}

.binder-sticker {
  position: absolute;
  padding: 2px 4px;
  font-size: 0.4rem;
  border-radius: 2px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.sticker-code {
  background: #00e5ff;
  color: #000;
  font-family: var(--font-mono);
  top: 8px;
  left: 8px;
  transform: rotate(-12deg);
}

.sticker-doodle {
  font-size: 0.8rem;
  bottom: 8px;
  right: 8px;
  transform: rotate(15deg);
}

/* --- Foreground Chair Silhouette --- */
.desk-chair {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-65%);
  width: 250px;
  height: 380px;
  z-index: 30;
  pointer-events: none;
}

.chair-back {
  width: 140px;
  height: 170px;
  background: #151515;
  margin: 0 auto;
  border-radius: 20px 20px 0 0;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05), 0 10px 15px rgba(0, 0, 0, 0.4);
}

.chair-cushion {
  width: 160px;
  height: 35px;
  background: #202020;
  margin: -10px auto 0;
  border-radius: 10px;
  box-shadow: 0 12px 18px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

.chair-base {
  width: 100%;
  height: 190px;
  position: relative;
}

.chair-spindle {
  width: 20px;
  height: 120px;
  background: #111;
  margin: 0 auto;
  box-shadow: 3px 0 5px rgba(0, 0, 0, 0.5);
}

.chair-wheel {
  position: absolute;
  bottom: 20px;
  width: 25px;
  height: 20px;
  background: #0d0d0d;
  border-radius: 5px;
}

.wheel-1 {
  left: 45px;
}

.wheel-2 {
  right: 45px;
}


/* ==========================================================================
   STAGE 2: COMPUTER MONITOR & COLLECTOROS
   ========================================================================== */
.monitor-wrapper {
  position: absolute;
  bottom: 395px;
  left: 310px;
  /* Aligned nicely on the desk */
  width: 440px;
  height: 340px;
  z-index: 14;
}

.monitor-neck {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 50px;
  background: #cbd3d8;
  border-bottom: 5px solid #9ba2a6;
  box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.2), 0 5px 10px rgba(0, 0, 0, 0.3);
}

.monitor-base {
  position: absolute;
  bottom: -43px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 12px;
  background: #a3acb1;
  border-radius: 10px 10px 2px 2px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.4);
}

.monitor-body {
  width: 100%;
  height: 100%;
  background: #e1e7ea;
  border-radius: 20px;
  box-shadow: inset -10px -10px 20px rgba(0, 0, 0, 0.1), inset 10px 10px 20px rgba(255, 255, 255, 0.7), 5px 10px 25px rgba(0, 0, 0, 0.3);
  position: relative;
  padding: 18px;
}

.monitor-power-btn {
  position: absolute;
  bottom: 4px;
  right: 40px;
  width: 15px;
  height: 10px;
  background: #607d8b;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.power-led {
  display: block;
  width: 4px;
  height: 4px;
  background: #4caf50;
  /* Green (booted) */
  margin: 3px auto;
  border-radius: 50%;
  box-shadow: 0 0 6px #4caf50;
  transition: all 0.3s ease;
}

body:not(.computer-on) .power-led {
  background: #f44336;
  /* Red (shutdown) */
  box-shadow: 0 0 6px #f44336;
}

.screen-frame {
  width: 100%;
  height: calc(100% - 10px);
  background: #111b1e;
  border-radius: 8px;
  box-shadow: inset 3px 3px 10px rgba(0, 0, 0, 0.8), inset -3px -3px 5px rgba(255, 255, 255, 0.1);
  padding: 6px;
  position: relative;
}

.screen-surface {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: var(--os-bg);
  overflow: hidden;
  border-radius: 4px;
}

/* Glass glare CRT effects */
.screen-glare {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at 80% 10%, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 1000;
}

.crt-scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.04), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.04));
  background-size: 100% 4px, 6px 100%;
  pointer-events: none;
  z-index: 999;
}

/* CRT Screen Power Off animation cover */
.crt-off-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 998;
  opacity: 0;
  pointer-events: none;
}

/* CRT Animations */
@keyframes crt-power-off {
  0% {
    transform: scaleX(1) scaleY(1);
    opacity: 1;
    filter: brightness(1) contrast(1);
  }

  40% {
    /* Flatten vertically into a thin bright line first */
    transform: scaleX(1) scaleY(0.005);
    opacity: 1;
    filter: brightness(2);
    /* Simulates the phosphor concentration glow */
  }

  85% {
    /* Collapse horizontally into a single center point */
    transform: scaleX(0) scaleY(0.005);
    opacity: 1;
  }

  100% {
    /* Fade out completely */
    transform: scaleX(0) scaleY(0);
    opacity: 0;
  }
}

@keyframes crt-power-on {
  0% {
    transform: scaleY(0) scaleX(0);
    filter: brightness(5);
    opacity: 1;
  }

  40% {
    transform: scaleY(0.02) scaleX(1);
    filter: brightness(2);
    opacity: 1;
  }

  100% {
    transform: scaleY(1) scaleX(1);
    filter: brightness(1);
    opacity: 0;
  }
}

.crt-shutdown {
  animation: crt-power-off 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  pointer-events: all !important;
}

.crt-bootup {
  animation: crt-power-on 0.6s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* --- BIOS Boot sequence UI --- */
#bios-boot-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  color: #00ff00;
  font-family: var(--font-retro);
  font-size: 0.42rem;
  line-height: 1.6;
  padding: 10px;
  z-index: 950;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: opacity 0.5s ease;
}

#bios-boot-screen p {
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

#bios-boot-screen .blink {
  animation: bios-blink 1s step-end infinite;
}

@keyframes bios-blink {
  50% {
    opacity: 0;
  }
}

/* --- CollectorOS Desktop Grid --- */
#desktop-os {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  background-color: var(--os-bg);
  z-index: 2000;

  font-family: var(--font-os);
  overflow: hidden;
}

#desktop-os.booted {
  display: block;
}

.desktop-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% - 40px);
  /* Leaves space for taskbar */
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 20px;
}

.desktop-icon {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.desktop-icon:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.desktop-icon:active {
  background-color: rgba(255, 255, 255, 0.3);
}

.icon-graphic {
  color: #fff;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  margin-bottom: 8px;
}

.icon-graphic svg {
  width: 44px;
  height: 44px;
}

.icon-power {
  color: #ff3b30;
}

/* Makes sure custom images scale nicely inside the desktop icons */
.icon-graphic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Prevents stretching */
  pointer-events: none;
  /* Disables accidental image dragging */
  image-rendering: pixelated;
  /* Optional: adds a crisp retro look to small images */
}

.icon-label {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 500;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  word-break: break-all;
  line-height: 1.3;
  margin-top: 4px;
}

/* --- Draggable OS Window Layout --- */
.windows-container {
  width: 100%;
  height: calc(100% - 40px);
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.window {
  position: absolute;
  background: var(--os-window-bg);
  border: 1px solid var(--os-window-border);
  border-radius: 8px;
  box-shadow: var(--os-window-shadow);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  z-index: 100;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.window.active-window {
  z-index: 200;
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--accent-neon-blue);
}

.window-header {
  height: 36px;
  background: #d6d6d6;
  border-bottom: 1px solid #b5b5b5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 12px;
  cursor: move;
}

.window.active-window .window-header {
  background: var(--os-active-header);
  color: #fff;
  border-bottom: none;
}

.window-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #333;
}

.window.active-window .window-title {
  color: #fff;
}

.title-icon {
  width: 16px;
  height: 16px;
}

.window-controls {
  display: flex;
  gap: 6px;
}

.win-btn {
  width: 20px;
  height: 20px;
  border: 1px solid #b5b5b5;
  background: #f0f0f0;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.win-btn:hover {
  background: #ddd;
}

.win-btn.win-close:hover {
  background: #ff5f56;
  color: #fff;
  border-color: #ff5f56;
}

.window-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  color: #111;
  font-size: 0.9rem;
}

/* Glassmorphism content styling */
.text-document {
  background: rgba(255, 255, 255, 0.7);
  line-height: 1.5;
}

.text-document h2 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: #000;
}

.text-document h3 {
  font-size: 1.05rem;
  margin-top: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 4px;
}

.text-document hr {
  border: none;
  border-top: 1px dashed rgba(0, 0, 0, 0.2);
  margin: 12px 0;
}

/* File Explorer styling */
.file-explorer {
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  flex-direction: column;
  padding: 0;
}

.explorer-toolbar {
  background: #eee;
  border-bottom: 1px solid #ccc;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-btn {
  background: #fff;
  border: 1px solid #ccc;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
}

.toolbar-btn:hover {
  background: #e6e6e6;
}

.toolbar-path {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #555;
  background: #fff;
  border: 1px solid #ddd;
  padding: 4px 10px;
  flex: 1;
  border-radius: 3px;
}

.explorer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

.explorer-item {
  width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
}

.explorer-item:hover {
  background: rgba(0, 0, 0, 0.05);
}

.item-icon {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.item-label {
  font-size: 0.8rem;
  color: #333;
  word-break: break-all;
  font-weight: 500;
}

/* Explored Project Detailed Subpanel */
.project-details-subpanel {
  padding: 20px;
  animation: fadeIn 0.3s ease;
}

.back-to-explorer {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 0.8rem;
  margin-bottom: 12px;
  cursor: pointer;
}

.back-to-explorer:hover {
  background: #e0e0e0;
}

#subpanel-title {
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.subpanel-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.badge {
  background: #e0f2fe;
  color: #0369a1;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

#subpanel-desc {
  line-height: 1.5;
  margin-bottom: 12px;
}

.subpanel-features h4 {
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.subpanel-features ul {
  padding-left: 20px;
}

/* Terminal Body & Prompt styling */
.terminal-body {
  background: #080808;
  color: #39ff14;
  /* Matrix Green */
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  padding: 12px;
  position: relative;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  margin-bottom: 10px;
  line-height: 1.5;
}

.terminal-output p {
  white-space: pre-wrap;
  word-break: break-all;
}

.terminal-input-line {
  display: flex;
  align-items: center;
}

.prompt {
  color: var(--accent-neon-pink);
  margin-right: 8px;
}

.cmd-input {
  background: transparent;
  border: none;
  color: #39ff14;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  flex: 1;
  outline: none;
}

/* Matrix Falling Code Easter Egg Canvas */
#matrix-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  opacity: 0.85;
}

/* --- Taskbar --- */
.taskbar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  background: #d6d6d6;
  border-top: 2px solid #fff;
  z-index: 500;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.start-menu-btn {
  background: #e0e0e0;
  border: 1px solid #fff;
  border-right-color: #888;
  border-bottom-color: #888;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.9rem;
  color: #333;
  box-shadow: inset 1px 1px 0 #fff;
}

.start-menu-btn:hover {
  background: #eee;
}

.start-menu-btn:active {
  border-color: #888;
  border-right-color: #fff;
  border-bottom-color: #fff;
  box-shadow: inset -1px -1px 0 #fff;
}

/* Start Menu Popup UI */
.start-menu {
  position: absolute;
  bottom: 42px;
  left: 8px;
  width: 180px;
  background: #f0f0f0;
  border: 2px solid #fff;
  border-right-color: #888;
  border-bottom-color: #888;
  display: none;
  box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3);
  z-index: 600;
}

.start-menu-sidebar {
  width: 32px;
  background: linear-gradient(180deg, var(--accent-neon-pink), var(--accent-neon-blue));
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 2px;
  padding: 10px 0;
}

.start-menu-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.start-item {
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.8rem;
  color: #333;
  font-weight: 500;
}

.start-item:hover {
  background: var(--accent-neon-blue);
  color: #fff;
}

.start-icon {
  font-size: 1rem;
}

.start-divider {
  border: none;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #fff;
  margin: 6px 0;
}

.taskbar-tabs {
  flex: 1;
  margin-left: 12px;
  display: flex;
  gap: 6px;
  overflow: hidden;
  height: 30px;
  align-items: center;
}

.taskbar-tab {
  background: #e0e0e0;
  border: 1px solid #fff;
  border-right-color: #888;
  border-bottom-color: #888;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: #333;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.taskbar-tab.active-tab {
  background: #c5c5c5;
  border-color: #888;
  border-right-color: #fff;
  border-bottom-color: #fff;
  font-weight: bold;
}

.system-tray {
  border: 1px solid #888;
  border-right-color: #fff;
  border-bottom-color: #fff;
  background: #c5c5c5;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 30px;
  font-size: 0.78rem;
  color: #333;
}

.tray-icon {
  cursor: pointer;
}

/* Full-Screen CRT Shutdown Animation Layer */
#crt-shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #000;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

#crt-shutdown-screen.crt-active {
  pointer-events: all;
  opacity: 1;
  animation: crt-power-off 1.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  z-index: 9999;
}

#crt-shutdown-screen.crt-deactive {
  pointer-events: all;
  opacity: 1;
  animation: crt-power-on 1.3s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  z-index: 9999;
}


/* ==========================================================================
   STAGE 3: PERSONAL PROJECTS BINDER
   ========================================================================== */
#binder-stage {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(139, 90, 43, 0.4) 0%, rgba(92, 58, 33, 0.8) 100%);
  display: none;
  z-index: 1000;
  padding: 60px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

body.state-binder #binder-stage {
  display: flex;
}

/* Close/Back button inside Binder zoom view */
.back-to-room-btn {
  background: rgba(56, 55, 55, 0.829);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 20px;
  border-radius: 30px;
  cursor: pointer;
  font-family: var(--font-title);
  font-size: 0.9rem;
  margin-bottom: 25px;
  align-self: flex-start;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
  z-index: 3010;
}

.back-to-room-btn:hover {
  background: var(--accent-neon-blue);
  border-color: #fff;
  transform: translateX(-4px);
  box-shadow: 0 4px 15px rgba(0, 210, 255, 0.4);
}

.binder-container {
  width: 950px;
  height: 600px;
  display: flex;
  position: relative;
  background: #4a1515;
  /* Exterior heavy binder spine folder edge */
  border-radius: 12px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
  padding: 15px;
  perspective: 1200px;
}

/* Individual Pages */
.binder-page {
  flex: 1;
  height: 100%;
  position: relative;
  overflow: visible;
}

.left-page {
  transform-origin: right center;
}

.right-page {
  transform-origin: left center;
}

.page-content {
  width: 100%;
  height: 100%;
  background: #faf6ee;
  border-radius: 4px;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.06), 2px 5px 15px rgba(0, 0, 0, 0.15);
  padding: 40px;
  color: var(--text-dark);
  position: relative;
}

/* Spiral rings in center gap */
.binder-rings {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: calc(100% - 30px);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.ring {
  width: 45px;
  height: 16px;
  background: linear-gradient(to bottom, #dcdcdc, #777 50%, #eee);
  border-radius: 8px;
  box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.4);
  transform: translate(0, 0);
}

/* Paper Texture overlay simulation */
.paper-texture {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(230, 210, 180, 0.2), rgba(0, 0, 0, 0) 20%);
  background-size: 100% 24px, 100% 100%;
}

/* Content Layout inside Binder (Sketchbook aesthetic) */
.binder-title {
  font-family: var(--font-hand);
  font-size: 3.2rem;
  font-weight: 700;
  color: #3b2314;
  margin-top: 20px;
  margin-bottom: 2px;
  line-height: 1.1;
}

.binder-subtitle {
  font-family: var(--font-title);
  font-size: 0.95rem;
  color: #7c4f30;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 30px;
  font-weight: 500;
}

.binder-info-box {
  width: 180px;
  border: 1px dashed rgba(92, 58, 33, 0.4);
  border-radius: 6px;
  padding: 5px;
  background: rgba(253, 245, 230, 0.5);
  font-size: 1.1rem;
  font-family: var(--font-hand);
  line-height: 1.5;
  color: #5c2721;
}

.binder-intro-box {
  border: 1px dashed rgba(92, 58, 33, 0.4);
  border-radius: 6px;
  padding: 15px;
  background: rgba(253, 245, 230, 0.5);
  font-size: 1.1rem;
  font-family: var(--font-hand);
  line-height: 1.5;
  color: #5c3a21;
}

.binder-intro-box p {
  margin-bottom: 10px;
}

.binder-intro-box p:last-child {
  margin-bottom: 0;
}

.sticky-note {
  position: absolute;
  top: 40px;
  right: -30px;
  width: 170px;
  height: 170px;
  background: #ffeb3b;
  box-shadow: -5px 8px 15px rgba(0, 0, 0, 0.2), inset 0 0 10px rgba(0, 0, 0, 0.05);
  transform: rotate(5deg);
  padding: 20px;
  color: #333;
  z-index: 10;
}

.sticky-note h4 {
  font-family: var(--font-hand);
  font-size: 1.3rem;
  margin-bottom: 6px;
  text-decoration: underline;
}

.sticky-note p {
  font-family: var(--font-hand);
  font-size: 1.1rem;
  line-height: 1.3;
}

/* Tape strips overlay */
.tape-piece {
  position: absolute;
  width: 80px;
  height: 24px;
  background: rgba(250, 235, 215, 0.6);
  backdrop-filter: blur(1px);
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.05);
  z-index: 11;
}

.tape-top-right {
  top: 25px;
  right: 15px;
  transform: rotate(35deg);
}

.tape-top-left {
  top: -12px;
  left: 20px;
  transform: rotate(-15deg);
}

/* Polaroid Photo Component */
.polaroid-frame {
  width: 200px;
  background: #fdfdfd;
  padding: 10px 10px 24px 10px;
  box-shadow: 5px 8px 20px rgba(0, 0, 0, 0.15);
  position: absolute;
  top: 40px;
  left: 40px;
  z-index: 5;
  border-radius: 2px;
}

.polaroid-image {
  width: 100%;
  height: 140px;
  background: #eee;
  border-radius: 1px;
}

/* Dynamic custom generated polaroid representations */
.img-placeholder-engine {
  background: linear-gradient(135deg, #2a2a72 0%, #0099ff 100%);
  position: relative;
  overflow: hidden;
}

.img-placeholder-engine::before {
  content: 'VOXELS';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-retro);
  font-size: 0.65rem;
  color: #fff;
  letter-spacing: 1px;
}

.img-placeholder-synth {
  background: linear-gradient(45deg, #f40076 0%, #df98fa 100%);
}

.img-placeholder-synth::before {
  content: 'SYNTH';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-retro);
  font-size: 0.65rem;
  color: #fff;
}

.img-placeholder-trace {
  background: linear-gradient(180deg, #13547a 0%, #80d0c7 100%);
}

.img-placeholder-trace::before {
  content: '3D RAY';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-retro);
  font-size: 0.65rem;
  color: #fff;
}

.img-placeholder-sketch {
  background: #e0d0b8;
  background-image: radial-gradient(#6c4a30 1px, transparent 0), radial-gradient(#6c4a30 1px, transparent 0);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

.img-placeholder-sketch::before {
  content: 'DOODLES';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-retro);
  font-size: 0.55rem;
  color: #6c4a30;
}

.polaroid-caption {
  font-family: var(--font-hand);
  font-size: 1.15rem;
  text-align: center;
  color: #444;
  margin-top: 10px;
  font-weight: 700;
}

/* Handwritten Right Page details */
.project-title-handwritten {
  font-family: var(--font-hand);
  font-size: 2.5rem;
  color: #2b1d11;
  margin-top: 180px;
  /* Leaves room for polaroid */
  margin-bottom: 2px;
  font-weight: 700;
  text-decoration: underline;
}

.project-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tag {
  background: rgba(124, 79, 48, 0.12);
  border: 1px dashed rgba(124, 79, 48, 0.4);
  color: #7c4f30;
  padding: 2px 8px;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.project-description-handwritten {
  font-family: var(--font-hand);
  font-size: 1.25rem;
  line-height: 1.5;
  color: #44352a;
  margin-bottom: 20px;
}

.project-description-handwritten p {
  margin-bottom: 10px;
}

.binder-links {
  display: flex;
  gap: 15px;
}

.btn-handdrawn {
  display: inline-block;
  font-family: var(--font-hand);
  font-size: 1.2rem;
  font-weight: bold;
  text-decoration: none;
  color: #8b1e1e;
  border: 2px solid #8b1e1e;
  padding: 6px 16px;
  border-radius: 255px 15px 225px 15px/15px 225px 15px 255px;
  /* Sketched rough border look */
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.4);
}

.btn-handdrawn:hover {
  background: #8b1e1e;
  color: #fff;
  transform: translateY(-2px) rotate(1deg);
}

/* Page Numbers */
.page-number {
  position: absolute;
  bottom: 15px;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: #7c4f30;
  opacity: 0.7;
}

.left-page .page-number {
  left: 40px;
}

.right-page .page-number {
  right: 40px;
}

/* Custom Binder doodles */
.binder-doodle {
  position: absolute;
  pointer-events: none;
}

.coffee-ring {
  width: 90px;
  height: 90px;
  border: 3px solid rgba(124, 79, 48, 0.15);
  border-radius: 50%;
  box-shadow: inset 0 0 10px rgba(124, 79, 48, 0.05);
}

/* Clickable Divider Tabs on binder right page */
.binder-tabs {
  position: absolute;
  right: -58px;
  top: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1;
}

.binder-tab {
  width: 58px;
  padding: 8px 4px 8px 10px;
  background: #cd853f;
  color: #fff;
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 0 8px 8px 0;
  box-shadow: 3px 2px 5px rgba(0, 0, 0, 0.15);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform-origin: left center;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.binder-tab:hover {
  padding-left: 18px;
  background: #d2691e;
  transform: scaleY(1.05);
}

.binder-tab.active-tab {
  background: #8b1e1e !important;
  padding-left: 20px;
  z-index: 10;
}

.tab-intro {
  background: #607d8b;
}

.tab-voxel {
  background: #3f51b5;
}

.tab-synth {
  background: #e91e63;
}

.tab-raytracer {
  background: #009688;
}

.tab-sketchbook {
  background: #795548;
}

/* Page turn animation styles */
.page-turn-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #faf6ee;
  border-radius: 4px;
  z-index: 20;
  transform-origin: left center;
  transform: rotateY(0deg);
  opacity: 0;
  pointer-events: none;
  box-shadow: inset 10px 0 30px rgba(0, 0, 0, 0.1);
}

.page-flip-animate {
  animation: page-flip-right 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes page-flip-right {
  0% {
    transform: rotateY(0deg);
    opacity: 1;
  }

  45% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  100% {
    transform: rotateY(-180deg);
    opacity: 0;
  }
}

/* General FadeIn utility */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ==========================================================================
   MOBILE & RESPONSIVE LAYOUT SCALING
   ========================================================================== */
@media (max-width: 1200px) {

  /* Scale down the entire #view-container viewport utilizing CSS transform */
  #viewport {
    align-items: center;
    justify-content: center;
  }

  #view-container {
    /* Auto scale down to fit smaller screens nicely using JS calculations or manual media clamps */
    transform-origin: center center;
  }
}

@media (max-width: 768px) {

  /* Simple prompt to recommend landscape orientation or desktop device */
  #audio-panel {
    top: 5px;
    right: 5px;
  }
}


/* Custom Desktop Icon Image Auto-Scaling */
.icon-graphic img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
  /* Keeps your images proportional */
  pointer-events: none;
  /* Stops accidental image dragging on screen */
  image-rendering: pixelated;
  /* Optional: gives high-res images a crisp retro feel */

}

