/* KUNJOO - Advanced System for Absolutely Nothing Stylesheet */

:root {
  --bg-primary: #05080a;
  --bg-secondary: #0a0f14;
  --bg-tertiary: #101720;
  --bg-glass: rgba(10, 18, 26, 0.88);
  --bg-glass-card: rgba(14, 24, 34, 0.75);
  --border-neon: #00ff66;
  --border-dim: rgba(0, 255, 102, 0.25);
  --border-subtle: rgba(0, 255, 102, 0.12);
  --text-primary: #f0fdf4;
  --text-secondary: #86efac;
  --text-dim: #4ade80;
  --text-muted: #64748b;
  --neon-green: #00ff66;
  --neon-green-glow: rgba(0, 255, 102, 0.4);
  --neon-cyan: #00f0ff;
  --neon-red: #ff3366;
  --neon-amber: #ffb703;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-display: 'Orbitron', 'Rajdhani', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  user-select: none;
}

/* Background Cyber Grid & Scanline Effects */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.25) 50%
  ), linear-gradient(
    90deg,
    rgba(255, 0, 0, 0.01),
    rgba(0, 255, 0, 0.01),
    rgba(0, 0, 255, 0.01)
  );
  background-size: 100% 3px, 3px 100%;
  pointer-events: none;
  z-index: 9999;
}

.ambient-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: 
    radial-gradient(circle at 50% 50%, rgba(0, 255, 102, 0.05) 0%, transparent 60%),
    linear-gradient(var(--border-subtle) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* App Header & Top HUD */
.kunjoo-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dim);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 1000;
}

.brand-logo {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--neon-green);
  text-shadow: 0 0 10px var(--neon-green-glow);
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo .blink {
  animation: blink-anim 1s infinite;
}

@keyframes blink-anim {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.header-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}

.hud-pill {
  border: 1px solid var(--border-dim);
  background: rgba(0, 255, 102, 0.05);
  padding: 4px 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-pill .dot {
  width: 8px;
  height: 8px;
  background: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--neon-green);
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

.audio-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-dim);
  color: var(--neon-green);
  padding: 6px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.audio-toggle-btn:hover {
  background: rgba(0, 255, 102, 0.15);
  border-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green-glow);
}

/* Master Screen Container */
.screens-container {
  position: relative;
  z-index: 10;
  padding-top: 60px;
  min-height: calc(100vh - 60px);
}

.screen {
  display: none;
  min-height: calc(100vh - 60px);
  padding: 30px 20px;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* UI Card / Glass Panel */
.glass-panel {
  background: var(--bg-glass);
  border: 1px solid var(--border-dim);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 0 20px rgba(0, 255, 102, 0.03);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 30px;
  position: relative;
  max-width: 800px;
  width: 100%;
}

.glass-panel::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
}

.panel-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 2px;
  color: var(--neon-green);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-subtitle {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}

/* System Diagnostics / Telemetry Table */
.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.telemetry-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
}

.telemetry-label {
  color: var(--text-muted);
}

.telemetry-val {
  color: var(--neon-green);
  font-weight: 600;
}

/* Buttons */
.kunjoo-btn {
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 12px 26px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.kunjoo-btn:hover {
  background: var(--neon-green);
  color: #000;
  box-shadow: 0 0 20px var(--neon-green-glow);
  transform: translateY(-2px);
}

.kunjoo-btn:active {
  transform: translateY(0);
}

.kunjoo-btn.secondary {
  border-color: var(--border-dim);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.kunjoo-btn.secondary:hover {
  background: rgba(0, 255, 102, 0.1);
  border-color: var(--neon-green);
  color: var(--neon-green);
}

.kunjoo-btn.danger {
  border-color: var(--neon-red);
  color: var(--neon-red);
  background: rgba(255, 51, 102, 0.1);
}

.kunjoo-btn.danger:hover {
  background: var(--neon-red);
  color: #fff;
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

/* ----------------------------------------------------
   STAGE 1: SYSTEM INITIALIZATION SCREEN
------------------------------------------------------- */
#screen-init .glass-panel {
  text-align: center;
  max-width: 680px;
}

.init-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 3px;
  color: var(--neon-green);
  text-shadow: 0 0 15px var(--neon-green-glow);
  margin-bottom: 8px;
}

.init-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
  margin-bottom: 24px;
}

