/* Zork: Reimagined - CRT Terminal & Auto-Mapper Stylesheet */

:root {
  /* CRT Green Phosphor Theme (Default) */
  --bg-color: #080d08;
  --panel-bg: #0d150d;
  --panel-border: #1e3a1e;
  --text-main: #33ff33;
  --text-dim: #1ea81e;
  --text-bright: #66ff66;
  --text-accent: #a3ff00;
  --text-muted: #135513;
  --text-danger: #ff3333;
  --text-warning: #ffb700;
  --text-info: #00d9ff;
  --scanline-color: rgba(0, 20, 0, 0.25);
  --glow-color: rgba(51, 255, 51, 0.15);
  --glow-strong: rgba(51, 255, 51, 0.35);
  --node-bg: #0d220d;
  --node-current: #33ff33;
  --node-visited: #1ea81e;
  --node-unvisited: #0f400f;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --font-header: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
}

/* Theme Variant: Amber Phosphor */
[data-theme="amber"] {
  --bg-color: #0d0903;
  --panel-bg: #171005;
  --panel-border: #3d2b0e;
  --text-main: #ffb000;
  --text-dim: #b37b00;
  --text-bright: #ffd066;
  --text-accent: #ff8800;
  --text-muted: #5e4100;
  --text-danger: #ff3333;
  --text-warning: #ffe600;
  --text-info: #00e5ff;
  --scanline-color: rgba(25, 15, 0, 0.25);
  --glow-color: rgba(255, 176, 0, 0.15);
  --glow-strong: rgba(255, 176, 0, 0.35);
  --node-bg: #261b07;
  --node-current: #ffb000;
  --node-visited: #b37b00;
  --node-unvisited: #47310a;
}

/* Theme Variant: Cyber Violet */
[data-theme="cyber"] {
  --bg-color: #0a0612;
  --panel-bg: #120b21;
  --panel-border: #331f5c;
  --text-main: #d154ff;
  --text-dim: #8b34ab;
  --text-bright: #ed99ff;
  --text-accent: #00ffcc;
  --text-muted: #4a1961;
  --text-danger: #ff3366;
  --text-warning: #ffcc00;
  --text-info: #00e5ff;
  --scanline-color: rgba(15, 0, 30, 0.25);
  --glow-color: rgba(209, 84, 255, 0.15);
  --glow-strong: rgba(209, 84, 255, 0.35);
  --node-bg: #1d1033;
  --node-current: #00ffcc;
  --node-visited: #d154ff;
  --node-unvisited: #3e226e;
}

/* Theme Variant: Vintage Parchment */
[data-theme="parchment"] {
  --bg-color: #1a1612;
  --panel-bg: #241e18;
  --panel-border: #4a3e31;
  --text-main: #e6c896;
  --text-dim: #998361;
  --text-bright: #f5e4c4;
  --text-accent: #e69d45;
  --text-muted: #5e503b;
  --text-danger: #e64545;
  --text-warning: #e6b845;
  --text-info: #45b8e6;
  --scanline-color: rgba(0, 0, 0, 0.15);
  --glow-color: rgba(230, 200, 150, 0.1);
  --glow-strong: rgba(230, 200, 150, 0.25);
  --node-bg: #2e261f;
  --node-current: #e69d45;
  --node-visited: #e6c896;
  --node-unvisited: #5e503b;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.6;
}

/* Scanline & CRT Effect Overlay */
.crt-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    var(--scanline-color) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.2);
}

.crt-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 998;
  background: radial-gradient(circle at center, transparent 80%, rgba(0, 0, 0, 0.25) 100%);
}

/* App Container Layout */
.app-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  max-width: 1600px;
  margin: 0 auto;
  border-left: 1px solid var(--panel-border);
  border-right: 1px solid var(--panel-border);
  box-shadow: 0 0 40px var(--glow-color);
}

/* Header Bar */
.app-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background-color: var(--panel-bg);
  border-bottom: 1px solid var(--panel-border);
  z-index: 10;
  gap: 6px 10px;
  min-height: 48px;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-header);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text-bright);
  text-shadow: 0 0 8px var(--glow-strong);
  white-space: nowrap;
  flex-shrink: 0;
}

