/* PRUF Terminal CSS - CRT Aesthetic */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

:root {
  --bg: #0a0e12;
  --fg: #f5c84a;
  --fg-dim: #d4a634;
  --fg-dimmer: #b8922d;
  --muted: #6b5e4a;
  --accent: #ff6b35;
  --accent-glow: rgba(255, 107, 53, 0.5);
  --cyan: #00d9ff;
  --pink: #ff2e97;
  --green: #00ff88;
  --font-mono: 'Share Tech Mono', 'Courier New', monospace;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Scanline effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(0deg, transparent 24%, rgba(245, 200, 74, 0.03) 25%, rgba(245, 200, 74, 0.03) 26%, transparent 27%, transparent 74%, rgba(245, 200, 74, 0.03) 75%, rgba(245, 200, 74, 0.03) 76%, transparent 77%, transparent),
    linear-gradient(90deg, transparent 24%, rgba(245, 200, 74, 0.03) 25%, rgba(245, 200, 74, 0.03) 26%, transparent 27%, transparent 74%, rgba(245, 200, 74, 0.03) 75%, rgba(245, 200, 74, 0.03) 76%, transparent 77%, transparent);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.15),
    rgba(0, 0, 0, 0.15) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 3;
  animation: scanline 8s linear infinite;
}

@keyframes scanline {
  0% { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

.grain {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='3.5' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.08'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 2;
  opacity: 0.5;
}

.content-wrapper {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.std-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--fg-dim);
  background: rgba(10, 14, 18, 0.95);
}

.std-header.compact {
  padding: 8px 15px;
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.logo-bracket {
  color: var(--accent);
  font-size: 18px;
}

.logo-main {
  font-weight: 700;
}

.logo-sub {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
}

.header-handle {
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  gap: 20px;
}

.nav-link {
  color: var(--fg-dim);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.15em;
  transition: all 0.3s;
}

.nav-link:hover {
  color: var(--fg);
  text-shadow: 0 0 10px var(--fg);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-handle {
  color: var(--cyan);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.btn-icon {
  background: none;
  border: 1px solid var(--fg-dimmer);
  color: var(--fg);
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 16px;
}

.btn-icon:hover {
  border-color: var(--fg);
  box-shadow: 0 0 10px rgba(245, 200, 74, 0.3);
}

/* Main Content */
main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 40px;
}

/* Compact header for dashboard */
.std-header.compact {
  padding: 10px 20px;
}

.std-header.compact .logo {
  font-size: 16px;
  gap: 8px;
}

.std-header.compact .logo-bracket {
  font-size: 20px;
}

.std-header.compact .header-handle {
  font-size: 12px;
}

/* Terminal Box */
.terminal {
  max-width: 800px;
  width: 100%;
  border: 3px solid var(--fg-dim);
  background: rgba(10, 14, 18, 0.95);
  box-shadow: 
    0 0 30px rgba(245, 200, 74, 0.3),
    inset 0 0 50px rgba(245, 200, 74, 0.05);
  position: relative;
}

.terminal::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  background: linear-gradient(45deg, var(--cyan), var(--pink), var(--accent), var(--fg));
  background-size: 400% 400%;
  animation: borderGlow 8s ease infinite;
  z-index: -1;
  opacity: 0.3;
  filter: blur(8px);
}

@keyframes borderGlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.terminal-header {
  padding: 12px 20px;
  background: rgba(245, 200, 74, 0.1);
  border-bottom: 2px solid var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.15em;
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.terminal-body {
  padding: 15px 15px 20px;
  text-align: center;
  min-height: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Screens */
.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* Hero Section */
.hero-kicker {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero-main {
  font-size: 48px;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-bottom: 6px;
  text-shadow: 
    0 0 15px var(--fg),
    0 0 30px var(--fg);
}

.hero-logo {
  margin: 10px 0 15px;
}

.hero-logo-img {
  width: 200px;
  height: 200px;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-logo-img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(212, 165, 55, 0.5);
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  41%, 43% { opacity: 0.9; }
  45%, 47% { opacity: 0.95; }
}

.hero-sub {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--fg-dimmer);
  margin-bottom: 15px;
  text-transform: uppercase;
}

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--fg-dim), transparent);
  margin: 15px 0;
}

.hero-rules {
  font-size: 13px;
  line-height: 1.8;
  margin-bottom: 15px;
}

.hero-rules.compact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  line-height: 1.4;
  margin-bottom: 15px;
}

