/* ============================================
   PLOT DECRYPTOR - Hacker Terminal Game Styles
   ============================================ */

/* ---- Shared Game Shell ---- */
body {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  background: #000d04;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(0, 80, 30, 0.3) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(0, 60, 20, 0.2) 0%, transparent 55%);
  color: rgba(200, 255, 220, 0.9);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  padding: clamp(0.5rem, 2vw, 1rem) clamp(0.75rem, 2.5vw, 1.5rem);
  display: flex;
  flex-direction: column;
}

footer {
  text-align: center;
  padding: clamp(0.4rem, 1vw, 0.6rem) 1rem;
  background: rgba(0, 10, 4, 0.85);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(0, 255, 80, 0.1);
  font-size: clamp(0.65rem, 1.5vw, 0.75rem);
  color: rgba(0, 255, 80, 0.35);
  font-family: 'Share Tech Mono', monospace;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

footer p { margin: 0; }

.version {
  font-size: 0.65rem;
  opacity: 0.45;
  font-weight: 500;
  background: rgba(0, 255, 80, 0.05);
  border: 1px solid rgba(0, 255, 80, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
}

.social-icons {
  display: flex;
  gap: clamp(0.25rem, 1vw, 0.4rem);
  align-items: center;
}

.social-link,
.stats-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(30px, 5vw, 34px);
  height: clamp(30px, 5vw, 34px);
  background: rgba(0, 255, 80, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 80, 0.15);
  color: rgba(0, 255, 80, 0.7);
  text-decoration: none;
  font-size: clamp(0.9rem, 2vw, 1rem);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.social-link:hover,
.stats-btn:hover {
  transform: translateY(-2px) scale(1.06);
  background: rgba(0, 255, 80, 0.12);
  border-color: rgba(0, 255, 80, 0.4);
  box-shadow: 0 4px 14px rgba(0, 255, 80, 0.2);
  color: #27c93f;
}

/* ---- Binary Rain Canvas ---- */
#binary-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.12;
}

/* ---- Terminal Header Bar ---- */
.terminal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: clamp(0.4rem, 1vw, 0.6rem) clamp(0.75rem, 2vw, 1.25rem);
  background: rgba(0, 20, 10, 0.9);
  border: 1px solid rgba(0, 255, 80, 0.2);
  border-radius: var(--radius-md);
  max-width: 900px;
  margin: clamp(0.4rem, 1.5vw, 0.75rem) auto;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  position: relative;
  overflow: hidden;
}

.terminal-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 80, 0.01) 2px,
    rgba(0, 255, 80, 0.01) 4px
  );
  pointer-events: none;
}

