/* Bruno-Simon-style 3D portfolio UI overlay */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #FFB070; color: #fff; font-family: 'Space Grotesk', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
#world { position: fixed; inset: 0; z-index: 1; }
#world canvas { display: block; width: 100%; height: 100%; }

/* Loading */
.loader { position: fixed; inset: 0; z-index: 100; background: #FFB070; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: opacity .8s ease, visibility .8s; }
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader .logo { font-family: 'Permanent Marker', cursive; font-size: 64px; color: #ffb070; text-shadow: 0 0 40px rgba(255,176,112,.6); margin-bottom: 32px; }
.loader .bar { width: 280px; height: 4px; background: rgba(255,255,255,.1); border-radius: 2px; overflow: hidden; }
.loader .bar i { display: block; height: 100%; background: linear-gradient(90deg, #FFB070, #FFE066); width: 0; transition: width .3s ease; }
.loader .pct { margin-top: 12px; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: .3em; color: rgba(62, 36, 24, 0.55); }

/* Start screen */
.start { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; text-align: center; padding: 24px; cursor: pointer; }
.start.hidden { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .6s, visibility .6s; }
.start .scribble { font-family: 'Permanent Marker', cursive; font-size: clamp(40px, 7vw, 96px); color: #fff; text-shadow: 0 4px 12px rgba(122,74,40,0.5); line-height: 1; }
.start .scribble .pink { color: #ffb070; }
.start .scribble .cyan { color: #5ce5ff; }
.start .sub { font-family: 'Caveat', cursive; font-size: clamp(20px, 2.5vw, 32px); color: rgba(255, 247, 235, 0.85); }
.start .play-btn { pointer-events: auto; font-family: 'Permanent Marker', cursive; font-size: 24px; padding: 18px 48px; background: #ffb070; color: #fff; border: none; border-radius: 60px; cursor: pointer; box-shadow: 0 8px 0 #A55A28, 0 12px 30px rgba(255,176,112,.4); letter-spacing: .05em; transition: transform .2s, box-shadow .2s; animation: bob 2s ease-in-out infinite; }
.start .play-btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 12px 40px rgba(255,176,112,.7); }
@keyframes bob { 50% { transform: translateY(-6px); } }

.start .hint { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .25em; color: rgba(62, 36, 24, 0.55); text-transform: uppercase; }

/* HUD */
.hud { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { position: absolute; top: 16px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.brand { font-family: 'Permanent Marker', cursive; font-size: 22px; color: #3E2418; text-shadow: 0 2px 4px rgba(255, 247, 235, 0.6); }
.brand .pink { color: #ffb070; }
.controls-card { background: rgba(255, 247, 235, 0.78); backdrop-filter: blur(10px); border: 1px solid rgba(122, 74, 40, 0.35); border-radius: 14px; padding: 14px 18px; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .12em; line-height: 1.8; color: #3E2418; text-transform: uppercase; }
.controls-card kbd { display: inline-block; min-width: 24px; padding: 2px 8px; border: 1px solid rgba(122, 74, 40, 0.5); border-radius: 4px; background: #FFE066; color: #3E2418; font-family: inherit; margin-right: 6px; }

.speedo { position: absolute; bottom: 24px; left: 24px; font-family: 'Permanent Marker', cursive; color: #fff; text-shadow: 0 2px 6px rgba(255, 247, 235, 0.6); }
.speedo .num { font-size: 56px; line-height: 1; color: #5ce5ff; }
.speedo .unit { font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .3em; color: rgba(62, 36, 24, 0.7); margin-left: 6px; text-transform: uppercase; }

/* Side toolbar */
.toolbar { position: absolute; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.toolbar button { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; padding: 10px 14px; border: 1px solid rgba(122, 74, 40, 0.35); background: rgba(255, 247, 235, 0.78); backdrop-filter: blur(10px); color: #3E2418; border-radius: 10px; cursor: pointer; transition: all .2s; }
.toolbar button:hover { border-color: #FFB070; color: #FFB070; }
.toolbar button.active { background: #FFB070; color: #fff; border-color: #FFB070; box-shadow: 0 4px 0 #A55A28; }

/* Mobile controls */
.mobile-ctrl { position: fixed; bottom: 0; left: 0; right: 0; padding: 14px; display: none; justify-content: space-between; align-items: flex-end; pointer-events: none; z-index: 95; }
.mobile-ctrl > * { pointer-events: auto; }
.joystick { width: 130px; height: 130px; border-radius: 50%; background: rgba(255, 247, 235, 0.55); backdrop-filter: blur(10px); border: 1px solid rgba(122, 74, 40, 0.4); position: relative; touch-action: none; }
.joystick .nub { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,176,112,.75); border: 2px solid rgba(255,255,255,.6); box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.btn-group { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.btn-row { display: flex; gap: 8px; }
.btn-act {
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid rgba(122, 74, 40, 0.5);
  background: rgba(255, 247, 235, 0.7);
  backdrop-filter: blur(10px);
  color: #3E2418; font-family: 'Permanent Marker', cursive; font-size: 22px;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,.25);
  transition: transform 0.08s ease, background 0.15s ease;
}
.btn-act:active { transform: scale(0.92); background: rgba(255, 224, 102, 0.85); }
.btn-action { background: rgba(255,138,110,.55) !important; font-size: 18px; }
.btn-jump { background: rgba(92,229,255,.55) !important; font-size: 22px; }
.btn-reset { background: rgba(255,224,102,.55) !important; font-size: 22px; }
.btn-cable { background: rgba(159,239,0,.45) !important; }
.btn-cam { background: rgba(255,200,160,.55) !important; }
.btn-fly { background: rgba(180,140,255,.5) !important; }
.btn-board { background: rgba(255,138,110,.55) !important; font-size: 18px; }
.btn-enter { background: rgba(180,200,255,.55) !important; font-size: 18px; }

@media (max-width: 768px), (pointer: coarse) {
  .mobile-ctrl { display: flex; }
  .controls-card { display: none; }
  .speedo .num { font-size: 30px; }
  .speedo { padding: 8px 14px !important; }
  .visit-counter { font-size: 11px !important; padding: 6px 10px !important; }
  .minimap-wrap { width: 90px !important; height: 90px !important; right: 8px !important; top: 8px !important; }
  .minimap-wrap canvas { width: 90px !important; height: 90px !important; }
  /* Hide the desktop right-side button stack — its functions live in the mobile button grid */
  .hud-tr { display: none !important; }
  /* Modals fit small screens */
  .zone-panel { max-height: 80vh; overflow-y: auto; padding: 18px 20px; }
  /* Reposition bottom-left so it doesn't overlap the joystick */
  .visit-counter { bottom: 165px !important; left: 10px !important; font-size: 11px !important; padding: 5px 9px !important; }
  .online-counter { bottom: 145px !important; left: 10px !important; font-size: 11px !important; padding: 5px 9px !important; }
  /* Move chat fab to top-left so it's away from joystick + buttons */
  .chat-fab { font-size: 12px !important; padding: 6px 10px !important; bottom: auto !important; top: 60px !important; left: 8px !important; }
  /* Hide nitro-boost banner — too much chatter on small screen */
  #nitroBanner { font-size: 11px !important; padding: 5px 10px !important; bottom: auto !important; top: 8px !important; }
}
@media (max-width: 480px) {
  .joystick { width: 110px; height: 110px; }
  .joystick .nub { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .btn-act { width: 48px; height: 48px; font-size: 18px; }
  .btn-action { font-size: 15px; }
  .mobile-ctrl { padding: 10px; }
}

/* Info panel (zone) */
.zone-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.92); z-index: 60; max-width: 540px; width: 90vw; background: rgba(255, 247, 235, 0.95); backdrop-filter: blur(12px); border: 2px solid #FFB070; border-radius: 18px; padding: 28px 32px; color: #3E2418; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; box-shadow: 0 20px 60px rgba(122,74,40,.4), 0 0 40px rgba(255,176,112,.25); }
.zone-panel.show { opacity: 1; transform: translate(-50%, -50%) scale(1); pointer-events: auto; }
.zone-panel h2 { font-family: 'Permanent Marker', cursive; font-size: 32px; color: #ffb070; margin-bottom: 8px; }
.zone-panel .kicker { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: .3em; color: #7A4A28; text-transform: uppercase; margin-bottom: 16px; }
.zone-panel p { font-size: 15px; line-height: 1.55; color: rgba(62, 36, 24, 0.85); margin-bottom: 16px; }
.zone-panel .meta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; font-family: 'JetBrains Mono', monospace; font-size: 12px; }
.zone-panel .meta dt { color: rgba(122, 74, 40, 0.6); text-transform: uppercase; letter-spacing: .15em; }
.zone-panel .meta dd { color: #3E2418; }
.zone-panel .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.zone-panel .btn { font-family: 'Permanent Marker', cursive; font-size: 14px; padding: 10px 22px; border-radius: 30px; border: none; cursor: pointer; text-decoration: none; display: inline-block; }
.zone-panel .btn.primary { background: #ffb070; color: #fff; }
.zone-panel .btn.ghost { background: transparent; color: #3E2418; border: 1px solid rgba(122, 74, 40, 0.5); }
.zone-panel .close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: rgba(122, 74, 40, 0.6); font-size: 22px; cursor: pointer; }
.zone-panel .photo { display: block; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; border: 3px solid #ffb070; box-shadow: 0 0 24px rgba(255,176,112,.5); }
.zone-panel .photo[hidden] { display: none; }

/* Press-E interact prompt — bottom center, only visible when near interactable */
.interact-prompt {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px);
  z-index: 70; padding: 14px 26px;
  background: rgba(255, 247, 235, 0.94); backdrop-filter: blur(10px);
  border: 2px solid #FFB070; border-radius: 999px;
  font-family: 'Permanent Marker', cursive; color: #3E2418; font-size: 16px;
  box-shadow: 0 6px 0 rgba(122, 74, 40, 0.35), 0 12px 32px rgba(0,0,0,.3);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  white-space: nowrap;
}
.interact-prompt.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.interact-prompt .pink { color: #ffb070; }
.interact-prompt kbd {
  display: inline-block; min-width: 24px; padding: 3px 9px; margin: 0 4px;
  border: 1px solid rgba(122, 74, 40, 0.5); border-radius: 5px;
  background: #FFE066; color: #3E2418;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
}

/* Hire-me banner — top center, above brand */
.hire-banner {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  font-family: 'Permanent Marker', cursive; font-size: 14px; color: #3E2418;
  background: rgba(255, 247, 235, 0.94); backdrop-filter: blur(10px);
  border: 2px solid #c1ff12; border-radius: 999px;
  padding: 8px 18px; cursor: pointer;
  box-shadow: 0 4px 0 rgba(122, 74, 40, 0.25), 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: auto; transition: transform .2s, box-shadow .2s;
  display: flex; align-items: center; gap: 8px;
}
.hire-banner:hover { transform: translateX(-50%) translateY(-2px); box-shadow: 0 6px 0 rgba(122, 74, 40, 0.35), 0 10px 28px rgba(0, 0, 0, 0.3); }
.hire-banner .pink { color: #FFB070; }
.hire-banner .dot {
  width: 9px; height: 9px; border-radius: 50%; background: #c1ff12;
  box-shadow: 0 0 8px #c1ff12;
  animation: hire-pulse 1.5s ease-in-out infinite;
}
@keyframes hire-pulse {
  50% { transform: scale(1.4); box-shadow: 0 0 16px #c1ff12; }
}

/* Coin counter HUD — bottom-left above speedo */
.coin-hud {
  position: absolute; bottom: 110px; left: 24px;
  font-family: 'Permanent Marker', cursive; font-size: 22px;
  color: #FFE066;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 12px rgba(255, 224, 102, 0.6);
  pointer-events: none;
}
.coin-hud span { color: #fff; }

/* Cinematic intro overlay (shows during 6-sec fly-over after Play) */
.cinematic-overlay {
  position: fixed; inset: 0; z-index: 95; pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s;
}
.cinematic-overlay.show { opacity: 1; visibility: visible; }
.cinematic-bars { position: absolute; inset: 0; pointer-events: none; }
.cinematic-bar {
  position: absolute; left: 0; right: 0; height: 0; background: #000;
  transition: height 1.2s cubic-bezier(.4, 0, .2, 1);
}
.cinematic-bar-top { top: 0; }
.cinematic-bar-bot { bottom: 0; }
.cinematic-overlay.show .cinematic-bar { height: 80px; }
.cinematic-title {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.8);
}
.cinematic-line {
  font-family: 'Permanent Marker', cursive; color: #fff;
  margin: 8px 0; opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s ease, transform .8s ease;
}
.cinematic-line-1 {
  font-size: clamp(64px, 11vw, 160px); color: #ffb070;
  text-shadow: 0 0 40px rgba(255, 176, 112, 0.8);
}
.cinematic-line-2 {
  font-family: 'Caveat', cursive; font-size: clamp(28px, 4vw, 52px);
  color: #fff; opacity: 0.95;
}
.cinematic-line-3 {
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  letter-spacing: 0.4em; text-transform: uppercase;
  color: #5ce5ff;
}
.cinematic-overlay.show .cinematic-line-1 {
  opacity: 1; transform: translateY(0); transition-delay: 0.4s;
}
.cinematic-overlay.show .cinematic-line-2 {
  opacity: 1; transform: translateY(0); transition-delay: 1.2s;
}
.cinematic-overlay.show .cinematic-line-3 {
  opacity: 1; transform: translateY(0); transition-delay: 2.0s;
}

/* Minimap (top-right of HUD) */
.minimap-wrap {
  position: absolute; top: 90px; right: 16px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  pointer-events: auto;
}
.minimap-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px; letter-spacing: .25em; text-transform: uppercase;
  color: #3E2418; opacity: 0.75;
  background: rgba(255, 247, 235, 0.85); padding: 4px 10px; border-radius: 6px;
  border: 1px solid rgba(122, 74, 40, 0.35);
}
.minimap {
  width: 220px; height: 220px; display: block;
  border-radius: 16px;
  border: 2px solid #FFB070;
  box-shadow: 0 6px 0 rgba(122, 74, 40, 0.35), 0 12px 32px rgba(0,0,0,.25);
  cursor: crosshair;
  background: #FFF7EB;
}
.minimap:hover { border-color: #FFE066; }
@media (max-width: 768px), (pointer: coarse) {
  .minimap-wrap { top: 70px; right: 8px; }
  .minimap { width: 140px; height: 140px; }
  .minimap-label { font-size: 8px; padding: 3px 7px; }
}

/* Toast */
.toast { position: absolute; left: 50%; bottom: 110px; transform: translateX(-50%) translateY(20px); z-index: 55; padding: 12px 22px; background: rgba(255, 247, 235, 0.92); backdrop-filter: blur(8px); border: 1px solid rgba(122, 74, 40, 0.4); border-radius: 30px; font-family: 'Permanent Marker', cursive; color: #3E2418; font-size: 14px; opacity: 0; transition: opacity .3s, transform .3s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast .pink { color: #ffb070; }

/* Multiplayer / visitor counter / share / achievements / trial HUD chips */
.mp-status, .visitor-counter {
  position: absolute; font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .15em;
  background: rgba(255, 247, 235, 0.85); border: 1px solid rgba(122, 74, 40, 0.4); color: #3E2418;
  padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(6px);
  pointer-events: none;
}
/* Pushed to top-left so they don't overlap the "ASK IMRAN" chat fab in the bottom-left */
.mp-status { left: 16px; top: 240px; bottom: auto; }
.visitor-counter { left: 16px; top: 210px; bottom: auto; }
.visitor-counter span { color: #ffb070; }
.achv-btn, .share-btn {
  position: absolute; right: 16px; padding: 8px 14px; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; letter-spacing: .15em;
  background: rgba(255, 247, 235, 0.85); border: 1px solid rgba(122, 74, 40, 0.4); color: #3E2418;
  border-radius: 10px; backdrop-filter: blur(6px); transition: all .15s;
}
.achv-btn:hover, .share-btn:hover { border-color: #ffb070; color: #ffb070; }
.achv-btn { top: 70px; }
.share-btn { top: 70px; right: 110px; }
.trial-hud {
  position: absolute; left: 50%; top: 70px; transform: translateX(-50%);
  background: rgba(255, 247, 235, 0.92); border: 2px solid #ffb070; color: #3E2418;
  padding: 8px 18px; border-radius: 999px; font-family: 'Permanent Marker', cursive; font-size: 16px;
  pointer-events: none;
}
.trial-hud span { color: #ffb070; }

/* Achievements modal */
.achv-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 80; padding: 24px 32px; min-width: 380px; max-width: 90vw;
  background: rgba(255, 247, 235, 0.97); backdrop-filter: blur(14px);
  border: 2px solid #ffb070; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35), 0 0 60px rgba(255, 176, 112, 0.3);
  color: #3E2418;
}
.achv-modal h2 { font-family: 'Permanent Marker', cursive; font-size: 28px; color: #ffb070; margin-bottom: 16px; }
.achv-close { position: absolute; top: 12px; right: 16px; background: none; border: none; color: #7A4A28; font-size: 26px; cursor: pointer; }
.achv-list { display: flex; flex-direction: column; gap: 8px; }
.achv-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: rgba(122, 74, 40, 0.1); border-radius: 10px; opacity: 0.55; }
.achv-row.got { background: rgba(255, 176, 112, 0.15); opacity: 1; }
.achv-row .achv-icon { font-size: 22px; }
.achv-row .achv-text { font-family: 'Caveat', cursive; font-size: 18px; }

/* Photo mode */
.photo-mode {
  position: fixed; inset: 0; z-index: 200;
  pointer-events: none;
}
.photo-mode .photo-controls {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 12px; pointer-events: auto;
}
.photo-mode button {
  font-family: 'Permanent Marker', cursive; font-size: 16px; padding: 12px 24px;
  background: rgba(255, 247, 235, 0.95); border: 2px solid #ffb070; color: #3E2418;
  border-radius: 999px; cursor: pointer;
  box-shadow: 0 4px 0 rgba(122, 74, 40, 0.4);
}
.photo-mode button:hover { background: #ffb070; color: #fff; }
/* When photo mode is on, hide the HUD overlay so the screenshot is clean */
body.photo-mode-on .hud,
body.photo-mode-on .hud-rest,
body.photo-mode-on .interact-prompt { display: none !important; }

/* Reduced motion: disable transitions + animations */
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after {
  animation-duration: 0s !important;
  transition-duration: 0s !important;
}

/* AI-Imran chat FAB + modal */
.chat-fab {
  position: fixed; left: 24px; bottom: 24px; z-index: 90;
  font-family: 'Permanent Marker', cursive; font-size: 16px; padding: 14px 22px;
  background: linear-gradient(135deg, #FFB070, #8a3eff); color: #fff;
  border: none; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 0 #b02a66, 0 12px 30px rgba(0,0,0,.35);
  transition: transform .15s, box-shadow .15s;
}
.chat-fab:hover { transform: translateY(-3px); box-shadow: 0 9px 0 #b02a66, 0 14px 36px rgba(0,0,0,.4); }
.chat-fab:active { transform: translateY(2px); box-shadow: 0 3px 0 #b02a66, 0 8px 16px rgba(0,0,0,.4); }

.chat-modal {
  position: fixed; right: 24px; bottom: 24px; z-index: 95;
  width: 380px; max-width: 90vw; height: 520px; max-height: 80vh;
  background: rgba(255, 247, 235, 0.97); backdrop-filter: blur(14px);
  border: 2px solid #FFB070; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4), 0 0 60px rgba(255, 176, 112, 0.3);
  display: flex; flex-direction: column; overflow: hidden;
}
/* Force-hide modals when [hidden] attribute is set — needed because display:flex/inline-flex
   on the modal would otherwise override the browser's default [hidden] { display:none } */
.chat-modal[hidden],
.achv-modal[hidden],
.photo-mode[hidden],
.trial-hud[hidden],
.mp-status[hidden],
.visitor-counter[hidden],
.zone-panel[hidden],
.achv-btn[hidden],
.share-btn[hidden] { display: none !important; }
.chat-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(122, 74, 40, 0.2);
}
.chat-title { font-family: 'Permanent Marker', cursive; font-size: 20px; color: #3E2418; }
.chat-title .pink { color: #FFB070; }
.chat-close { background: none; border: none; color: #7A4A28; font-size: 26px; cursor: pointer; padding: 0 4px; }
.chat-history {
  flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px;
}
.chat-msg {
  max-width: 85%; padding: 10px 14px; border-radius: 14px;
  font-family: 'Space Grotesk', system-ui, sans-serif; font-size: 14px; line-height: 1.45;
  word-wrap: break-word;
}
.chat-msg-bot {
  align-self: flex-start;
  background: rgba(122, 74, 40, 0.12); color: #3E2418;
  border-bottom-left-radius: 4px;
}
.chat-msg-user {
  align-self: flex-end;
  background: #FFB070; color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-msg.typing { opacity: 0.6; font-style: italic; }
.chat-input-form {
  display: flex; gap: 8px; padding: 12px;
  border-top: 1px solid rgba(122, 74, 40, 0.2);
}
.chat-input-form input {
  flex: 1; padding: 10px 14px; border-radius: 999px;
  border: 1px solid rgba(122, 74, 40, 0.3); background: #fff; color: #3E2418;
  font-family: 'Space Grotesk', sans-serif; font-size: 14px; outline: none;
}
.chat-input-form input:focus { border-color: #FFB070; }
.chat-input-form button {
  padding: 10px 20px; border-radius: 999px;
  background: #FFB070; color: #fff; border: none; cursor: pointer;
  font-family: 'Permanent Marker', cursive; font-size: 14px;
}
.chat-input-form button:disabled { opacity: 0.5; cursor: wait; }
@media (max-width: 768px) {
  .chat-fab { bottom: 16px; left: 16px; font-size: 14px; padding: 10px 16px; }
  .chat-modal { right: 8px; bottom: 8px; left: 8px; width: auto; height: 70vh; }
}

/* ───────── Cable car cabin window overlay (shown during cable_ride mode) ───────── */
.cable-car-window {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: 0; visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  animation: ccw-sway 4s ease-in-out infinite;
}
.cable-car-window.show { opacity: 1; visibility: visible; }
@keyframes ccw-sway {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2px, 1px); }
  50% { transform: translate(0, -1px); }
  75% { transform: translate(2px, 1px); }
}
/* Frame (cabin body) — dark gradient panels around the edges */
.ccw-frame {
  position: absolute;
  background: linear-gradient(rgba(8, 12, 24, 0.92), rgba(20, 28, 50, 0.78));
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6);
}
.ccw-top    { top: 0; left: 0; right: 0; height: 12vh;
  background: linear-gradient(to bottom, rgba(8, 12, 24, 0.98), rgba(20, 28, 50, 0.4)); }
.ccw-bottom { bottom: 0; left: 0; right: 0; height: 18vh;
  background: linear-gradient(to top, rgba(8, 12, 24, 0.98), rgba(20, 28, 50, 0.3)); }
.ccw-left   { top: 0; bottom: 0; left: 0; width: 8vw;
  background: linear-gradient(to right, rgba(8, 12, 24, 0.95), rgba(20, 28, 50, 0.0)); }
.ccw-right  { top: 0; bottom: 0; right: 0; width: 8vw;
  background: linear-gradient(to left, rgba(8, 12, 24, 0.95), rgba(20, 28, 50, 0.0)); }
/* Window corner frames — darker triangular shadows so the rectangular "window" pops */
.ccw-corner {
  position: absolute; width: 14vw; height: 12vh;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 0%, rgba(8, 12, 24, 0.85) 75%);
}
.ccw-corner-tl { top: 0; left: 0; }
.ccw-corner-tr { top: 0; right: 0; }
.ccw-corner-bl { bottom: 0; left: 0; }
.ccw-corner-br { bottom: 0; right: 0; }
/* Branding badge top-left + dismount hint top-right */
.ccw-badge {
  position: absolute; top: 18px; left: 22px;
  font-family: "Permanent Marker", cursive; font-size: 18px;
  color: #5ce5ff; text-shadow: 0 0 8px rgba(92, 229, 255, 0.6);
  letter-spacing: 1px;
}
.ccw-hint {
  position: absolute; top: 22px; right: 26px;
  font-family: "JetBrains Mono", monospace; font-size: 12px;
  color: #9ce6ff; opacity: 0.75;
}

/* ───────── CRT Scanline Effect (Cyberpunk aesthetic overlay) ───────── */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.08) 50%
  );
  background-size: 100% 4px;
  z-index: 1000;
  pointer-events: none;
  opacity: 0.8;
}

body::after {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle, rgba(0,0,0,0) 60%, rgba(0,0,0,0.15) 100%);
  z-index: 1001;
  pointer-events: none;
}

/* ───────── Sticky HIRE IMRAN pill (top-right, always visible) ───────── */
#hireCta {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 75;
  padding: 11px 22px;
  font-family: 'Permanent Marker', cursive;
  font-size: 15px;
  background: linear-gradient(135deg, #FFB070, #FF6A3A);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(255, 106, 58, 0.45), 0 0 30px rgba(255, 176, 112, 0.3);
  letter-spacing: 0.04em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
  animation: hirePulse 2.4s ease-in-out infinite;
}
#hireCta:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 10px 24px rgba(255, 106, 58, 0.55), 0 0 40px rgba(255, 176, 112, 0.5);
  filter: brightness(1.08);
}
#hireCta:active { transform: translateY(0) scale(0.98); }
@keyframes hirePulse {
  0%, 100% { box-shadow: 0 6px 18px rgba(255, 106, 58, 0.45), 0 0 30px rgba(255, 176, 112, 0.3); }
  50%      { box-shadow: 0 6px 18px rgba(255, 106, 58, 0.45), 0 0 50px rgba(255, 176, 112, 0.7); }
}
@media (max-width: 768px), (pointer: coarse) {
  #hireCta { top: 8px; right: 8px; padding: 8px 14px; font-size: 12px; }
}

/* ───────── Demo modals — global mobile overrides (target #sqliModal, #phishModal, #portScanModal, #cloudModal, #vpnModal, #obsModal) ───────── */
@media (max-width: 768px), (pointer: coarse) {
  #sqliModal, #phishModal, #portScanModal, #cloudModal, #vpnModal, #obsModal {
    min-width: 0 !important;
    width: 94vw !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    font-size: 12px !important;
  }
  /* Tighten nested padding inside modals on mobile */
  #sqliModal pre, #portScanModal pre { font-size: 10px !important; }
  /* Make the cloud demo's S3 file table scroll horizontally if too wide */
  #cloudModal table { font-size: 11px !important; }
  /* VPN side-by-side panels stack vertically on mobile */
  #vpnModal > div > div[style*="display:flex"] { flex-direction: column !important; }
  /* Observability — KPI grid becomes 2-col instead of 4-col */
  #obsModal div[style*="grid-template-columns:repeat(4,1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  #obsModal canvas { height: 60px !important; }
}

/* ───────── Visitor banner — left-side vertical bar (replaces the 3D scoreboard meshes) ───────── */
.visitor-banner {
  position: fixed;
  top: 60px; left: 12px;
  z-index: 70; pointer-events: none;
  display: flex; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 12px 14px;
  width: 200px;
  background: rgba(20, 16, 38, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 176, 112, 0.5);
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(255, 176, 112, 0.18);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #ffe066;
  transition: box-shadow 0.4s, border-color 0.4s;
}
.visitor-banner.plus-one {
  border-color: #7bc04a;
  box-shadow: 0 8px 30px rgba(0,0,0,.4), 0 0 50px rgba(123, 192, 74, 0.6);
}
.vb-count { display: flex; flex-direction: column; align-items: center; line-height: 1; padding-bottom: 6px; border-bottom: 1px solid rgba(255, 224, 102, 0.25); }
.vb-num {
  font-size: 24px; font-weight: bold; color: #ffe066;
  text-shadow: 0 0 10px rgba(255, 176, 112, 0.6);
  letter-spacing: 0.05em;
}
.vb-label { font-size: 9px; color: #ff8a6e; text-transform: uppercase; letter-spacing: 0.15em; margin-top: 3px; }
.vb-uniq { font-size: 10px; color: #5ce5ff; text-align: center; padding: 4px 0; }
.vb-ticker-wrap {
  width: 100%;
  overflow: hidden;
  font-size: 10px;
  color: #9ce6ff;
  white-space: nowrap;
  border-top: 1px solid rgba(92, 229, 255, 0.18);
  padding-top: 6px;
}
.vb-ticker { display: inline-block; animation: vbScroll 60s linear infinite; }
@keyframes vbScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (max-width: 768px), (pointer: coarse) {
  .visitor-banner { top: 8px; left: 8px; width: 140px; padding: 8px 10px; gap: 5px; }
  .vb-num { font-size: 16px; }
  .vb-label { font-size: 7px; }
  .vb-uniq { font-size: 9px; padding: 2px 0; }
  .vb-ticker-wrap { font-size: 8px; }
}