.rule-item {
  color: var(--fg-dim);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.rule-sep {
  color: var(--accent);
  font-size: 10px;
}

.rule-line {
  color: var(--fg-dim);
}

.rule-highlight {
  color: var(--accent);
}

.hero-status {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 15px;
  letter-spacing: 0.12em;
}

.status-label {
  color: var(--cyan);
}

.waitlist-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.counter-label {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-top: 4px;
}

.counter-number {
  color: var(--fg);
  font-size: 32px;
  font-weight: bold;
  text-shadow: 0 0 12px var(--fg);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
  align-items: center;
}

.splash-actions {
  gap: 12px;
}

.splash-actions .btn {
  min-width: 260px;
  text-align: center;
}

.hero-footer {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  line-height: 1.7;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid;
  background: none;
  position: relative;
  transition: all 0.3s;
  overflow: hidden;
  text-decoration: none;
  display: inline-block;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
  box-shadow: 
    0 0 20px rgba(245, 200, 74, 0.5),
    inset 0 0 20px rgba(245, 200, 74, 0.2);
}

.btn-primary:hover {
  background: var(--fg-dim);
  box-shadow: 
    0 0 30px rgba(245, 200, 74, 0.7),
    inset 0 0 30px rgba(245, 200, 74, 0.3);
  transform: translateY(-2px);
}

.btn-secondary {
  color: var(--fg);
  border-color: var(--fg-dimmer);
  background: rgba(245, 200, 74, 0.05);
}

.btn-secondary:hover {
  border-color: var(--fg);
  background: rgba(245, 200, 74, 0.1);
}

/* Verification Screen */
.verification-title {
  font-size: 18px;
  letter-spacing: 0.15em;
  margin-bottom: 10px;
  color: var(--fg);
  text-shadow: 0 0 10px var(--fg);
}

.scan-area {
  width: 300px;
  height: 300px;
  border: 3px solid var(--fg-dim);
  margin: 20px auto;
  position: relative;
  background: rgba(245, 200, 74, 0.03);
  overflow: hidden;
}

.scan-area video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.scan-area canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.scan-area.scanning {
  border-color: var(--fg);
  box-shadow: 0 0 30px rgba(245, 200, 74, 0.5);
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--fg);
  box-shadow: 0 0 20px var(--fg);
  display: none;
}

.scan-area.scanning .scan-line {
  display: block;
  animation: scan 2s linear infinite;
}

@keyframes scan {
  0% { top: 0; }
  100% { top: 100%; }
}

.scan-corners {
  position: absolute;
  inset: -3px;
  pointer-events: none;
}

.scan-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border: 3px solid var(--fg);
}

.scan-corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.scan-corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.scan-corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.scan-corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

.verify-status {
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--fg);
  margin: 20px 0 10px;
}

.verify-instruction {
  font-size: 18px;
  letter-spacing: 0.1em;
  color: var(--cyan);
  margin-bottom: 20px;
  min-height: 30px;
}

.progress-bar {
  width: 100%;
  max-width: 300px;
  height: 30px;
  border: 2px solid var(--fg-dimmer);
  margin: 20px auto;
  position: relative;
  background: rgba(245, 200, 74, 0.05);
}

.progress-fill {
  height: 100%;
  background: var(--fg);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 20px rgba(245, 200, 74, 0.5);
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--bg);
  mix-blend-mode: difference;
  z-index: 1;
}

/* Success Screen - Compact for mobile */
.verified-icon {
  font-size: 36px;
  color: var(--green);
  margin-bottom: 8px;
  text-shadow: 0 0 20px var(--green);
}

.handle-display {
  margin: 10px 0;
}

.handle-label {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 3px;
}

.handle-value {
  font-size: 18px;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan);
  letter-spacing: 0.05em;
}

.position-display {
  margin-bottom: 10px;
}

.position-label {
  font-size: 9px;
  color: var(--muted);
  margin-right: 6px;
}

.position-value {
  font-size: 16px;
  color: var(--fg);
  font-weight: bold;
}

.position-total {
  font-size: 11px;
  color: var(--muted);
  margin-left: 6px;
}

.success-message {
  font-size: 10px;
  color: var(--fg-dim);
  line-height: 1.5;
  margin-bottom: 10px;
}

/* Error Screen */
.error-icon {
  font-size: 80px;
  color: var(--accent);
  margin-bottom: 20px;
  text-shadow: 0 0 30px var(--accent-glow);
}

.error-title {
  color: var(--accent);
}

.error-message {
  color: var(--accent);
  font-size: 14px;
  margin-bottom: 30px;
}

/* No Camera / Desktop Screen */
.desktop-notice {
  text-align: center;
  margin-bottom: 20px;
}

.desktop-icon {
  font-size: 60px;
  margin-bottom: 15px;
}

.no-camera-message {
  color: var(--fg);
  font-size: 14px;
  letter-spacing: 0.1em;
  line-height: 1.8;
  margin-bottom: 20px;
}

.qr-display {
  text-align: center;
  margin: 30px 0;
}

.qr-label {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.15em;
  margin-bottom: 15px;
}

.qr-code-container {
  display: inline-block;
  padding: 15px;
  background: var(--fg);
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 0 30px rgba(245, 200, 74, 0.3);
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  display: block;
}

.qr-url {
  font-size: 18px;
  color: var(--cyan);
  letter-spacing: 0.1em;
  font-weight: bold;
  text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.no-camera-footer {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.1em;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* Footer */
.std-footer {
  padding: 20px;
  text-align: center;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.15em;
  border-top: 1px solid rgba(245, 200, 74, 0.2);
}

/* ============================================
   TERMINAL DASHBOARD STYLES
   ============================================ */

.terminal-main {
  flex: 1;
  padding: 30px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.terminal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  max-width: 1200px;
  width: 100%;
}

/* Panels */
.panel {
  border: 2px solid var(--fg-dimmer);
  background: rgba(10, 14, 18, 0.95);
  box-shadow: 0 0 20px rgba(245, 200, 74, 0.1);
}

.panel-header {
  padding: 12px 16px;
  background: rgba(245, 200, 74, 0.1);
  border-bottom: 2px solid var(--fg-dimmer);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.15em;
}

.panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg);
  box-shadow: 0 0 6px var(--fg);
}

.panel-dot.pulse {
  animation: pulse 1.5s ease-in-out infinite;
  background: var(--accent);
}