/* Auto Progress Bar Track */
.progress-track-container {
  margin: 30px 0;
  position: relative;
}

.progress-track {
  width: 100%;
  height: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-dim);
  border-radius: 10px;
  position: relative;
  overflow: visible;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(0, 255, 102, 0.3), var(--neon-green));
  border-radius: 10px;
  transition: width 0.1s linear;
  box-shadow: 0 0 15px var(--neon-green-glow);
}

.progress-ball {
  position: absolute;
  top: 50%;
  left: 0%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  background: #fff;
  border: 2px solid var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--neon-green), 0 0 40px var(--neon-green);
  transition: left 0.1s linear;
}

.progress-metrics {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--neon-green);
}

.terminal-log {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  padding: 16px;
  font-size: 12px;
  text-align: left;
  height: 140px;
  overflow-y: auto;
  color: #a7f3d0;
  margin-bottom: 20px;
}

.log-line {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-line::before {
  content: '>';
  color: var(--neon-green);
}

.pause-banner {
  display: none;
  background: rgba(255, 183, 3, 0.1);
  border: 1px solid var(--neon-amber);
  color: var(--neon-amber);
  padding: 16px;
  border-radius: 4px;
  margin-top: 20px;
  animation: pulse-amber 1.5s infinite;
}

@keyframes pulse-amber {
  0%, 100% { box-shadow: 0 0 5px rgba(255, 183, 3, 0.2); }
  50% { box-shadow: 0 0 20px rgba(255, 183, 3, 0.4); }
}

/* ----------------------------------------------------
   STAGE 2: GREEN BALL MAZE
------------------------------------------------------- */
#screen-maze .glass-panel {
  max-width: 820px;
  text-align: center;
}

.maze-header-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.maze-loop-badge {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--neon-green);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.maze-canvas-wrapper {
  position: relative;
  display: inline-block;
  background: #030608;
  border: 2px solid var(--border-neon);
  border-radius: 8px;
  box-shadow: 0 0 25px rgba(0, 255, 102, 0.15);
  margin-bottom: 16px;
  touch-action: none;
}

#mazeCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.maze-controls-hint {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.mobile-dpad {
  display: none;
  grid-template-columns: repeat(3, 50px);
  grid-template-rows: repeat(3, 50px);
  gap: 6px;
  justify-content: center;
  margin-top: 14px;
}

.dpad-btn {
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid var(--border-dim);
  color: var(--neon-green);
  font-size: 18px;
  font-weight: bold;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: manipulation;
  cursor: pointer;
}

.dpad-btn:active {
  background: var(--neon-green);
  color: #000;
}

/* Maze Sarcastic Fail Modal */
.maze-fail-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 8, 10, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  border-radius: 6px;
  z-index: 50;
  backdrop-filter: blur(6px);
}

.maze-fail-overlay.active {
  display: flex;
  animation: shake-anim 0.3s ease;
}

@keyframes shake-anim {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.fail-title {
  color: var(--neon-red);
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.fail-msg {
  color: var(--text-primary);
  font-size: 14px;
  margin-bottom: 20px;
  max-width: 450px;
  line-height: 1.5;
}

/* ----------------------------------------------------
   STAGE 3: USER REGISTRATION
------------------------------------------------------- */
#screen-register .glass-panel {
  max-width: 550px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-dim);
  padding: 12px 16px;
  border-radius: 4px;
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 14px;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus {
  border-color: var(--neon-green);
  box-shadow: 0 0 12px var(--neon-green-glow);
  background: rgba(0, 255, 102, 0.03);
}

.form-input::placeholder {
  color: #334155;
}

.form-error {
  color: var(--neon-red);
  font-size: 12px;
  margin-top: 6px;
  display: none;
}

/* ----------------------------------------------------
   STAGE 4: KINETIC PRECISION SHOOTING CAPTCHA
------------------------------------------------------- */
#screen-shooting .glass-panel {
  max-width: 820px;
  text-align: center;
}

.shooting-canvas-wrapper {
  position: relative;
  background: #020406;
  border: 2px solid var(--border-dim);
  border-radius: 8px;
  margin: 16px 0;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.1);
  touch-action: none;
}

#shootingCanvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ----------------------------------------------------
   STAGE 5: AUDIO CAPTCHA
------------------------------------------------------- */
#screen-audio .glass-panel {
  max-width: 580px;
  text-align: center;
}

.audio-visualizer-box {
  background: #020406;
  border: 1px solid var(--border-dim);
  border-radius: 6px;
  padding: 24px;
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.audio-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 48px;
  width: 100%;
}

.audio-bar {
  width: 6px;
  height: 10px;
  background: var(--border-dim);
  border-radius: 3px;
  transition: height 0.1s ease;
}

.audio-bars.active .audio-bar {
  background: var(--neon-green);
  box-shadow: 0 0 8px var(--neon-green);
  animation: audio-bounce 0.6s infinite alternate ease-in-out;
}

@keyframes audio-bounce {
  0% { height: 8px; }
  100% { height: 44px; }
}

.audio-bars.active .audio-bar:nth-child(2) { animation-delay: 0.1s; }
.audio-bars.active .audio-bar:nth-child(3) { animation-delay: 0.2s; }
.audio-bars.active .audio-bar:nth-child(4) { animation-delay: 0.3s; }
.audio-bars.active .audio-bar:nth-child(5) { animation-delay: 0.4s; }
.audio-bars.active .audio-bar:nth-child(6) { animation-delay: 0.15s; }
.audio-bars.active .audio-bar:nth-child(7) { animation-delay: 0.25s; }
.audio-bars.active .audio-bar:nth-child(8) { animation-delay: 0.35s; }

/* ----------------------------------------------------
   STAGE 6: EVASIVE & GROWING SUBMIT BUTTON
------------------------------------------------------- */
#screen-submit {
  min-height: calc(100vh - 60px);
  position: relative;
  overflow: hidden;
  display: none;
  padding: 0;
}

#screen-submit.active {
  display: block;
}

.submit-hud-bar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-glass);
  border: 1px solid var(--border-dim);
  padding: 12px 24px;
  border-radius: 6px;
  text-align: center;
  z-index: 100;
  backdrop-filter: blur(8px);
  pointer-events: none;
  width: 90%;
  max-width: 600px;
}

.evasive-arena {
  position: relative;
  width: 100vw;
  height: calc(100vh - 80px);
  margin-top: 40px;
  overflow: hidden;
}

.runaway-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #00ff66, #00b347);
  color: #000;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  padding: 18px 40px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 30px var(--neon-green-glow);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 50;
  white-space: nowrap;
}

.tiny-submit-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: #ff0055;
  color: #fff;
  border: 1px solid #fff;
  font-size: 10px;
  font-weight: 900;
  padding: 4px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: none;
  z-index: 100;
  animation: blink-tiny 0.8s infinite;
  box-shadow: 0 0 10px #ff0055;
}

@keyframes blink-tiny {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* ----------------------------------------------------
   STAGE 7: ACCESS GRANTED DRAMATIC REVEAL
------------------------------------------------------- */
#screen-access .glass-panel {
  max-width: 700px;
  text-align: center;
  padding: 50px 30px;
}

.access-granted-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 4px;
  color: var(--neon-green);
  text-shadow: 0 0 25px var(--neon-green), 0 0 50px var(--neon-green-glow);
  margin-bottom: 12px;
}

.access-punchline {
  font-size: 18px;
  color: #fff;
  margin: 24px 0;
  line-height: 1.8;
}

.access-subtext {
  font-size: 14px;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 30px;
}

/* ----------------------------------------------------
   STAGE 8: MAIN KUNJOO COMMAND CENTER DASHBOARD
------------------------------------------------------- */
#screen-dashboard {
  display: none;
  padding: 30px 24px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

#screen-dashboard.active {
  display: block;
}

.dash-hero {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.dash-hero-title {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 4px;
  color: var(--neon-green);
  text-shadow: 0 0 15px var(--neon-green-glow);
  margin-bottom: 8px;
}

.dash-hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.dash-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid var(--border-dim);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--neon-green);
  margin-top: 16px;
}

/* Tool Grid System */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px;
}

.tool-card {
  background: var(--bg-glass-card);
  border: 1px solid var(--border-dim);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
  transition: var(--transition-normal);
}