.brand-badge {
  background: var(--text-main);
  color: var(--bg-color);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.header-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.stat-box {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.stat-label {
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  white-space: nowrap !important;
}

.stat-value {
  color: var(--text-bright);
  font-weight: bold;
  white-space: nowrap !important;
}

.header-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
}

.header-btn-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.btn-ctrl {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.btn-ctrl:hover {
  background: var(--text-main);
  color: var(--bg-color);
  box-shadow: 0 0 8px var(--glow-strong);
}

.btn-music-ctrl {
  padding: 3px 6px;
}

.select-theme {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--panel-border);
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  white-space: nowrap;
}

/* Music Player Control Bar */
.music-player-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-color);
  border: 1px solid var(--panel-border);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.music-title {
  font-size: 0.7rem;
  color: var(--text-bright);
  max-width: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-vol-slider {
  width: 45px;
  accent-color: var(--text-main);
  cursor: pointer;
}

.music-vol-lbl {
  font-size: 0.7rem;
  color: var(--text-dim);
  min-width: 24px;
  white-space: nowrap;
}

/* Main Split View Area */
.main-workspace {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Terminal Column (Left/Center) */
.terminal-section {
  flex: 1.4;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--panel-border);
  background-color: var(--bg-color);
  position: relative;
  overflow: hidden;
}

.terminal-scroll-area,
.terminal-log-container {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
  scroll-behavior: smooth;
  display: flex;
  flex-direction: column;
}

/* Custom Scrollbar */
.terminal-scroll-area::-webkit-scrollbar,
.terminal-log-container::-webkit-scrollbar,
.map-canvas-container::-webkit-scrollbar,
.mapper-viewport::-webkit-scrollbar {
  width: 6px;
}

.terminal-scroll-area::-webkit-scrollbar-thumb,
.terminal-log-container::-webkit-scrollbar-thumb,
.map-canvas-container::-webkit-scrollbar-thumb,
.mapper-viewport::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 3px;
}

.terminal-scroll-area::-webkit-scrollbar-thumb:hover,
.terminal-log-container::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Log Entry Styling */
.log-entry {
  margin-bottom: 18px;
  animation: fadeIn 0.15s ease-in;
}

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

.log-input-line {
  color: var(--text-bright);
  font-weight: bold;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.log-input-prompt {
  color: var(--text-accent);
}

.log-room-header {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-accent);
  text-shadow: 0 0 6px var(--glow-color);
  border-bottom: 1px dashed var(--panel-border);
  padding-bottom: 4px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.log-room-exits {
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--text-dim);
}

.log-desc {
  color: var(--text-main);
  white-space: pre-wrap;
  margin-bottom: 8px;
}

.log-item-list {
  color: var(--text-warning);
  margin-top: 6px;
}

.log-system-msg {
  color: var(--text-info);
  font-style: italic;
}

.log-danger-msg {
  color: var(--text-danger);
  font-weight: bold;
  text-shadow: 0 0 6px rgba(255, 51, 51, 0.4);
}

.log-item-interactive {
  color: var(--text-bright);
  text-decoration: underline;
  cursor: pointer;
}

.log-exit-interactive {
  background: rgba(0, 255, 102, 0.08);
  border: 1px solid var(--panel-border);
  color: var(--text-accent);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.72rem;
  font-weight: bold;
  cursor: pointer;
  margin-left: 3px;
  display: inline-block;
  transition: all 0.2s ease;
}

.log-exit-interactive:hover {
  background: var(--text-accent);
  color: var(--bg-color);
  box-shadow: 0 0 8px var(--glow-strong);
  transform: translateY(-1px);
}

.log-item-interactive:hover {
  color: var(--text-accent);
  text-shadow: 0 0 5px var(--glow-strong);
}

/* Terminal Input Bar */
.input-form,
.terminal-input-form {
  display: flex;
  align-items: center;
  padding: 12px 18px;
  background-color: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  gap: 12px;
}

.input-prompt-label,
.prompt-symbol {
  color: var(--text-accent);
  font-weight: bold;
  font-size: 1.1rem;
  text-shadow: 0 0 5px var(--glow-strong);
}

.cmd-input,
.terminal-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  caret-color: var(--text-accent);
  text-shadow: 0 0 3px var(--glow-color);
}

.cmd-input::placeholder,
.terminal-input::placeholder {
  color: var(--text-muted);
}

/* Quick Action Suggestion Chips */
.quick-action-bar,
.quick-chips-bar {
  display: flex;
  gap: 6px;
  padding: 6px 18px;
  background: var(--bg-color);
  border-top: 1px solid var(--panel-border);
  overflow-x: auto;
}

.chip-btn {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  padding: 2px 8px;
  font-size: 0.75rem;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
  font-family: var(--font-mono);
}

.chip-btn:hover {
  border-color: var(--text-main);
  color: var(--text-bright);
}