.panel-dot.dim {
  background: var(--muted);
  box-shadow: none;
}

.panel-body {
  padding: 20px;
}

.panel-body.disabled {
  opacity: 0.5;
}

/* Status Panel */
.status-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}

.status-row:last-child {
  margin-bottom: 0;
}

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

.status-value {
  color: var(--fg);
}

.status-value.highlight {
  color: var(--cyan);
}

.status-value.verified {
  color: var(--green);
}

/* Stats Panel */
.big-stat {
  text-align: center;
  padding: 20px 0;
}

.big-number {
  display: block;
  font-size: 48px;
  font-weight: bold;
  color: var(--fg);
  text-shadow: 0 0 20px var(--fg);
}

.big-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.2em;
  margin-top: 8px;
}

.stat-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--fg-dimmer), transparent);
  margin: 15px 0;
}

.node-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.node-stat {
  text-align: center;
  padding: 10px;
  background: rgba(245, 200, 74, 0.05);
  border: 1px solid rgba(245, 200, 74, 0.2);
}

.node-code {
  font-size: 12px;
  color: var(--cyan);
  margin-bottom: 4px;
}

.node-count {
  font-size: 18px;
  color: var(--fg);
  font-weight: bold;
}

.milestone-tracker {
  text-align: center;
}

.milestone-label {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.15em;
}

.milestone-bar {
  height: 20px;
  border: 1px solid var(--fg-dimmer);
  margin: 10px 0;
  background: rgba(245, 200, 74, 0.05);
}

.milestone-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fg-dimmer), var(--fg));
  transition: width 0.5s ease;
}

.milestone-target {
  font-size: 14px;
  color: var(--fg);
}

/* Broadcasts Panel */
.broadcasts-list {
  max-height: 400px;
  overflow-y: auto;
}

.broadcast-item {
  padding: 15px;
  border: 1px solid rgba(245, 200, 74, 0.2);
  margin-bottom: 10px;
  background: rgba(245, 200, 74, 0.03);
}

.broadcast-item:last-child {
  margin-bottom: 0;
}

.broadcast-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 10px;
}

.broadcast-type {
  color: var(--accent);
}

.broadcast-date {
  color: var(--muted);
}

.broadcast-title {
  font-size: 14px;
  color: var(--fg);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
}

.broadcast-body {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.6;
}

.unread-badge {
  background: var(--accent);
  color: var(--bg);
  padding: 2px 6px;
  font-size: 9px;
  margin-left: auto;
}

.coming-soon {
  background: var(--muted);
  color: var(--bg);
  padding: 2px 6px;
  font-size: 9px;
  margin-left: auto;
}

/* Charter Panel */
.charter-intro {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 1.6;
  margin-bottom: 20px;
}

.charter-link {
  display: block;
  text-align: center;
}

/* ============================================
   TERMINAL DASHBOARD - AIRPORT STYLE
   v4.9.2
   ============================================ */

.terminal-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 0 20px 0;
}

/* Pickle Summer Header */
.pickle-header-panel {
  background: rgba(245, 200, 74, 0.08);
}

.pickle-header-body {
  text-align: center;
  padding: 20px;
}

.pickle-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 16px;
}

.pickle-count-number {
  font-size: 42px;
  font-weight: bold;
  color: var(--fg);
  text-shadow: 0 0 20px var(--fg);
}

.pickle-count-label {
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.1em;
}

.pickle-progress-bar {
  height: 8px;
  background: rgba(245, 200, 74, 0.15);
  border: 1px solid var(--fg-dimmer);
  margin-bottom: 16px;
  overflow: hidden;
}

.pickle-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fg-dimmer), var(--fg));
  min-width: 2px;
  transition: width 0.5s ease;
}

.pickle-stats-row {
  display: flex;
  justify-content: center;
  gap: 40px;
}

.pickle-stat {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.pickle-stat-label {
  color: var(--muted);
}

.pickle-stat-value {
  color: var(--fg);
  font-weight: bold;
}

/* Your Node Panel */
.your-node-panel {
  background: rgba(0, 217, 255, 0.05);
  border-color: var(--cyan);
}

.your-node-panel .panel-header {
  border-bottom-color: var(--cyan);
}

.your-node-body {
  text-align: center;
  padding: 20px;
}

.your-node-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.rank-star {
  font-size: 24px;
  color: var(--fg);
  text-shadow: 0 0 10px var(--fg);
}

.rank-label {
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.15em;
}

.rank-number {
  font-size: 32px;
  font-weight: bold;
  color: var(--cyan);
  text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.your-node-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.your-node-info .node-code {
  font-size: 20px;
  font-weight: bold;
  color: var(--fg);
}

.node-separator {
  color: var(--muted);
  font-size: 20px;
}

.node-city {
  font-size: 16px;
  color: var(--fg-dim);
}

.your-node-population {
  margin-bottom: 16px;
}

.node-humans {
  font-size: 24px;
  font-weight: bold;
  color: var(--fg);
}

.node-humans-label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.your-handle {
  padding: 12px;
  background: rgba(0, 217, 255, 0.1);
  border: 1px solid rgba(0, 217, 255, 0.3);
}

.your-handle-label {
  font-size: 11px;
  color: var(--muted);
  margin-right: 8px;
}

.your-handle-value {
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 0.05em;
}

/* Departures Panel */
.departures-panel {
  background: rgba(10, 14, 18, 0.98);
}

.departures-body {
  padding: 16px;
}

.departures-table {
  width: 100%;
}

.departures-header-row {
  display: grid;
  grid-template-columns: 50px 60px 1fr 80px;
  gap: 8px;
  padding: 8px 0;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--fg-dimmer);
}

.departures-wave-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 11px;
}