.terminal-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.tdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tdot-red { background: #ff5f56; }
.tdot-yellow { background: #ffbd2e; }
.tdot-green { background: #27c93f; }

.terminal-title {
  flex: 1;
  font-size: clamp(0.6rem, 1.5vw, 0.72rem);
  color: rgba(0, 255, 80, 0.7);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.terminal-mode-label {
  font-size: 0.65rem;
  color: #27c93f;
  letter-spacing: 0.12em;
  font-weight: 700;
  text-transform: uppercase;
}

/* ---- Clues Row ---- */
.clues-row {
  display: flex;
  gap: clamp(0.4rem, 1.5vw, 0.75rem);
  max-width: 900px;
  margin: 0 auto clamp(0.5rem, 1.5vw, 0.75rem);
  padding: 0 clamp(0.25rem, 1vw, 0.5rem);
  flex-wrap: wrap;
}

.clue-card {
  flex: 1;
  min-width: 60px;
  background: rgba(0, 20, 10, 0.85);
  border: 1px solid rgba(0, 255, 80, 0.15);
  border-radius: var(--radius-md);
  padding: clamp(0.4rem, 1.2vw, 0.65rem) 0.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
  transition: all var(--transition-fast);
  animation: clueReveal 0.5s var(--transition-spring);
}

.clue-card:hover {
  border-color: rgba(0, 255, 80, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 80, 0.15);
}

.clue-icon {
  display: block;
  font-size: clamp(1.3rem, 3.5vw, 1.7rem);
  margin-bottom: 0.2rem;
}

.clue-label {
  display: block;
  font-size: 0.6rem;
  font-family: 'Share Tech Mono', monospace;
  color: rgba(0, 255, 80, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- Terminal Window ---- */
.terminal-window {
  max-width: 900px;
  margin: 0 auto clamp(0.5rem, 1.5vw, 0.75rem);
  background: rgba(0, 12, 5, 0.95);
  border: 1px solid rgba(0, 255, 80, 0.25);
  border-radius: var(--radius-md);
  padding: clamp(0.75rem, 2vw, 1.25rem) clamp(0.75rem, 2vw, 1.5rem);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 255, 80, 0.08), inset 0 0 60px rgba(0, 0, 0, 0.5);
}

/* CRT Scanline overlay */
.scanline-overlay {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 3px,
    rgba(0, 255, 80, 0.015) 3px,
    rgba(0, 255, 80, 0.015) 4px
  );
  pointer-events: none;
  z-index: 2;
}

.terminal-prompt {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: clamp(0.7rem, 1.8vw, 0.82rem);
  color: rgba(0, 255, 80, 0.5);
  margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
  position: relative;
  z-index: 3;
}

.prompt-prefix {
  color: rgba(0, 255, 80, 0.4);
}

.blink-cursor {
  color: #27c93f;
  animation: blinkCursor 1s step-end infinite;
}

/* Synopsis text */
.synopsis-text {
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: clamp(0.8rem, 2.2vw, 1rem);
  line-height: 1.9;
  color: rgba(200, 255, 220, 0.9);
  position: relative;
  z-index: 3;
  word-wrap: break-word;
  letter-spacing: 0.03em;
}

/* Redacted spans */
.redacted {
  color: #7000ff;
  display: inline;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(112, 0, 255, 0.6);
  animation: redactFlicker 4s ease-in-out infinite;
  cursor: default;
  user-select: none;
  font-weight: 700;
}

/* Revealed/partially revealed spans */
.revealed {
  color: #00f0ff;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.4);
  animation: revealGlow 0.5s ease;
}

.fully-revealed {
  color: rgba(200, 255, 220, 0.9);
  text-shadow: none;
}

/* Separator between clue chars */
.partial-char {
  display: inline-block;
}

.partial-char.hidden-char {
  color: #7000ff;
  text-shadow: 0 0 8px rgba(112, 0, 255, 0.6);
}

.partial-char.shown-char {
  color: #00f0ff;
}

/* ---- Guess Log ---- */
.guess-log {
  max-width: 900px;
  margin: 0 auto clamp(0.4rem, 1.2vw, 0.6rem);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-height: 28px;
  padding: 0 clamp(0.25rem, 1vw, 0.5rem);
}

.guess-entry {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.72rem, 1.8vw, 0.82rem);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-sm);
  animation: guessSlide 0.3s ease;
}

.guess-entry.wrong {
  background: rgba(255, 50, 50, 0.08);
  border: 1px solid rgba(255, 50, 50, 0.2);
  color: rgba(255, 150, 150, 0.9);
}

.guess-entry .guess-prefix {
  color: rgba(255, 50, 50, 0.6);
  font-weight: 700;
}

/* ---- Input Area ---- */
.input-area {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 clamp(0.25rem, 1vw, 0.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-wrapper {
  position: relative;
}

.terminal-input {
  width: 100%;
  padding: clamp(0.6rem, 1.8vw, 0.85rem) clamp(0.75rem, 2vw, 1.1rem);
  background: rgba(0, 15, 8, 0.95);
  border: 1px solid rgba(0, 255, 80, 0.3);
  border-radius: var(--radius-md);
  color: #27c93f;
  font-family: 'Share Tech Mono', 'Courier New', monospace;
  font-size: clamp(0.85rem, 2.2vw, 1rem);
  letter-spacing: 0.03em;
  outline: none;
  transition: all var(--transition-fast);
  caret-color: #27c93f;
}

.terminal-input::placeholder {
  color: rgba(0, 255, 80, 0.25);
}

.terminal-input:focus {
  border-color: rgba(0, 255, 80, 0.7);
  box-shadow: 0 0 0 3px rgba(0, 255, 80, 0.1), 0 0 20px rgba(0, 255, 80, 0.1);
}

.guess-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: rgba(0, 12, 5, 0.98);
  border: 1px solid rgba(0, 255, 80, 0.25);
  border-radius: var(--radius-md);
  backdrop-filter: blur(20px);
  z-index: 50;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
  display: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
}

.guess-dropdown.show {
  display: block;
  animation: fadeIn 0.15s ease;
}

.guess-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(0, 255, 80, 0.08);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  transition: background var(--transition-fast);
  color: rgba(200, 255, 220, 0.8);
}

.guess-dropdown-item:last-child { border-bottom: none; }

.guess-dropdown-item:hover {
  background: rgba(0, 255, 80, 0.08);
  color: #27c93f;
}

.guess-dropdown-item img {
  width: 30px;
  height: 45px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(0, 255, 80, 0.2);
}

.input-actions {
  display: flex;
  gap: 0.5rem;
}

.submit-guess-btn {
  flex: 1;
  padding: clamp(0.6rem, 1.8vw, 0.8rem) 1rem;
  background: linear-gradient(135deg, #003d20, #005a2c);
  border: 1px solid rgba(0, 255, 80, 0.5);
  border-radius: var(--radius-md);
  color: #27c93f;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.85rem, 2vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-shadow: 0 0 8px rgba(0, 255, 80, 0.5);
  box-shadow: 0 0 12px rgba(0, 255, 80, 0.1);
}

.submit-guess-btn:hover {
  background: linear-gradient(135deg, #005a2c, #007a3d);
  border-color: rgba(0, 255, 80, 0.8);
  box-shadow: 0 0 20px rgba(0, 255, 80, 0.3);
  transform: translateY(-1px);
}

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

.submit-guess-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

.hint-btn {
  padding: clamp(0.6rem, 1.8vw, 0.8rem) clamp(0.75rem, 2vw, 1.25rem);
  background: rgba(112, 0, 255, 0.15);
  border: 1px solid rgba(112, 0, 255, 0.4);
  border-radius: var(--radius-md);
  color: #b026ff;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.hint-btn:hover {
  background: rgba(112, 0, 255, 0.25);
  border-color: rgba(176, 38, 255, 0.7);
  box-shadow: 0 0 16px rgba(112, 0, 255, 0.3);
}

.hint-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ---- Header decrypt pips ---- */
.decrypt-status-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.72rem;
}

.decrypt-label {
  color: rgba(0, 255, 80, 0.5);
  letter-spacing: 0.06em;
}

.decrypt-pips {
  display: flex;
  gap: 4px;
}

.pip {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(0, 255, 80, 0.15);
  border: 1px solid rgba(0, 255, 80, 0.3);
  transition: all 0.3s ease;
}

.pip.active {
  background: #ff5f56;
  border-color: #ff5f56;
  box-shadow: 0 0 8px rgba(255, 95, 86, 0.6);
}

.decrypt-count {
  color: #27c93f;
  font-weight: 700;
  font-size: 0.75rem;
}

/* ---- Start Screen ---- */
.start-terminal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: rgba(0, 20, 10, 0.7);
  border: 1px solid rgba(0, 255, 80, 0.15);
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
}

.boot-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: #27c93f;
  text-shadow: 0 0 10px rgba(0, 255, 80, 0.5);
  margin-bottom: 0.25rem;
  letter-spacing: 0.1em;
  animation: bootBlink 1.5s step-end 4;
}

.start-content h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 900;
  background: linear-gradient(135deg, #27c93f, #00f0ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.start-content > p {
  color: var(--text-secondary);
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  margin-bottom: 0.75rem;
}

.rules-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  text-align: left;
}