/* Map & Sidebar Section (Right) */
.sidebar-section {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  background-color: var(--panel-bg);
  overflow: hidden;
  max-width: 620px;
  min-width: 320px;
}

.sidebar-panel {
  display: flex;
  flex-direction: column;
}

.sidebar-panel.mapper-panel {
  flex: 1;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--panel-border);
  background-color: rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.sidebar-title {
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: bold;
  color: var(--text-bright);
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.header-btn {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
}

.header-btn:hover {
  border-color: var(--text-main);
  color: var(--text-bright);
}

.map-canvas-container,
.mapper-viewport {
  flex: 1;
  min-height: 320px;
  position: relative;
  background: radial-gradient(circle at center, var(--panel-bg) 0%, var(--bg-color) 100%);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#svg-map,
#automap-svg,
.automap-canvas {
  width: 100%;
  height: 100%;
  flex: 1;
  display: block;
}

.map-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 0, 0, 0.45);
  border-top: 1px solid var(--panel-border);
  font-size: 0.78rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.current-room-text {
  color: var(--text-bright);
  font-weight: 600;
}

/* SVG Node Graph Elements */
.map-link {
  stroke: var(--panel-border);
  stroke-width: 2;
  stroke-dasharray: 4 2;
  transition: all 0.3s ease;
}

.map-link.visited {
  stroke: var(--node-visited);
  stroke-dasharray: none;
  stroke-width: 2.5;
}

.map-link.active {
  stroke: var(--text-accent);
  stroke-width: 3;
}

.map-node-circle {
  fill: rgba(12, 20, 12, 0.9);
  stroke: var(--node-unvisited);
  stroke-width: 2;
  transition: all 0.3s ease;
  cursor: pointer;
}

.map-node-circle.visited {
  fill: rgba(16, 28, 18, 0.9);
  stroke: var(--node-visited);
}

.map-node-circle.current {
  fill: rgba(8, 35, 15, 0.92);
  stroke: var(--text-bright);
  stroke-width: 3.5;
  filter: drop-shadow(0 0 10px var(--glow-strong));
}

.map-node-circle.dark {
  stroke-dasharray: 3 3;
}

.map-radar-pulse {
  fill: none;
  stroke: var(--text-accent);
  stroke-width: 2;
  animation: radarPulse 2s infinite ease-out;
}

@keyframes radarPulse {
  0% { r: 18; opacity: 0.95; stroke-width: 2.5; }
  100% { r: 38; opacity: 0; stroke-width: 0.5; }
}

.map-node-icon {
  font-family: 'Material Symbols Outlined' !important;
  font-size: 16px;
  fill: var(--text-bright);
  text-anchor: middle;
  dominant-baseline: central;
  pointer-events: none;
}

.map-node-text {
  fill: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  pointer-events: none;
  stroke: var(--bg-color);
  stroke-width: 3px;
  stroke-linejoin: round;
  paint-order: stroke fill;
  letter-spacing: 0.3px;
}

.map-node-text.current {
  fill: var(--text-bright);
  font-weight: bold;
  font-size: 12px;
}

/* Link Direction Badges */
.map-badge-bg {
  fill: var(--bg-color);
  stroke: var(--panel-border);
  stroke-width: 1;
}

.map-badge-text {
  fill: var(--text-dim);
  font-size: 8px;
  font-weight: bold;
  font-family: var(--font-mono);
  dominant-baseline: central;
}

/* Compass Rose Overlay */
.compass-bg {
  fill: rgba(0, 0, 0, 0.6);
  stroke: var(--panel-border);
  stroke-width: 1.5;
}

.compass-axis {
  stroke: var(--panel-border);
  stroke-width: 1;
  stroke-dasharray: 2 2;
}

.compass-label {
  fill: var(--text-dim);
  font-size: 8px;
  font-weight: bold;
  font-family: var(--font-mono);
  dominant-baseline: central;
}

.compass-label.north {
  fill: var(--text-accent);
}

/* Location HUD Badge */
.map-hud-bg {
  fill: rgba(6, 14, 8, 0.9);
  stroke: var(--panel-border);
  stroke-width: 1.2;
}

.map-hud-text {
  fill: var(--text-dim);
  font-size: 11px;
  font-family: var(--font-mono);
  dominant-baseline: central;
}

.hud-room {
  fill: var(--text-bright);
  font-weight: bold;
}

/* Sidebar Inventory & Inspection Panel */
.sidebar-panel.inventory-panel,
.inventory-panel {
  height: 195px;
  min-height: 160px;
  max-height: 220px;
  flex-shrink: 0;
  border-top: 1px solid var(--panel-border);
  background-color: var(--bg-color);
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
}

.panel-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
  overflow-y: auto;
  align-content: start;
  flex: 1;
  padding: 6px;
}