.wave-label {
  color: var(--accent);
  letter-spacing: 0.15em;
}

.wave-name {
  color: var(--fg);
  letter-spacing: 0.1em;
}

.departures-divider {
  height: 1px;
  background: var(--fg-dimmer);
  margin: 4px 0;
}

.departures-list {
  max-height: 400px;
  overflow-y: auto;
}

.departure-row {
  display: grid;
  grid-template-columns: 50px 60px 1fr 80px;
  gap: 8px;
  padding: 10px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(245, 200, 74, 0.1);
  transition: background 0.2s;
}

.departure-row:hover {
  background: rgba(245, 200, 74, 0.05);
}

.departure-row:last-child {
  border-bottom: none;
}

.dep-col {
  display: flex;
  align-items: center;
}

.dep-rank {
  color: var(--muted);
  justify-content: center;
}

.dep-node {
  color: var(--cyan);
  font-weight: bold;
  letter-spacing: 0.1em;
}

.dep-city {
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dep-humans {
  color: var(--fg);
  justify-content: flex-end;
  font-weight: bold;
}

.departures-total-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0 4px 0;
  font-size: 14px;
}

.total-label {
  color: var(--muted);
  letter-spacing: 0.1em;
}

.total-value {
  color: var(--fg);
  font-weight: bold;
  font-size: 18px;
  text-shadow: 0 0 10px var(--fg);
}

/* Live Arrivals Panel */
.live-arrivals-panel {
  background: rgba(0, 255, 136, 0.03);
  border-color: var(--green);
}

.live-arrivals-panel .panel-header {
  border-bottom-color: var(--green);
}

.live-arrivals-panel .panel-dot {
  background: var(--green);
}

.live-arrivals-body {
  padding: 12px 16px;
}

.arrival-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 255, 136, 0.1);
  opacity: 0.7;
  transition: all 0.3s ease;
}

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

.arrival-item.new {
  opacity: 1;
  background: rgba(0, 255, 136, 0.08);
  margin: 0 -16px;
  padding: 10px 16px;
  animation: arrivalGlow 2s ease-out;
}

@keyframes arrivalGlow {
  0% {
    background: rgba(0, 255, 136, 0.25);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  }
  100% {
    background: rgba(0, 255, 136, 0.08);
    box-shadow: none;
  }
}

.arrival-indicator {
  font-size: 10px;
  color: var(--green);
  margin-top: 3px;
}

.arrival-item.new .arrival-indicator {
  animation: pulse 1s ease-in-out infinite;
}

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

.arrival-handle {
  font-size: 13px;
  color: var(--fg);
  letter-spacing: 0.05em;
}

.arrival-time {
  font-size: 11px;
  color: var(--muted);
}

.arrival-item.new .arrival-time {
  color: var(--green);
}

/* Mobile Responsive Adjustments */
@media (max-width: 480px) {
  .terminal-dashboard {
    gap: 12px;
  }
  
  .pickle-count-number {
    font-size: 36px;
  }
  
  .pickle-stats-row {
    gap: 24px;
  }
  
  .rank-number {
    font-size: 28px;
  }
  
  .your-node-info .node-code {
    font-size: 18px;
  }
  
  .node-city {
    font-size: 14px;
  }
  
  .node-humans {
    font-size: 20px;
  }
  
  .departures-header-row {
    grid-template-columns: 40px 50px 1fr 70px;
    font-size: 9px;
  }
  
  .departure-row {
    grid-template-columns: 40px 50px 1fr 70px;
    font-size: 12px;
  }
  
  .dep-city {
    font-size: 11px;
  }
}

@media (max-width: 375px) {
  .pickle-count-number {
    font-size: 32px;
  }
  
  .pickle-stats-row {
    gap: 16px;
  }
  
  .pickle-stat {
    font-size: 12px;
  }
  
  .rank-number {
    font-size: 24px;
  }
  
  .departures-header-row {
    grid-template-columns: 35px 45px 1fr 60px;
  }
  
  .departure-row {
    grid-template-columns: 35px 45px 1fr 60px;
    font-size: 11px;
    padding: 8px 0;
  }
  
  .arrival-handle {
    font-size: 12px;
  }
}
.referral-preview {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 15px;
}

.referral-link-preview {
  background: rgba(0, 0, 0, 0.3);
  padding: 10px;
  border: 1px solid var(--fg-dimmer);
}

.referral-link-preview code {
  font-size: 11px;
  color: var(--cyan);
  word-break: break-all;
}

/* ============================================
   CHARTER PAGE STYLES
   ============================================ */

.charter-main {
  flex: 1;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}

.charter-document {
  max-width: 800px;
  width: 100%;
  background: rgba(10, 14, 18, 0.95);
  border: 2px solid var(--fg-dim);
  padding: 60px;
  box-shadow: 0 0 30px rgba(245, 200, 74, 0.2);
}

.charter-header {
  text-align: center;
  margin-bottom: 40px;
}

.charter-seal {
  font-size: 48px;
  color: var(--fg);
  text-shadow: 0 0 20px var(--fg);
  margin-bottom: 20px;
}