.rules-list li {
  padding: 0.4rem 0 0.4rem 1.5rem;
  position: relative;
  font-size: clamp(0.78rem, 2vw, 0.9rem);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--divider-color);
  font-family: 'Share Tech Mono', monospace;
}

.rules-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: #27c93f;
  font-weight: 700;
}

.mode-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1rem;
}

.mode-panel {
  background: rgba(0, 12, 5, 0.8);
  border: 1px solid rgba(0, 255, 80, 0.15);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.mode-panel h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 800;
  margin: 0;
}

.mode-panel p {
  font-size: 0.78rem;
  color: var(--text-secondary);
  flex: 1;
  font-family: 'Share Tech Mono', monospace;
  line-height: 1.5;
}

.mode-btn {
  margin-top: auto;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-md);
  font-family: 'Share Tech Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.daily-btn {
  background: linear-gradient(135deg, #003d20, #005a2c);
  border: 1px solid rgba(0, 255, 80, 0.5);
  color: #27c93f;
  text-shadow: 0 0 8px rgba(0, 255, 80, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 80, 0.1);
}

.daily-btn:hover {
  border-color: rgba(0, 255, 80, 0.8);
  box-shadow: 0 0 24px rgba(0, 255, 80, 0.3);
  transform: translateY(-2px);
}

.endless-btn {
  background: rgba(112, 0, 255, 0.2);
  border: 1px solid rgba(112, 0, 255, 0.5);
  color: #b026ff;
  text-shadow: 0 0 8px rgba(112, 0, 255, 0.4);
  box-shadow: 0 0 12px rgba(112, 0, 255, 0.1);
}

.endless-btn:hover {
  border-color: rgba(176, 38, 255, 0.8);
  box-shadow: 0 0 24px rgba(112, 0, 255, 0.3);
  transform: translateY(-2px);
}