.inv-empty-state {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
  grid-column: 1 / -1;
  padding: 20px 0;
  text-align: center;
}

.inv-item-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-height: 84px;
  height: 100%;
  transition: all 0.2s ease;
  position: relative;
  box-sizing: border-box;
  overflow: hidden;
}

.inv-item-card.is-container {
  border-color: var(--text-accent);
  background: rgba(0, 230, 118, 0.04);
}

.inv-item-card:hover {
  border-color: var(--text-bright);
  color: var(--text-bright);
  box-shadow: 0 0 12px var(--glow-color);
  transform: translateY(-2px);
  background: var(--node-bg);
}

.inv-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inv-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inv-card-name {
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: capitalize;
  color: var(--text-bright);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.inv-count-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-accent);
  background: rgba(0, 230, 118, 0.12);
  border: 1px solid var(--text-accent);
  padding: 1px 6px;
  border-radius: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.inv-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.inv-card-badge {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: 1px solid var(--panel-border);
  background: rgba(0, 0, 0, 0.35);
}

.inv-card-badge.badge-weapon { color: #ff4d4d; border-color: rgba(255, 77, 77, 0.4); }
.inv-card-badge.badge-light { color: #00e5ff; border-color: rgba(0, 229, 255, 0.4); }
.inv-card-badge.badge-valuable { color: #ffd700; border-color: rgba(255, 215, 0, 0.4); }
.inv-card-badge.badge-container { color: #00e676; border-color: rgba(0, 230, 118, 0.4); }
.inv-card-badge.badge-item { color: #ffb300; border-color: rgba(255, 179, 0, 0.4); }

.inv-card-action {
  color: var(--text-dim);
  transition: color 0.2s ease;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  gap: 2px;
}

.inv-item-card:hover .inv-card-action {
  color: var(--text-accent);
}

/* Player Manual / Guide Modal */
.guide-card {
  background: var(--bg-color);
  border: 2px solid var(--panel-border);
  box-shadow: 0 0 25px var(--glow-strong);
  border-radius: 8px;
  width: 92%;
  max-width: 680px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  color: var(--text-main);
}

.guide-header {
  font-family: var(--font-header);
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--text-accent);
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.guide-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-section {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 12px 16px;
  border-radius: 6px;
}

.guide-section h3 {
  font-size: 0.92rem;
  color: var(--text-bright);
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--panel-border);
  padding-bottom: 4px;
}

.guide-section p {
  font-size: 0.8rem;
  color: var(--text-main);
  margin-bottom: 6px;
  line-height: 1.5;
}

.guide-section ul {
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text-main);
  line-height: 1.5;
}

.guide-section li {
  margin-bottom: 5px;
}

.guide-section code {
  background: rgba(0, 255, 102, 0.1);
  border: 1px solid var(--panel-border);
  color: var(--text-bright);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.guide-footer {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--panel-border);
  padding-top: 10px;
}

.inv-card-badge {
  background: var(--panel-border);
  color: var(--text-accent);
  padding: 1px 5px;
  border-radius: 3px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.inv-card-action {
  color: var(--text-dim);
  transition: color 0.2s ease;
}

.inv-item-card:hover .inv-card-action {
  color: var(--text-accent);
}

/* Timeline Controls Footer */
.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px;
  background-color: var(--panel-bg);
  border-top: 1px solid var(--panel-border);
  font-size: 0.8rem;
}

.timeline-scrubber {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  max-width: 600px;
}

.timeline-slider {
  flex: 1;
  accent-color: var(--text-main);
  cursor: pointer;
}

/* Inspector Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.inspector-card {
  background: rgba(8, 18, 12, 0.95);
  border: 2px solid var(--text-main);
  width: 92%;
  max-width: 540px;
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 0 35px var(--glow-strong), inset 0 0 15px rgba(0, 0, 0, 0.8);
  position: relative;
  color: var(--text-main);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-backdrop.active .inspector-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  color: var(--text-dim);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  color: var(--text-bright);
  border-color: var(--text-accent);
  background: rgba(163, 255, 0, 0.15);
}

.inspector-header {
  font-family: var(--font-header);
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
  margin-bottom: 14px;
  padding-right: 40px; /* Safe margin for close button */
}

.inspector-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.inspector-title-text {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: 0.5px;
}

.inspector-tag-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 3px;
  background: rgba(163, 255, 0, 0.1);
  border: 1px solid var(--text-accent);
  color: var(--text-accent);
  font-weight: 600;
}

.inspector-blueprint-box {
  background: #020604;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 10px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-bright);
  margin-bottom: 14px;
  overflow: hidden;
  text-align: center;
  position: relative;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.9);
}