.tool-card:hover {
  border-color: var(--neon-green);
  box-shadow: 0 8px 30px rgba(0, 255, 102, 0.12);
  transform: translateY(-3px);
}

.tool-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tool-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-icon {
  font-size: 24px;
}

.tool-title {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--neon-green);
}

.tool-status-badge {
  font-size: 10px;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

.tool-body {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  flex-grow: 1;
}

.tool-result {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  color: #fff;
  border-radius: 4px;
}

/* Specialized Tool Styles */

/* 1. The Useless Button */
.useless-big-button {
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, #ff1a53, #990026);
  border: 2px solid #ff4d79;
  border-radius: 6px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  cursor: pointer;
  box-shadow: 0 0 20px rgba(255, 26, 83, 0.4);
  transition: var(--transition-fast);
}

.useless-big-button:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(255, 26, 83, 0.7);
}

.useless-big-button:active {
  transform: scale(0.98);
}

/* 2. Score Gauge */
.gauge-meter-wrapper {
  position: relative;
  width: 140px;
  height: 140px;
  margin: 10px auto;
}

.gauge-circle {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-val-display {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  color: var(--neon-green);
}

/* 3. Screen Cleaner CRT Canvas */
.cleaner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10000;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.cleaner-beam {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 8px;
  background: linear-gradient(180deg, #fff, var(--neon-green), transparent);
  box-shadow: 0 0 40px var(--neon-green), 0 0 80px var(--neon-green);
  animation: beam-sweep 2.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes beam-sweep {
  0% { top: 0%; opacity: 1; }
  90% { top: 100%; opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

/* 4. Camera AI Object & NPC Tool Elements */
.camera-view-container {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-dim);
  aspect-ratio: 4/3;
  margin-bottom: 12px;
}

.cam-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

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

.cam-controls {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

/* Sarcastic Calculator Grid */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.calc-display {
  grid-column: span 4;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-dim);
  padding: 10px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--neon-green);
  border-radius: 4px;
  margin-bottom: 8px;
}

.calc-btn {
  padding: 10px 0;
  background: rgba(0, 255, 102, 0.05);
  border: 1px solid var(--border-subtle);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  border-radius: 4px;
  cursor: pointer;
}

.calc-btn:hover {
  background: rgba(0, 255, 102, 0.2);
  border-color: var(--neon-green);
}

.calc-btn.op {
  color: var(--neon-green);
  font-weight: bold;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10000;
  pointer-events: none;
}

.kunjoo-toast {
  background: var(--bg-glass);
  border: 1px solid var(--neon-green);
  color: #fff;
  padding: 14px 20px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px var(--neon-green-glow);
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  animation: slide-toast 0.3s ease forwards;
  pointer-events: auto;
}

.kunjoo-toast.urgent {
  border-color: var(--neon-red);
  box-shadow: 0 0 20px rgba(255, 51, 102, 0.5);
}

@keyframes slide-toast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .kunjoo-header {
    padding: 0 14px;
  }
  
  .brand-logo {
    font-size: 18px;
    letter-spacing: 2px;
  }
  
  .header-meta .hud-pill:not(.status-pill) {
    display: none;
  }
  
  .glass-panel {
    padding: 20px 16px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .mobile-dpad {
    display: grid;
  }
}

/* ========================================================
   RICKROLL SYSTEM OVERRIDE - SCREEN FLASH & POPUP WINDOW
======================================================== */

/* Fullscreen Strobe Warning Flash */
.rickroll-flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
}

.rickroll-flash-overlay.active {
  pointer-events: auto;
  animation: aggressiveStrobe 1.6s steps(1, end) forwards;
}

@keyframes aggressiveStrobe {
  0% { background: #ffffff; opacity: 1; }
  10% { background: #ff0044; opacity: 0.95; }
  20% { background: #000000; opacity: 1; }
  30% { background: #00ff66; opacity: 0.9; }
  40% { background: #ffffff; opacity: 1; }
  50% { background: #ff0044; opacity: 0.95; }
  60% { background: #00f0ff; opacity: 0.9; }
  70% { background: #000000; opacity: 1; }
  80% { background: #ff0044; opacity: 0.95; }
  90% { background: #ffffff; opacity: 0.8; }
  100% { background: transparent; opacity: 0; }
}

/* Rickroll Small Window Modal Wrapper */
.rickroll-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 12, 0.85);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 16px;
}

.rickroll-modal-wrapper.active {
  opacity: 1;
  visibility: visible;
}

/* Small Retro-Cyber Floating Window */
.rickroll-window {
  width: 520px;
  max-width: 95vw;
  background: #090f17;
  border: 2px solid var(--neon-red);
  border-radius: 10px;
  box-shadow: 0 0 35px rgba(255, 51, 102, 0.5), 0 0 70px rgba(0, 255, 102, 0.2), inset 0 0 20px rgba(255, 51, 102, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  transform: scale(0.7) translateY(40px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rickroll-modal-wrapper.active .rickroll-window {
  transform: scale(1) translateY(0);
}

/* Title Bar Header */
.rickroll-window-header {
  background: linear-gradient(90deg, #18080e, #290d19, #14070c);
  border-bottom: 2px solid var(--neon-red);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.rickroll-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rickroll-warn-icon {
  animation: pulse-warn 0.6s infinite alternate;
}

@keyframes pulse-warn {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #ff3366); }
  100% { transform: scale(1.3); filter: drop-shadow(0 0 8px #ff3366); }
}

.rickroll-window-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #ff4d79;
}

.rickroll-window-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.rickroll-control-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 11px;
  cursor: not-allowed;
}

.rickroll-control-btn.close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  border-radius: 4px;
  background: #ff3366;
  color: #fff;
  border: none;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  position: relative;
}

.rickroll-control-btn.close:hover {
  background: #ff0044;
  box-shadow: 0 0 10px #ff0044;
}

/* Lockdown Notification Bar */
.rickroll-lockdown-bar {
  background: rgba(255, 51, 102, 0.12);
  border-bottom: 1px solid rgba(255, 51, 102, 0.3);
  padding: 8px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-family: var(--font-mono);
}

.lockdown-badge {
  color: #ff6b8b;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lockdown-badge strong {
  color: #fff;
  background: #ff3366;
  padding: 1px 6px;
  border-radius: 4px;
}

.volume-badge {
  color: #00ff66;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(0, 255, 102, 0.5);
  animation: glow-pulse 1.2s infinite alternate;
}

/* Video Stage Area */
.rickroll-video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-dim);
}

.rickroll-iframe,
.rickroll-video-player {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  object-fit: cover;
}

/* Lyrics Ticker */
.rickroll-lyrics-ticker {
  background: #060b11;
  padding: 8px 10px;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-subtle);
}

.ticker-text {
  display: inline-block;
  color: var(--neon-cyan);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  animation: tickerScroll 18s linear infinite;
}

@keyframes tickerScroll {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* Progress Section */
.rickroll-progress-section {
  padding: 10px 14px;
  background: rgba(10, 18, 26, 0.7);
}

.rickroll-progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 5px;
  letter-spacing: 1px;
}

.rickroll-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid rgba(0, 255, 102, 0.3);
  border-radius: 4px;
  overflow: hidden;
}

.rickroll-progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #ff3366, #ffb703, #00ff66);
  box-shadow: 0 0 10px rgba(0, 255, 102, 0.8);
  transition: width 0.25s linear;
}

/* Footer Section */
.rickroll-footer {
  padding: 12px 14px;
  background: #070d14;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rickroll-status-log {
  font-size: 10.5px;
  color: var(--text-muted);
  line-height: 1.4;
  font-family: var(--font-mono);
}

.rickroll-finish-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 12px;
  letter-spacing: 1.5px;
  transition: all 0.3s ease;
}

.rickroll-finish-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: rgba(255, 51, 102, 0.4);
  color: #ff6b8b;
  background: rgba(255, 51, 102, 0.08);
  box-shadow: none;
}

.rickroll-finish-btn:not(:disabled) {
  opacity: 1;
  cursor: pointer;
  border-color: var(--neon-green);
  color: #00ff66;
  background: rgba(0, 255, 102, 0.15);
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.4);
  animation: glow-pulse 1s infinite alternate;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-1deg); }
  40% { transform: translateX(8px) rotate(1deg); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(6px); }
}