/* ---- ACCESS GRANTED Overlay ---- */
.access-granted-overlay {
  background: rgba(0, 30, 10, 0.95) !important;
}

.access-granted-content {
  background: rgba(0, 15, 8, 0.98);
  border: 1px solid rgba(0, 255, 80, 0.4);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: min(92%, 480px);
  box-shadow: 0 0 60px rgba(0, 255, 80, 0.2), 0 0 120px rgba(0, 255, 80, 0.05);
  animation: accessGrantedAppear 0.6s var(--transition-bounce);
  position: relative;
}

.ag-terminal-header {
  display: flex;
  gap: 5px;
  margin-bottom: 1rem;
  justify-content: flex-start;
}

.ag-icon {
  font-size: 3.5rem;
  margin-bottom: 0.25rem;
}

.ag-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #27c93f;
  text-shadow: 0 0 20px rgba(0, 255, 80, 0.6);
  margin-bottom: 0.25rem;
  animation: glitchText 3s infinite;
}

.ag-subtitle {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.85rem, 2vw, 1rem);
  color: rgba(200, 255, 220, 0.8);
  margin-bottom: 0.5rem;
}

.ag-score {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: #00f0ff;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

.ag-poster {
  width: clamp(80px, 15vw, 120px);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(0, 255, 80, 0.3);
  box-shadow: 0 0 16px rgba(0, 255, 80, 0.2);
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ---- BREACH Overlay ---- */
.breach-overlay {
  background: rgba(30, 0, 0, 0.95) !important;
}

.breach-content {
  background: rgba(15, 0, 0, 0.98);
  border: 1px solid rgba(255, 50, 50, 0.4);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: min(92%, 480px);
  box-shadow: 0 0 60px rgba(255, 50, 50, 0.2);
  animation: accessGrantedAppear 0.6s var(--transition-bounce);
}

.breach-icon {
  font-size: 3.5rem;
  margin-bottom: 0.25rem;
}

.breach-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.4rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #ff5f56;
  text-shadow: 0 0 20px rgba(255, 95, 86, 0.6);
  margin-bottom: 0.5rem;
}

.breach-message {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  color: rgba(255, 200, 200, 0.8);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ---- Result Action Buttons ---- */
.action-btn {
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: 'Share Tech Mono', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  letter-spacing: 0.1em;
  margin: 0.3rem;
  text-transform: uppercase;
}

.share-btn {
  background: rgba(29, 155, 240, 0.2);
  border: 1px solid rgba(29, 155, 240, 0.5);
  color: #1d9bf0;
}

.share-btn:hover {
  background: rgba(29, 155, 240, 0.3);
  box-shadow: 0 0 16px rgba(29, 155, 240, 0.3);
}

.next-btn {
  background: linear-gradient(135deg, #003d20, #005a2c);
  border: 1px solid rgba(0, 255, 80, 0.5);
  color: #27c93f;
}

.next-btn:hover {
  box-shadow: 0 0 20px rgba(0, 255, 80, 0.3);
  transform: translateY(-2px);
}

.play-again-btn {
  background: rgba(255, 95, 86, 0.2);
  border: 1px solid rgba(255, 95, 86, 0.5);
  color: #ff5f56;
}

.play-again-btn:hover {
  background: rgba(255, 95, 86, 0.3);
  box-shadow: 0 0 16px rgba(255, 95, 86, 0.3);
}

/* ---- Stats Modal ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}

.stat-card {
  background: rgba(0, 12, 5, 0.8);
  border: 1px solid rgba(0, 255, 80, 0.15);
  border-radius: var(--radius-md);
  padding: 0.85rem 0.4rem;
  text-align: center;
  transition: all var(--transition-fast);
}

.stat-card:hover {
  border-color: rgba(0, 255, 80, 0.4);
  box-shadow: 0 0 12px rgba(0, 255, 80, 0.15);
}

.stat-icon { font-size: 1.3rem; margin-bottom: 0.2rem; }

.stat-value {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.3rem, 3.5vw, 1.8rem);
  font-weight: 700;
  color: #27c93f;
  text-shadow: 0 0 10px rgba(0, 255, 80, 0.4);
}

.stat-label {
  font-size: 0.62rem;
  color: rgba(0, 255, 80, 0.5);
  font-family: 'Share Tech Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.1rem;
}

.achievements-section { margin-top: 1.25rem; }
.achievements-section h3 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: rgba(0, 255, 80, 0.7);
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.6rem;
}

/* ---- How To Play ---- */
.how-to-content {
  max-width: min(90%, 560px) !important;
  background: rgba(0, 8, 3, 0.98) !important;
  border-color: rgba(0, 255, 80, 0.25) !important;
}

.how-to-content h2 {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1rem, 3vw, 1.3rem);
  letter-spacing: 0.12em;
  color: #27c93f;
}

.how-to-steps { display: flex; flex-direction: column; gap: 0.6rem; margin: 1rem 0; }
.how-step { display: flex; align-items: flex-start; gap: 0.6rem; }

.step-num {
  width: 24px;
  height: 24px;
  background: rgba(0, 255, 80, 0.2);
  border: 1px solid rgba(0, 255, 80, 0.5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #27c93f;
  font-family: 'Share Tech Mono', monospace;
  flex-shrink: 0;
}

.how-step p {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.75rem, 1.8vw, 0.85rem);
  color: rgba(200, 255, 220, 0.8);
  line-height: 1.5;
  margin: 0;
  padding-top: 3px;
}

.scoring-info {
  background: rgba(0, 12, 5, 0.8);
  border: 1px solid rgba(0, 255, 80, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  margin-top: 1rem;
}

.scoring-info h4 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.85rem;
  color: #27c93f;
  margin-bottom: 0.75rem;
  letter-spacing: 0.1em;
}

.score-table { display: flex; flex-direction: column; gap: 0.3rem; }
.score-row {
  display: flex;
  justify-content: space-between;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.78rem;
  color: rgba(200, 255, 220, 0.7);
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(0, 255, 80, 0.08);
}
.score-val { color: #27c93f; font-weight: 700; }

/* ---- Overlay & Modal Base ---- */
.overlay {
  display: none;
  position: fixed;
  top: clamp(40px, 8vh, 60px);
  left: 0;
  width: 100vw;
  height: calc(100vh - clamp(40px, 8vh, 60px));
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px);
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.overlay.show { display: flex; animation: fadeIn 0.3s ease; }

.overlay-content {
  background: rgba(0, 8, 3, 0.97);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(0, 255, 80, 0.2);
  padding: clamp(1.25rem, 3vw, 2rem);
  border-radius: var(--radius-lg);
  text-align: center;
  max-width: min(92%, 620px);
  max-height: 85vh;
  overflow-y: auto;
  z-index: 201;
  box-shadow: 0 0 40px rgba(0, 255, 80, 0.1);
  animation: scaleIn 0.4s var(--transition-bounce);
  position: relative;
}

.overlay-content h2 {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(1.1rem, 3vw, 1.4rem);
  color: #27c93f;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
}

.start-content {
  max-width: min(92%, 560px);
}

.stats-content {
  max-width: min(90%, 660px);
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 255, 80, 0.08);
  border: 1px solid rgba(0, 255, 80, 0.2);
  color: rgba(0, 255, 80, 0.7);
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  font-family: monospace;
}

.close-btn:hover {
  background: rgba(0, 255, 80, 0.15);
  border-color: rgba(0, 255, 80, 0.5);
  color: #27c93f;
}

/* ---- Loading ---- */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(0, 255, 80, 0.2);
  border-top-color: #27c93f;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-text {
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  color: rgba(0, 255, 80, 0.7);
  letter-spacing: 0.08em;
  animation: pulse 1.2s ease-in-out infinite;
}

/* ---- Animations ---- */
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes bootBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes redactFlicker {
  0%, 90%, 100% { opacity: 1; }
  92%, 98% { opacity: 0.6; }
  95% { opacity: 0.8; }
}

@keyframes revealGlow {
  from { text-shadow: 0 0 20px rgba(0, 240, 255, 0.9); }
  to { text-shadow: 0 0 6px rgba(0, 240, 255, 0.4); }
}

@keyframes clueReveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes guessSlide {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes accessGrantedAppear {
  from { opacity: 0; transform: scale(0.88); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes glitchText {
  0%, 96%, 100% { text-shadow: 0 0 20px rgba(0, 255, 80, 0.6); }
  97% { text-shadow: -2px 0 #ff5f56, 2px 0 #00f0ff, 0 0 20px rgba(0, 255, 80, 0.6); }
  98% { text-shadow: 2px 0 #ff5f56, -2px 0 #00f0ff, 0 0 20px rgba(0, 255, 80, 0.6); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- Responsive ---- */
@media (max-width: 600px) {
  .mode-panels { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .input-actions { flex-direction: column; }
  .clues-row { gap: 0.3rem; }
  .clue-card { min-width: 50px; }
  .terminal-title { display: none; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: rgba(0, 255, 80, 0.03); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 80, 0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 80, 0.3); }