.inspector-viewport-frame {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.viewport-corner {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-accent);
  opacity: 0.7;
  pointer-events: none;
}
.viewport-corner.top-left { top: 4px; left: 6px; }
.viewport-corner.top-right { top: 4px; right: 6px; }
.viewport-corner.bottom-left { bottom: 4px; left: 6px; }
.viewport-corner.bottom-right { bottom: 4px; right: 6px; }

.inspector-schematic-img {
  width: 100%;
  height: auto;
  max-height: 225px;
  object-fit: contain;
  border-radius: 4px;
  filter: drop-shadow(0 0 10px var(--glow-color));
  transition: transform 0.3s ease;
}

.inspector-schematic-img:hover {
  transform: scale(1.02);
}

.inspector-details {
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: rgba(163, 255, 0, 0.04);
  border-left: 3px solid var(--text-accent);
  border-radius: 0 4px 4px 0;
  color: var(--text-main);
}

.inspector-container-section {
  background: rgba(0, 230, 118, 0.05);
  border: 1px solid rgba(0, 230, 118, 0.2);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 14px;
}

.inspector-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-accent);
  border-bottom: 1px solid rgba(0, 230, 118, 0.15);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.container-value-badge {
  margin-left: auto;
  color: #ffd700;
  font-size: 0.7rem;
}

.container-empty-msg {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-style: italic;
  text-align: center;
  padding: 8px 0;
}

.container-contents-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 140px;
  overflow-y: auto;
}

.container-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--panel-border);
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.c-item-name {
  font-weight: 600;
  color: var(--text-bright);
  text-transform: capitalize;
}

.c-item-val {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #ffd700;
}

.inspector-props {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 12px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
}

.inspector-stat-badge {
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: rgba(163, 255, 0, 0.05);
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid rgba(163, 255, 0, 0.12);
}

.stat-badge-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
}

.stat-badge-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-bright);
}