.charter-title {
  font-size: 32px;
  letter-spacing: 0.3em;
  color: var(--fg);
  text-shadow: 0 0 15px var(--fg);
  margin-bottom: 10px;
}

.charter-subtitle {
  font-size: 14px;
  color: var(--fg-dim);
  letter-spacing: 0.15em;
}

.charter-date {
  font-size: 12px;
  color: var(--muted);
  margin-top: 15px;
}

.charter-divider {
  height: 2px;
  background: linear-gradient(to right, transparent, var(--fg), transparent);
  margin: 40px 0;
}

.charter-section {
  margin-bottom: 40px;
}

.section-title {
  font-size: 18px;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
  text-shadow: 0 0 10px var(--accent-glow);
}

.charter-section p {
  font-size: 14px;
  line-height: 1.8;
  color: var(--fg-dim);
  margin-bottom: 15px;
}

.charter-section p:last-child {
  margin-bottom: 0;
}

/* Laws Grid */
.laws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.law-item {
  padding: 20px;
  border: 1px solid var(--fg-dimmer);
  background: rgba(245, 200, 74, 0.03);
}

.law-number {
  font-size: 24px;
  color: var(--accent);
  font-weight: bold;
  display: block;
  margin-bottom: 10px;
}

.law-title {
  font-size: 16px;
  color: var(--fg);
  letter-spacing: 0.15em;
  margin-bottom: 10px;
}

.law-description {
  font-size: 12px;
  color: var(--fg-dim);
  line-height: 1.6;
}

/* Tech Items */
.tech-intro {
  margin-bottom: 25px;
}

.tech-item {
  margin-bottom: 25px;
  padding-left: 20px;
  border-left: 2px solid var(--cyan);
}

.tech-title {
  font-size: 14px;
  color: var(--cyan);
  letter-spacing: 0.15em;
  margin-bottom: 8px;
}

.tech-item p {
  font-size: 13px;
}

/* Lists */
.foundation-list,
.promise-list {
  list-style: none;
  padding-left: 20px;
}

.foundation-list li,
.promise-list li {
  font-size: 13px;
  color: var(--fg-dim);
  line-height: 2;
  position: relative;
}

.foundation-list li::before,
.promise-list li::before {
  content: '→';
  position: absolute;
  left: -20px;
  color: var(--accent);
}

/* Charter CTA */
.charter-cta {
  text-align: center;
  margin-top: 30px;
}

/* Charter Footer */
.charter-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 2px solid var(--fg-dim);
}

.charter-footer .charter-seal {
  font-size: 36px;
  margin-bottom: 15px;
}

.charter-signoff {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.15em;
  line-height: 1.8;
}

/* ============================================
   RECOVERY CODE SECTION
   ============================================ */

.recovery-section {
  background: rgba(255, 107, 53, 0.1);
  border: 2px solid var(--accent);
  padding: 25px;
  margin: 25px 0;
  text-align: center;
}

.recovery-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 15px;
}

.recovery-code {
  font-size: 32px;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  margin-bottom: 15px;
  font-weight: 700;
  user-select: all;
  cursor: pointer;
}

.recovery-code:hover {
  background: rgba(0, 0, 0, 0.5);
}

.recovery-warning {
  font-size: 14px;
  letter-spacing: 0.15em;
  color: var(--accent);
  line-height: 1.8;
}

.recovery-warning-sub {
  font-size: 11px;
  color: var(--muted);
  display: block;
  margin-top: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .hero-main {
    font-size: 48px;
    letter-spacing: 0.15em;
  }

  .terminal-body {
    padding: 30px 20px;
  }

  .scan-area {
    width: 250px;
    height: 250px;
  }

  .terminal-grid {
    grid-template-columns: 1fr;
  }

  .charter-document {
    padding: 30px 20px;
  }

  .charter-title {
    font-size: 24px;
    letter-spacing: 0.15em;
  }

  .laws-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   HEADER RIGHT SECTION
   ============================================ */

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.inbox-btn {
  position: relative;
  font-size: 18px;
}

.inbox-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--accent);
  color: var(--bg);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
}

.header-tier {
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.header-tier.tier-post {
  background: var(--accent);
  color: var(--bg);
  padding: 2px 8px;
}

/* ============================================
   SYSTEM ALERT BANNER
   ============================================ */

.system-alert-banner {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 20px;
  background: rgba(255, 107, 53, 0.2);
  border-bottom: 2px solid var(--accent);
}

.system-alert-banner.alert-info {
  background: rgba(0, 217, 255, 0.1);
  border-color: var(--cyan);
}

.system-alert-banner.alert-warning {
  background: rgba(255, 170, 0, 0.2);
  border-color: #ffaa00;
}

.system-alert-banner.alert-urgent {
  background: rgba(255, 107, 53, 0.3);
  border-color: var(--accent);
  animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.alert-icon {
  font-size: 18px;
}

.alert-message {
  flex: 1;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.alert-dismiss {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 16px;
  cursor: pointer;
  opacity: 0.7;
}

.alert-dismiss:hover {
  opacity: 1;
}

/* ============================================
   TIER DISPLAY
   ============================================ */

.tier-pickle {
  color: var(--green);
}

.tier-post {
  color: var(--accent);
}

/* ============================================
   LIVE FEED PANEL
   ============================================ */

.live-feed-list {
  max-height: 250px;
  overflow-y: auto;
}

.feed-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(245, 200, 74, 0.1);
  font-size: 12px;
}

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

.feed-item.placeholder {
  color: var(--muted);
  justify-content: center;
}

.feed-icon {
  color: var(--fg);
}

.feed-time {
  color: var(--muted);
  min-width: 50px;
}

.feed-handle {
  color: var(--fg);
}

.feed-text {
  color: var(--fg-dim);
}

.feed-new_human .feed-icon {
  color: var(--green);
}

.feed-upgrade .feed-icon {
  color: var(--accent);
}

.feed-milestone .feed-icon {
  color: var(--cyan);
}

/* ============================================
   INBOX OVERLAY
   ============================================ */

.inbox-overlay,
.compose-overlay,
.message-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 18, 0.95);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.inbox-panel {
  background: var(--bg);
  border: 2px solid var(--fg);
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}

.inbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 2px solid var(--fg-dimmer);
}

.inbox-header h2 {
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--fg);
}

.inbox-close {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}

.compose-section {
  padding: 15px 20px;
  border-bottom: 1px solid var(--fg-dimmer);
}

.compose-btn {
  width: 100%;
}

.inbox-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.inbox-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px;
}

.inbox-item {
  padding: 12px 15px;
  border: 1px solid var(--fg-dimmer);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.inbox-item:hover {
  border-color: var(--fg);
  background: rgba(245, 200, 74, 0.05);
}

.inbox-item.unread {
  border-left: 3px solid var(--accent);
  background: rgba(255, 107, 53, 0.05);
}

.inbox-item-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.inbox-from {
  color: var(--fg);
  font-size: 12px;
}

.inbox-date {
  color: var(--muted);
  font-size: 11px;
}

.inbox-subject {
  color: var(--fg-dim);
  font-size: 12px;
}

/* ============================================
   COMPOSE OVERLAY
   ============================================ */

.compose-panel {
  background: var(--bg);
  border: 2px solid var(--fg);
  width: 90%;
  max-width: 500px;
}

.compose-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 2px solid var(--fg-dimmer);
}

.compose-header h2 {
  font-size: 16px;
  letter-spacing: 0.2em;
  color: var(--fg);
}

.compose-close {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}

.compose-body {
  padding: 20px;
}

.compose-to {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 13px;
}

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

.compose-value {
  color: var(--fg);
}

.compose-field {
  margin-bottom: 15px;
}

.compose-field label {
  display: block;
  margin-bottom: 8px;
}

.compose-input {
  width: 100%;
  background: rgba(245, 200, 74, 0.05);
  border: 2px solid var(--fg-dimmer);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 12px;
}

.compose-input:focus {
  outline: none;
  border-color: var(--fg);
}

.compose-textarea {
  width: 100%;
  min-height: 150px;
  background: rgba(245, 200, 74, 0.05);
  border: 2px solid var(--fg-dimmer);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 12px;
  resize: vertical;
}

.compose-textarea:focus {
  outline: none;
  border-color: var(--fg);
}

.compose-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ============================================
   MESSAGE VIEW OVERLAY
   ============================================ */

.message-view-panel {
  background: var(--bg);
  border: 2px solid var(--fg);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.message-view-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 2px solid var(--fg-dimmer);
}

.message-back {
  background: none;
  border: none;
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 12px;
  cursor: pointer;
}

.message-back:hover {
  color: var(--fg);
}

.message-close {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 20px;
  cursor: pointer;
}

.message-view-body {
  padding: 20px;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  font-size: 12px;
}

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

.meta-value {
  color: var(--fg);
  margin-left: 5px;
}

.message-subject {
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 20px;
  letter-spacing: 0.1em;
}

.message-body-content {
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ============================================
   PWA / ADD TO HOME SCREEN
   ============================================ */

.pwa-panel {
  background: rgba(245, 200, 74, 0.08);
  border-color: var(--fg);
}

.pwa-intro {
  color: var(--fg-dim);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 15px;
}

.pwa-btn {
  width: 100%;
}

/* ============================================
   iOS INSTRUCTIONS OVERLAY
   ============================================ */

.ios-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 14, 18, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  overflow-y: auto;
}

.ios-modal {
  background: var(--bg);
  border: 2px solid var(--fg);
  width: 100%;
  max-width: 320px;
  max-height: 90vh;
  overflow-y: auto;
}

.ios-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 2px solid var(--fg-dimmer);
}

.ios-header h2 {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--fg);
}

.ios-close {
  background: none;
  border: none;
  color: var(--fg);
  font-size: 18px;
  cursor: pointer;
}

.ios-body {
  padding: 15px;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid rgba(245, 200, 74, 0.1);
}

.ios-step:last-of-type {
  border-bottom: none;
}

.ios-step-num {
  width: 28px;
  height: 28px;
  border: 2px solid var(--fg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--fg);
  flex-shrink: 0;
}

.ios-step-text {
  color: var(--fg-dim);
  font-size: 13px;
  flex: 1;
}

.ios-step-text strong {
  color: var(--fg);
}