.stat-badge-value.gold { color: #ffd700; text-shadow: 0 0 6px rgba(255, 215, 0, 0.5); }
.stat-badge-value.red { color: #ff4d4d; text-shadow: 0 0 6px rgba(255, 77, 77, 0.5); }
.stat-badge-value.amber { color: #ffb300; text-shadow: 0 0 6px rgba(255, 179, 0, 0.5); }

/* Responsiveness */
@media (max-width: 900px) {
  .main-workspace {
    flex-direction: column;
  }
  .sidebar-section {
    max-width: 100%;
    height: 250px;
  }
}

/* CRT Screen Shake & Glitch FX */
.screen-shake {
  animation: screenShake 0.35s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes screenShake {
  10%, 90% { transform: translate3d(-2px, 1px, 0); }
  20%, 80% { transform: translate3d(3px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 3px, 0); }
  40%, 60% { transform: translate3d(4px, -3px, 0); }
}

.screen-glitch {
  animation: crtGlitchBurst 0.4s ease-in-out;
}

@keyframes crtGlitchBurst {
  0% {
    filter: none;
  }
  20% {
    filter: drop-shadow(-4px 0 rgba(255,0,0,0.7)) drop-shadow(4px 0 rgba(0,255,255,0.7));
    transform: skewX(-1.5deg);
  }
  40% {
    filter: drop-shadow(4px 0 rgba(255,0,255,0.8)) drop-shadow(-4px 0 rgba(0,255,0,0.8));
    transform: skewX(1.5deg);
  }
  60% {
    filter: drop-shadow(-2px 0 rgba(255,255,0,0.7));
    transform: skewX(-0.8deg);
  }
  100% {
    filter: none;
    transform: none;
  }
}

/* Spring Particle Canvas Overlay */
.spring-particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 950;
  opacity: 0;
  transition: opacity 1.8s ease-in-out;
}

.spring-particle-canvas.active {
  opacity: 1;
}

/* Environmental Corner Decals */


/* Weather Stat Box Widget */
.weather-stat-box {
  border-color: var(--text-accent);
  background: rgba(163, 255, 0, 0.05);
}

.weather-val {
  color: var(--text-accent);
  font-weight: 700;
}

/* CRT Night Mode Soft Glow overlay */
body.crt-night-mode .crt-vignette {
  background: radial-gradient(circle at center, rgba(5, 10, 25, 0.25) 60%, rgba(2, 5, 15, 0.65) 100%);
}

/* Google Material Symbols Base & Color Coding */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Color Coding Palette */
.icon-red, .item-icon-weapon { color: #ff4d4d !important; text-shadow: 0 0 8px rgba(255, 77, 77, 0.6); }
.icon-gold, .item-icon-treasure { color: #ffd700 !important; text-shadow: 0 0 8px rgba(255, 215, 0, 0.6); }
.icon-cyan, .item-icon-light { color: #00e5ff !important; text-shadow: 0 0 8px rgba(0, 229, 255, 0.6); }
.icon-green, .item-icon-container { color: #00e676 !important; text-shadow: 0 0 8px rgba(0, 230, 118, 0.6); }
.icon-amber, .item-icon-utility { color: #ffb300 !important; text-shadow: 0 0 8px rgba(255, 179, 0, 0.6); }
.icon-purple, .item-icon-magic { color: #d500f9 !important; text-shadow: 0 0 8px rgba(213, 0, 249, 0.6); }

/* Enlarged Icon Styles */
.inv-card .item-icon, .inv-card .material-symbols-outlined {
  font-size: 26px !important;
  margin-right: 8px;
}

.weather-stat-box .icon-weather {
  font-size: 20px !important;
  margin-right: 4px;
}

.btn-ctrl .icon-btn {
  font-size: 18px !important;
  margin-right: 4px;
}

/* ==========================================================================
   QUEST OBJECTIVES / GOALS MODAL
   ========================================================================== */
.goals-modal-card {
  max-width: 680px;
}

.goals-items-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.goals-card-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 10px 14px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.goals-card-row.is-done {
  border-color: rgba(0, 230, 118, 0.6);
  background: rgba(0, 230, 118, 0.08);
}

.goals-row-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.goals-card-row.is-done {
  border-color: rgba(0, 230, 118, 0.4);
  background: rgba(0, 230, 118, 0.04);
}

.goals-card-row.undiscovered-row {
  opacity: 0.75;
  border-style: dashed;
  border-color: rgba(100, 120, 100, 0.4);
}

.goals-row-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.goals-row-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.goals-row-name {
  color: var(--text-bright);
  font-weight: 600;
  font-size: 0.9rem;
}

.goals-row-undiscovered-name {
  color: #889988;
  font-style: italic;
  font-weight: normal;
}

.goals-row-desc {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.goals-pts {
  color: #ffd700;
  font-size: 0.8rem;
  font-weight: normal;
  margin-left: 6px;
}

.goals-pts-dim {
  color: #889988;
  opacity: 0.7;
}

.badge-done {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #00e676;
  background: rgba(0, 230, 118, 0.15);
  border: 1px solid #00e676;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-carried {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #ffb300;
  background: rgba(255, 179, 0, 0.15);
  border: 1px solid #ffb300;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-discovered {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #00d9ff;
  background: rgba(0, 217, 255, 0.15);
  border: 1px solid #00d9ff;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-undiscovered {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: bold;
  color: #889988;
  background: rgba(120, 140, 120, 0.12);
  border: 1px dashed #667766;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-missing {
  display: inline-block;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: bold;
  color: #ff5252;
  background: rgba(255, 82, 82, 0.15);
  border: 1px solid #ff5252;
  border-radius: 3px;
  white-space: nowrap;
}

/* Clickable Hint Box */
.goals-hint-box {
  margin-top: 4px;
  padding-top: 4px;
  border-top: 1px dotted rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  width: 100%;
}

.goals-hint-summary {
  cursor: pointer;
  color: var(--text-dim);
  transition: color 0.2s ease;
  user-select: none;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  outline: none;
}

.goals-hint-summary:hover {
  color: var(--text-accent);
}

.goals-hint-body {
  margin-top: 6px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.45);
  border-left: 2px solid var(--text-accent);
  color: var(--text-bright);
  line-height: 1.45;
  border-radius: 0 4px 4px 0;
  font-style: italic;
}

.goals-summary-box {
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--text-accent);
  border-radius: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Terminal Checklist styling */
.goal-item {
  padding: 3px 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.goal-item.goal-done {
  color: #00e676;
}

.goal-item.goal-progress {
  color: #ffb300;
}

.goal-item.goal-todo {
  color: var(--text-main);
}

.goal-item.goal-undiscovered {
  color: #778877;
  font-style: italic;
}

/* ==========================================================================
   VICTORY SCREEN MODAL & TERMINAL BANNER
   ========================================================================== */
.victory-card {
  background: #020904;
  border: 2px solid #ffd700;
  border-radius: 8px;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.4), inset 0 0 25px rgba(255, 215, 0, 0.15);
  max-width: 650px;
  width: 90%;
  padding: 24px;
  text-align: center;
  position: relative;
  animation: victoryPulse 2.5s infinite alternate;
}

@keyframes victoryPulse {
  0% { box-shadow: 0 0 25px rgba(255, 215, 0, 0.35); }
  100% { box-shadow: 0 0 45px rgba(255, 215, 0, 0.65); }
}

.victory-header {
  margin-bottom: 20px;
}

.victory-trophy-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
}

.victory-title-main {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  font-weight: 900;
  color: #ffd700;
  letter-spacing: 3px;
  text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

.victory-subtitle {
  color: var(--text-accent);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-top: 4px;
}

.victory-message {
  color: var(--text-bright);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: rgba(255, 215, 0, 0.05);
  border-left: 3px solid #ffd700;
  border-right: 3px solid #ffd700;
  border-radius: 4px;
}

.victory-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.victory-stat-box {
  background: rgba(0, 25, 10, 0.6);
  border: 1px solid rgba(255, 215, 0, 0.3);
  padding: 12px;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.v-stat-val {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--text-bright);
}

.v-stat-val.gold { color: #ffd700; text-shadow: 0 0 10px rgba(255, 215, 0, 0.6); }
.v-stat-val.cyan { color: #00e5ff; text-shadow: 0 0 10px rgba(0, 229, 255, 0.6); }
.v-stat-val.amber { color: #ffb300; text-shadow: 0 0 10px rgba(255, 179, 0, 0.6); }

.victory-footer {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.victory-btn-continue {
  background: rgba(0, 229, 255, 0.15) !important;
  border-color: #00e5ff !important;
  color: #00e5ff !important;
  padding: 8px 18px !important;
  font-size: 0.9rem !important;
}

.victory-btn-restart {
  background: rgba(255, 215, 0, 0.15) !important;
  border-color: #ffd700 !important;
  color: #ffd700 !important;
  padding: 8px 18px !important;
  font-size: 0.9rem !important;
}

/* Terminal Victory Banner */
.log-victory-banner {
  border: 2px solid #ffd700;
  background: rgba(255, 215, 0, 0.08);
  padding: 16px;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
  margin: 12px 0;
}

.victory-header-title {
  color: #ffd700;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-align: center;
  margin-bottom: 8px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.victory-body-text {
  color: var(--text-bright);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ==========================================================================
   Adventurer Name & Header Badge Styles
   ========================================================================== */
.adventurer-stat-box {
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(163, 255, 0, 0.08);
  border: 1px solid rgba(163, 255, 0, 0.3);
  transition: all 0.2s ease;
}

.adventurer-stat-box:hover {
  background: rgba(163, 255, 0, 0.2);
  border-color: var(--text-accent);
  box-shadow: 0 0 10px rgba(163, 255, 0, 0.3);
}

.icon-edit-name {
  font-size: 13px !important;
  color: var(--text-dim);
  margin-left: 2px;
  opacity: 0.7;
}

.adventurer-stat-box:hover .icon-edit-name {
  color: var(--text-bright);
  opacity: 1;
}

#stat-player-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
  display: inline-block;
  vertical-align: middle;
}

#stat-score,
#stat-moves,
#stat-health,
.goals-pts,
.c-item-val,
.container-value-badge {
  white-space: nowrap !important;
}

/* ==========================================================================
   Welcome / Identification Modal
   ========================================================================== */
.welcome-modal-card {
  max-width: 560px !important;
  border-color: var(--text-accent) !important;
  box-shadow: 0 0 30px rgba(163, 255, 0, 0.25) !important;
}

.welcome-saved-game-box {
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.4);
  border-radius: 6px;
  padding: 14px;
  margin-bottom: 18px;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
}

.welcome-save-header {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-info);
  font-family: var(--font-header);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.welcome-save-details {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-bright);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.welcome-load-save-btn {
  width: 100%;
  background: rgba(0, 229, 255, 0.2) !important;
  border-color: var(--text-info) !important;
  color: var(--text-info) !important;
  font-size: 0.95rem !important;
  font-weight: bold !important;
  padding: 10px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.welcome-load-save-btn:hover {
  background: rgba(0, 229, 255, 0.35) !important;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.welcome-divider {
  position: relative;
  text-align: center;
  margin: 16px 0 6px;
}

.welcome-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--panel-border);
}

.welcome-divider span {
  position: relative;
  background: var(--panel-bg);
  padding: 0 10px;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--font-header);
  font-weight: 700;
  letter-spacing: 1px;
}

.welcome-intro-text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--text-bright);
}

.welcome-name-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.welcome-input-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-accent);
  letter-spacing: 0.5px;
}

.welcome-input-row {
  display: flex;
  gap: 10px;
}

.welcome-name-input {
  flex: 1;
  background: #000;
  border: 1px solid var(--panel-border);
  color: var(--text-bright);
  font-family: var(--font-mono);
  font-size: 1.05rem;
  padding: 8px 12px;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.welcome-name-input:focus {
  border-color: var(--text-accent);
  box-shadow: 0 0 12px var(--glow-color);
}

.welcome-submit-btn {
  background: rgba(163, 255, 0, 0.15) !important;
  border-color: var(--text-accent) !important;
  color: var(--text-accent) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.welcome-tip-text {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
  margin-top: 6px;
}

/* ==========================================================================
   Divided Scoreboard Modal & Tables
   ========================================================================== */
.scoreboard-modal-card {
  max-width: 860px !important;
  max-height: 90vh !important;
}

.modal-master-section {
  background: linear-gradient(180deg, rgba(28, 22, 6, 0.85) 0%, rgba(13, 21, 13, 0.95) 100%);
  border: 1px solid #ffd700;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.15);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
}

.modal-gold-title {
  color: #ffd700;
  font-family: var(--font-header);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.modal-gold-desc {
  color: #dfc377;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

.modal-noob-section {
  background: rgba(13, 21, 13, 0.7);
  border: 1px dashed rgba(255, 100, 150, 0.4);
  border-radius: 6px;
  padding: 16px;
  margin-top: 10px;
}

.modal-noob-title {
  color: #ff99aa;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif !important;
  font-size: 1.1rem;
  font-weight: bold;
}

.modal-noob-desc {
  color: #cc8899;
  font-size: 0.8rem;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif !important;
  margin-bottom: 12px;
}

.master-table-wrapper {
  overflow-x: auto;
  max-height: 240px;
  overflow-y: auto;
}

.master-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 4px;
  font-size: 0.85rem;
}

.master-table th {
  padding: 8px 10px;
  text-align: left;
  color: #ffd700;
  font-family: var(--font-header);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 215, 0, 0.3);
}

.master-table td {
  padding: 10px;
  background: rgba(45, 35, 10, 0.6);
  border-top: 1px solid rgba(255, 215, 0, 0.2);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  vertical-align: middle;
}

.master-table tr td:first-child {
  border-left: 1px solid rgba(255, 215, 0, 0.2);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

.master-table tr td:last-child {
  border-right: 1px solid rgba(255, 215, 0, 0.2);
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.master-name-cell {
  font-family: var(--font-header), var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: #ffd700 !important;
  text-shadow: 0 0 10px rgba(255, 215, 0, 0.6), 0 1px 2px #000;
  display: flex;
  align-items: center;
  gap: 8px;
}

.master-score-cell {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff275 !important;
  text-shadow: 0 0 10px rgba(255, 242, 117, 0.7);
  white-space: nowrap !important;
}

.master-rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: #ffd700;
  color: #1a1605;
  font-weight: 900;
  border-radius: 50%;
  font-size: 0.85rem;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.master-tag-pill {
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid #ffd700;
  color: #ffd700;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap !important;
  display: inline-block;
}

.noob-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.noob-table th {
  padding: 6px 8px;
  text-align: left;
  color: #ff99aa;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif !important;
  font-size: 0.75rem;
  border-bottom: 1px dashed rgba(255, 153, 170, 0.3);
  white-space: nowrap;
}

.noob-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(255, 153, 170, 0.1);
  color: #ffb3c1;
  white-space: nowrap;
}

.noob-name-cell {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif !important;
  font-size: 0.95rem;
  font-weight: bold;
  color: #ff99aa !important;
  white-space: nowrap !important;
}

.noob-score-cell {
  font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif !important;
  font-size: 0.95rem;
  font-weight: bold;
  color: #ffc2d1 !important;
  white-space: nowrap !important;
}

.noob-title-badge {
  display: inline-block;
  background: rgba(255, 153, 170, 0.15);
  border: 1px solid rgba(255, 153, 170, 0.4);
  color: #ff99aa;
  font-family: 'Comic Sans MS', 'Comic Sans', cursive, sans-serif !important;
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 8px;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.you-pill {
  background: var(--text-accent);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 6px;
  text-transform: uppercase;
  white-space: nowrap !important;
  display: inline-block;
}