.ios-icon {
  font-size: 24px;
  color: var(--fg);
  background: rgba(245, 200, 74, 0.15);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.ios-note {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(245, 200, 74, 0.1);
}

.ios-got-it {
  width: calc(100% - 40px);
  margin: 0 20px 20px;
}

/* ============================================
   PWA STANDALONE MODE ADJUSTMENTS
   ============================================ */

@media all and (display-mode: standalone) {
  /* Hide the PWA panel when running as installed app */
  .pwa-panel {
    display: none !important;
  }
  
  /* Safe area insets for notched devices */
  .std-header {
    padding-top: env(safe-area-inset-top);
  }
  
  .std-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* ============================================
   CONFIRMATION ANIMATION SCREEN
   ============================================ */

#confirm-screen {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

#confirm-screen.active {
  display: flex;
}

.confirm-checkmark {
  font-size: 72px;
  color: var(--green);
  text-shadow: 0 0 20px var(--green), 0 0 40px var(--green);
  margin-bottom: 15px;
  transform: scale(0);
  opacity: 0;
  transition: all 0.4s ease-out;
}

.confirm-title {
  color: var(--green) !important;
  text-shadow: 0 0 15px var(--green);
  margin-bottom: 8px;
  font-size: 20px;
}

.confirm-subtitle {
  color: var(--fg-dim);
  font-size: 12px;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.confirm-loader {
  width: 150px;
  height: 3px;
  background: rgba(245, 200, 74, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.confirm-loader-bar {
  width: 100%;
  height: 100%;
  background: var(--green);
  animation: confirmLoad 1.5s ease-in-out forwards;
  box-shadow: 0 0 8px var(--green);
}

@keyframes confirmLoad {
  0% { width: 0%; }
  100% { width: 100%; }
}
}

/* Pulsing glow effect on checkmark */
@keyframes confirmPulse {
  0%, 100% { 
    text-shadow: 0 0 30px var(--green), 0 0 60px var(--green);
  }
  50% { 
    text-shadow: 0 0 50px var(--green), 0 0 100px var(--green), 0 0 150px var(--green);
  }
}

.confirm-checkmark.visible {
  animation: confirmPulse 1.5s ease-in-out infinite;
}

/* ============================================
   RECOVERY CODE DISPLAY
   ============================================ */

.recovery-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(245, 200, 74, 0.2);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.recovery-code-display {
  font-family: var(--font-mono);
  letter-spacing: 0.15em;
  color: var(--cyan);
}

.btn-tiny {
  background: transparent;
  border: 1px solid var(--fg-dim);
  color: var(--fg-dim);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-tiny:hover {
  border-color: var(--fg);
  color: var(--fg);
}

.recovery-warning {
  font-size: 10px;
  color: var(--accent);
  margin-top: 8px;
  opacity: 0.8;
}

/* ============================================ */
/* TAB NAVIGATION                               */
/* ============================================ */

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--fg-dim);
  background: rgba(10, 14, 18, 0.95);
  padding: 0 16px;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px 20px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  letter-spacing: 0.1em;
}

.tab-btn:hover {
  color: var(--fg-dim);
}

.tab-btn.active {
  color: var(--fg);
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--fg);
}

.tab-btn.has-new {
  color: var(--cyan);
}

.msg-indicator {
  color: var(--cyan);
  font-weight: bold;
  margin-left: 4px;
  animation: pulse-indicator 1s ease-in-out infinite;
}

@keyframes pulse-indicator {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Tab Content */
.tab-content {
  display: none;
  padding: 16px;
}

.tab-content.active {
  display: block;
}

/* Terminal tab keeps original grid */
#terminal-tab.active .terminal-grid {
  display: grid;
}

/* ============================================ */
/* MESSAGES TAB                                 */
/* ============================================ */

.messages-container {
  max-width: 600px;
  margin: 0 auto;
}

.messages-section {
  margin-bottom: 24px;
}

.messages-section-header {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.15em;
  padding: 8px 0;
  border-bottom: 1px solid var(--muted);
  margin-bottom: 12px;
}

.messages-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: rgba(245, 200, 74, 0.05);
  border: 1px solid var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.message-item:hover {
  border-color: var(--fg-dim);
  background: rgba(245, 200, 74, 0.1);
}

.message-item.sent {
  border-color: var(--fg-dim);
  cursor: default;
}

.message-item.sent:hover {
  background: rgba(245, 200, 74, 0.05);
}

.message-status {
  font-size: 12px;
  width: 16px;
  flex-shrink: 0;
}

.message-status.read {
  color: var(--muted);
}

.message-status.unread {
  color: var(--cyan);
}

.message-status.sent {
  color: var(--green);
}

.message-preview {
  flex: 1;
  min-width: 0;
}

.message-from {
  font-size: 12px;
  color: var(--fg);
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.message-subject {
  font-size: 14px;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-body-preview {
  font-size: 13px;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-date {
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}

/* Compose to PRUF */
.compose-pruf-section {
  padding: 16px;
  background: rgba(245, 200, 74, 0.05);
  border: 1px solid var(--muted);
}

.compose-warning {
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 12px;
  text-align: center;
}

.compose-field {
  position: relative;
  margin-bottom: 12px;
}

.compose-textarea {
  width: 100%;
  min-height: 120px;
  background: var(--bg);
  border: 1px solid var(--fg-dim);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 12px;
  resize: vertical;
}

.compose-textarea.small {
  min-height: 60px;
}

.compose-textarea:focus {
  outline: none;
  border-color: var(--fg);
}

.compose-textarea::placeholder {
  color: var(--muted);
}

.char-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 10px;
  color: var(--muted);
}

.compose-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}

/* Sent message section */
.sent-pruf-section {
  padding: 12px;
}

.message-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-dot.waiting {
  background: var(--fg-dim);
  animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot.replied {
  background: var(--green);
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* PRUF Reply section */
.pruf-reply-section {
  padding: 12px;
}

.message-item.reply {
  border-color: var(--cyan);
  background: rgba(0, 217, 255, 0.05);
}

.reply-to-pruf {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--muted);
}

.btn-small {
  font-size: 12px;
  padding: 8px 16px;
}

/* Message unread state for tab */
#tab-messages.has-unread {
  color: var(--cyan);
}

/* ============================================
   v4.3.0 - RECOVERY CODE STYLES
   ============================================ */

/* Success Screen - Recovery Code Warning (COMPACT FOR MOBILE) */
.recovery-warning-section {
  background: rgba(255, 107, 53, 0.1);
  border: 2px solid var(--accent);
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
  text-align: center;
}

.recovery-warning-header {
  font-size: 12px;
  font-weight: bold;
  color: var(--accent);
  margin-bottom: 8px;
}

.recovery-code-display {
  background: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 6px;
  padding: 10px 20px;
  margin: 10px auto;
  display: inline-block;
}

.recovery-code-value {
  font-size: 26px;
  font-weight: bold;
  color: var(--fg);
  letter-spacing: 3px;
  font-family: var(--font-mono);
}

.recovery-warning-text {
  font-size: 11px;
  color: var(--fg-dim);
  line-height: 1.4;
  margin-top: 8px;
}

.recovery-warning-text strong {
  color: var(--accent);
}

.recovery-checkbox-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  cursor: pointer;
  font-size: 12px;
  color: var(--fg);
}

.recovery-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--fg);
  cursor: pointer;
}

#enter-terminal-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Dashboard - Recover Handle Section */
.recover-handle-section {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--muted);
  text-align: center;
}

.btn-recover {
  font-size: 12px;
  padding: 10px 20px;
}

.recover-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}

/* Recover Screen Modal */
.recover-modal {
  max-width: 300px;
}

.recover-intro {
  font-size: 12px;
  color: var(--fg-dim);
  margin-bottom: 15px;
  line-height: 1.4;
}

.recover-input-section {
  margin: 12px 0;
}

.recover-input {
  width: 100%;
  background: var(--bg);
  border: 2px solid var(--fg);
  border-radius: 6px;
  padding: 12px;
  font-size: 22px;
  font-family: var(--font-mono);
  color: var(--fg);
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.recover-input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.recover-input::placeholder {
  color: var(--muted);
  letter-spacing: 3px;
}

.recover-error {
  color: var(--accent);
  font-size: 11px;
  margin: 8px 0;
  text-align: center;
}

.recover-warning-box {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px;
  margin: 12px 0;
  font-size: 11px;
  text-align: center;
  line-height: 1.5;
}

.recover-warning-box strong {
  color: var(--accent);
}

#current-handle-to-burn {
  color: var(--fg);
  font-weight: bold;
}

#recover-submit-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Recover Success Screen */
.recover-success-icon {
  font-size: 48px;
  color: var(--green);
  margin-bottom: 15px;
}

.recover-success-text {
  font-size: 18px;
  color: var(--fg);
  margin-bottom: 10px;
}

.recover-success-handle {
  font-size: 24px;
  font-weight: bold;
  color: var(--cyan);
  margin: 15px 0;
}

.recover-burned-text {
  font-size: 12px;
  color: var(--muted);
  margin: 15px 0 25px 0;
}

#burned-handle {
  color: var(--accent);
  text-decoration: line-through;
}

/* ============================================
   SMALL SCREEN OPTIMIZATIONS
   For phones under 375px width (iPhone SE, etc.)
   ============================================ */
@media (max-width: 375px) {
  .terminal-body {
    padding: 12px 10px 15px;
  }
  
  .hero-main {
    font-size: 36px;
  }
  
  .verified-icon {
    font-size: 30px;
    margin-bottom: 5px;
  }
  
  .handle-value {
    font-size: 16px;
  }
  
  .position-value {
    font-size: 14px;
  }
  
  .recovery-warning-section {
    padding: 10px;
    margin: 8px 0;
  }
  
  .recovery-warning-header {
    font-size: 11px;
    margin-bottom: 6px;
  }
  
  .recovery-code-display {
    padding: 8px 15px;
    margin: 8px auto;
  }
  
  .recovery-code-value {
    font-size: 22px;
    letter-spacing: 2px;
  }
  
  .recovery-warning-text {
    font-size: 10px;
    margin-top: 6px;
  }
  
  .recovery-checkbox-label {
    font-size: 11px;
    margin-top: 10px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 10px;
  }
  
  .ios-modal {
    max-width: 280px;
  }
  
  .ios-header h2 {
    font-size: 11px;
  }
  
  .ios-body {
    padding: 12px;
  }
  
  .recover-input {
    font-size: 20px;
    padding: 10px;
  }
  
  .recover-warning-box {
    padding: 8px;
    font-size: 10px;
  }
}

/* ============================================
   MEDIUM SCREENS (375-414px - most iPhones)
   ============================================ */
@media (min-width: 376px) and (max-width: 414px) {
  .terminal-body {
    padding: 15px 15px 20px;
  }
  
  .recovery-warning-section {
    padding: 12px;
    margin: 10px 0;
  }
  
  .recovery-code-value {
    font-size: 24px;
  }
}

/* ============================================
   SAFE AREA INSETS (for notched phones)
   ============================================ */
@supports (padding: max(0px)) {
  .terminal-body {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
  
  .ios-overlay {
    padding: max(15px, env(safe-area-inset-top)) 15px max(15px, env(safe-area-inset-bottom));
  }
}
