/* ═══════════════════════════════════════════════════════════
   JACKININ — Cyberpunk 2077 Terminal Stylesheet
   ═══════════════════════════════════════════════════════════ */

/* ─── DESIGN TOKENS ─── */
:root {
  --bg-deep: #05050a;
  --bg-primary: #0a0a12;
  --bg-panel: #0d0d18;
  --bg-panel-alt: #111122;
  --bg-input: #0a0a14;

  --cyan: #00f0ff;
  --cyan-dim: #00899a;
  --cyan-glow: rgba(0, 240, 255, 0.3);
  --magenta: #ff003c;
  --magenta-dim: #99002a;
  --magenta-glow: rgba(255, 0, 60, 0.3);
  --yellow: #fcee09;
  --yellow-dim: #9a9200;
  --green: #00ff9d;
  --green-glow: rgba(0, 255, 157, 0.35);
  --red: #ff1744;
  --red-glow: rgba(255, 23, 68, 0.35);

  --text-primary: #e0e0e8;
  --text-secondary: #7a7a8e;
  --text-dim: #3a3a50;

  --font-display: 'Orbitron', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;

  --border: 1px solid rgba(0, 240, 255, 0.15);
  --border-hover: 1px solid rgba(0, 240, 255, 0.4);
  --radius: 2px;
  --transition: 0.2s ease;
}

/* ─── RESET ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--cyan-dim) var(--bg-deep);
}

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

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--cyan-dim);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cyan);
}

/* ─── SCANLINES ─── */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.08) 2px,
      rgba(0, 0, 0, 0.08) 4px);
}

.crt-flicker {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9998;
  animation: crt-flicker 0.15s infinite;
  opacity: 0.02;
  background: rgba(0, 240, 255, 0.03);
}

@keyframes crt-flicker {
  0% {
    opacity: 0.02;
  }

  50% {
    opacity: 0.04;
  }

  100% {
    opacity: 0.02;
  }
}

/* ─── GLITCH TEXT ─── */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 var(--magenta);
  clip-path: inset(0 0 0 0);
  animation: glitch-1 2.5s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: 2px 0 var(--cyan);
  clip-path: inset(0 0 0 0);
  animation: glitch-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-1 {
  0% {
    clip-path: inset(40% 0 61% 0);
  }

  20% {
    clip-path: inset(92% 0 1% 0);
  }

  40% {
    clip-path: inset(43% 0 1% 0);
  }

  60% {
    clip-path: inset(25% 0 58% 0);
  }

  80% {
    clip-path: inset(54% 0 7% 0);
  }

  100% {
    clip-path: inset(58% 0 43% 0);
  }
}

@keyframes glitch-2 {
  0% {
    clip-path: inset(65% 0 13% 0);
  }

  20% {
    clip-path: inset(79% 0 2% 0);
  }

  40% {
    clip-path: inset(48% 0 30% 0);
  }

  60% {
    clip-path: inset(3% 0 80% 0);
  }

  80% {
    clip-path: inset(10% 0 70% 0);
  }

  100% {
    clip-path: inset(35% 0 48% 0);
  }
}

/* ─── HEADER ─── */
.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.05) 0%, transparent 100%);
  border-bottom: var(--border);
  position: relative;
  z-index: 10;
  opacity: 0;
}

.terminal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 4px;
  text-shadow: 0 0 10px var(--cyan-glow), 0 0 30px var(--cyan-glow);
}

.logo-bracket {
  color: var(--magenta);
  text-shadow: 0 0 10px var(--magenta-glow);
}

.system-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.status-dot.pulse {
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 6px var(--green);
  }

  50% {
    opacity: 0.4;
    box-shadow: 0 0 2px var(--green);
  }
}

.header-right {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.eddies-display {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(252, 238, 9, 0.4);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.eddies-symbol {
  font-size: 1rem;
  opacity: 0.8;
}

.eddies-count {
  min-width: 60px;
  text-align: right;
}

.stats-mini {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.stat-completed {
  color: var(--green);
}

.stat-flatlined {
  color: var(--magenta);
}

/* ─── MAIN LAYOUT ─── */
.terminal-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  opacity: 0;
}

/* ─── PANELS ─── */
.panel {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}

.gigs-panel {
  border-right: var(--border);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(0, 240, 255, 0.08);
}

.panel-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 3px;
  text-transform: uppercase;
}

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

/* ─── BUTTONS ─── */
.btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 0.5rem 1rem;
  border: var(--border);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

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

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

.btn-primary {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-primary:hover {
  background: rgba(0, 240, 255, 0.1);
  box-shadow: 0 0 15px var(--cyan-glow), inset 0 0 15px var(--cyan-glow);
}

.btn-danger {
  border-color: var(--magenta);
  color: var(--magenta);
}

.btn-danger:hover {
  background: rgba(255, 0, 60, 0.1);
  box-shadow: 0 0 15px var(--magenta-glow), inset 0 0 15px var(--magenta-glow);
}

.btn-ghost {
  border-color: var(--text-dim);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.btn-small {
  font-size: 0.7rem;
  padding: 0.35rem 0.7rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

/* ─── INPUTS ─── */
.input-cyber {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 0.6rem 0.8rem;
  background: var(--bg-input);
  border: var(--border);
  color: var(--text-primary);
  outline: none;
  transition: all var(--transition);
  width: 100%;
}

.input-cyber:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--cyan-glow);
}

.input-cyber::placeholder {
  color: var(--text-dim);
}

.input-small {
  width: 100px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.input-group label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.select-cyber {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f0ff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 30px;
  min-width: 180px;
}

.slider-cyber {
  -webkit-appearance: none;
  appearance: none;
  width: 100px;
  height: 4px;
  background: var(--bg-panel-alt);
  outline: none;
  border-radius: 2px;
}

.slider-cyber::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border-radius: 1px;
  cursor: pointer;
  box-shadow: 0 0 6px var(--cyan-glow);
}

.slider-cyber::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: var(--cyan);
  border-radius: 1px;
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px var(--cyan-glow);
}

/* ─── GIG FORM ─── */
.gig-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-panel);
  border: var(--border);
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease;
}

.gig-form-row {
  display: flex;
  gap: 1rem;
}

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

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── HACKING PROGRESS BAR ─── */
.hacking-bar-container {
  padding: 1rem;
  background: var(--bg-panel);
  border: 1px solid rgba(0, 240, 255, 0.2);
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease;
  position: relative;
}

.hacking-bar-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--magenta), var(--cyan));
  animation: barGlow 2s linear infinite;
}

@keyframes barGlow {

  0%,
  100% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }
}

.hacking-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.hacking-label {
  font-size: 0.75rem;
  color: var(--cyan);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hacking-timer {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--cyan);
  text-shadow: 0 0 10px var(--cyan-glow);
  letter-spacing: 2px;
}

.hacking-bar {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.1);
}

.hacking-segment {
  height: 28px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px solid rgba(0, 240, 255, 0.08);
  transition: all 0.5s ease;
  position: relative;
}

.hacking-segment.filled {
  background: linear-gradient(180deg, var(--cyan) 0%, rgba(0, 240, 255, 0.6) 100%);
  border-color: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow), inset 0 0 4px rgba(255, 255, 255, 0.2);
  animation: segmentFill 0.5s ease;
}

.hacking-segment.filling {
  background: linear-gradient(180deg, rgba(0, 240, 255, 0.4) 0%, rgba(0, 240, 255, 0.15) 100%);
  border-color: rgba(0, 240, 255, 0.4);
  animation: segmentPulse 1s infinite;
}

@keyframes segmentFill {
  from {
    transform: scaleY(0.3);
    opacity: 0.3;
  }

  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

@keyframes segmentPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.8;
  }
}

.hacking-bar-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.75rem;
}

/* ─── GIG LIST ─── */
.gig-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.gig-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  background: var(--bg-panel);
  border: var(--border);
  transition: all var(--transition);
  animation: slideDown 0.3s ease;
}

.gig-item:hover {
  border-color: rgba(0, 240, 255, 0.3);
  background: var(--bg-panel-alt);
}

.gig-item-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.gig-item-title {
  font-size: 0.9rem;
  color: var(--text-primary);
}

.gig-item-meta {
  font-size: 0.7rem;
  color: var(--text-dim);
  display: flex;
  gap: 1rem;
}

.gig-item-reward {
  color: var(--yellow-dim);
}

.gig-item-right {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.gig-item.completed {
  border-color: rgba(0, 255, 157, 0.15);
  opacity: 0.6;
}

.gig-item.completed .gig-item-title {
  text-decoration: line-through;
  color: var(--green);
}

.gig-item.flatlined {
  border-color: rgba(255, 0, 60, 0.15);
  opacity: 0.5;
}

.gig-item.flatlined .gig-item-title {
  text-decoration: line-through;
  color: var(--magenta);
}

.gig-status-badge {
  font-size: 0.6rem;
  padding: 0.2rem 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
}

.badge-completed {
  background: rgba(0, 255, 157, 0.1);
  color: var(--green);
  border: 1px solid rgba(0, 255, 157, 0.2);
}

.badge-flatlined {
  background: rgba(255, 0, 60, 0.1);
  color: var(--magenta);
  border: 1px solid rgba(255, 0, 60, 0.2);
}

.badge-pending {
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyan-dim);
  border: 1px solid rgba(0, 240, 255, 0.15);
}

/* ─── NOTES ─── */
.notes-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.note-item {
  padding: 0.75rem 1rem;
  background: var(--bg-panel);
  border: var(--border);
  transition: all var(--transition);
  animation: slideDown 0.3s ease;
  position: relative;
}

.note-item:hover {
  border-color: rgba(0, 240, 255, 0.3);
  background: var(--bg-panel-alt);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.note-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: normal;
  color: var(--cyan);
  background: none;
  border: none;
  outline: none;
  padding: 0;
  width: 100%;
  cursor: text;
}

.note-title:focus {
  color: var(--text-primary);
}

.note-actions {
  display: flex;
  gap: 0.3rem;
}

.note-content {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: none;
  border: none;
  outline: none;
  width: 100%;
  min-height: 40px;
  resize: vertical;
  line-height: 1.5;
}

.note-content:focus {
  color: var(--text-primary);
}

.note-timestamp {
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-top: 0.4rem;
  text-align: right;
}

/* ─── EMPTY STATES ─── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-dim);
  text-align: center;
}

.empty-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--cyan-dim);
  opacity: 0.3;
}

.empty-state p {
  font-size: 0.8rem;
  line-height: 1.6;
}

.empty-state .accent {
  color: var(--cyan);
}

/* ─── OVERLAYS ─── */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.3s ease;
}

.overlay.hidden {
  display: none;
}

@keyframes overlayIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Flatline Overlay */
.flatline-overlay {
  background: rgba(20, 0, 0, 0.95);
}

.flatline-content {
  text-align: center;
  position: relative;
}

.flatline-line {
  width: 80vw;
  height: 2px;
  background: var(--magenta);
  box-shadow: 0 0 20px var(--magenta), 0 0 60px var(--magenta-glow);
  margin-bottom: 2rem;
  animation: flatlinePulse 0.8s ease-in-out infinite;
}

@keyframes flatlinePulse {

  0%,
  100% {
    opacity: 1;
    transform: scaleX(1);
  }

  50% {
    opacity: 0.6;
    transform: scaleX(0.98);
  }
}

.flatline-text {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: var(--magenta);
  text-shadow: 0 0 30px var(--magenta), 0 0 60px var(--magenta-glow);
  letter-spacing: 10px;
  margin-bottom: 1rem;
  animation: flatlineGlitch 0.3s ease-in-out;
}

@keyframes flatlineGlitch {
  0% {
    transform: translate(0);
  }

  20% {
    transform: translate(-5px, 3px);
  }

  40% {
    transform: translate(5px, -3px);
  }

  60% {
    transform: translate(-3px, -2px);
  }

  80% {
    transform: translate(3px, 2px);
  }

  100% {
    transform: translate(0);
  }
}

.flatline-sub {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  letter-spacing: 2px;
}

/* Eddies Overlay */
.eddies-overlay {
  background: rgba(0, 10, 0, 0.95);
}

.eddies-content {
  text-align: center;
  position: relative;
}

.eddies-icon {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--green);
  text-shadow: 0 0 30px var(--green-glow);
  margin-bottom: 1rem;
  animation: eddiesBounce 0.6s ease;
}

@keyframes eddiesBounce {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }

  50% {
    transform: scale(1.2);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.eddies-amount {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 900;
  color: var(--green);
  text-shadow: 0 0 20px var(--green-glow);
  letter-spacing: 4px;
  margin-bottom: 0.5rem;
  animation: countUp 0.8s ease;
}

@keyframes countUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.eddies-label {
  font-size: 0.85rem;
  color: var(--green);
  letter-spacing: 3px;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.eddies-cascade {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.eddie-particle {
  position: absolute;
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--green);
  opacity: 0;
  animation: particleFall 1.5s ease forwards;
}

@keyframes particleFall {
  0% {
    opacity: 1;
    transform: translateY(-20px) rotate(0deg);
  }

  100% {
    opacity: 0;
    transform: translateY(200px) rotate(360deg);
  }
}

/* ─── FOOTER ─── */
.terminal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 2rem;
  border-top: var(--border);
  background: var(--bg-primary);
  position: relative;
  opacity: 0;
}

.terminal-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-dim), transparent);
  opacity: 0.3;
}

.sound-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sound-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.sound-label .accent {
  color: var(--cyan-dim);
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.clock {
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

/* ─── UTILITY ─── */
.hidden {
  display: none !important;
}

.accent {
  color: var(--cyan);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .terminal-main {
    grid-template-columns: 1fr;
  }

  .gigs-panel {
    border-right: none;
    border-bottom: var(--border);
    max-height: none;
  }

  .notes-panel {
    max-height: none;
  }

  .terminal-header {
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
  }

  .header-left,
  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .flatline-text {
    font-size: 2.5rem;
  }

  .eddies-amount {
    font-size: 2.5rem;
  }

  .sound-controls {
    flex-wrap: wrap;
  }
}

/* ═══════════════════════════════════════════════════════════
   BOOT SEQUENCE OVERLAY
   ═══════════════════════════════════════════════════════════ */

.boot-overlay {
  background: var(--bg-deep);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.boot-overlay .boot-content {
  max-width: 600px;
  width: 90%;
  z-index: 2;
  position: relative;
}

.boot-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--cyan);
  text-align: center;
  letter-spacing: 6px;
  text-shadow: 0 0 20px var(--cyan-glow), 0 0 60px var(--cyan-glow);
  margin-bottom: 0.5rem;
  animation: bootLogoFlicker 0.15s ease-in-out 3;
}

.boot-logo-bracket {
  color: var(--magenta);
  text-shadow: 0 0 15px var(--magenta-glow);
}

@keyframes bootLogoFlicker {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.2;
  }

  100% {
    opacity: 1;
  }
}

.boot-subtitle {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-align: center;
  letter-spacing: 4px;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.boot-log {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--cyan-dim);
  line-height: 1.8;
  max-height: 280px;
  overflow-y: hidden;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(0, 240, 255, 0.08);
  margin-bottom: 1.5rem;
}

.boot-line {
  opacity: 0;
  animation: bootLineIn 0.3s ease forwards;
  white-space: nowrap;
  overflow: hidden;
}

.boot-line-green {
  color: var(--green);
  text-shadow: 0 0 8px var(--green-glow);
  font-weight: bold;
}

@keyframes bootLineIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.boot-title {
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.boot-title.boot-title-visible {
  opacity: 1;
  transform: translateY(0);
}

.boot-ready {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--green);
  text-shadow: 0 0 10px var(--green-glow);
  letter-spacing: 3px;
  animation: bootReadyPulse 1s ease infinite;
}

@keyframes bootReadyPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

/* Grid background decoration */
.boot-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.03;
  background-image:
    linear-gradient(var(--cyan) 1px, transparent 1px),
    linear-gradient(90deg, var(--cyan) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Fade out transition — shared by preboot and boot */
.boot-overlay.boot-fade-out,
.preboot-overlay.boot-fade-out {
  animation: bootFadeOut 0.8s ease forwards;
}

@keyframes bootFadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
    pointer-events: none;
  }
}

/* ═══════════════════════════════════════════════════════════
   PRE-BOOT: CONNECT PERSONAL LINK
   ═══════════════════════════════════════════════════════════ */

.preboot-overlay {
  background: var(--bg-deep);
  z-index: 250;
  flex-direction: column;
}

.preboot-content {
  z-index: 2;
  position: relative;
}

.preboot-id-card {
  border: 1px solid rgba(0, 240, 255, 0.2);
  background: rgba(10, 10, 18, 0.9);
  padding: 2.5rem 3rem;
  text-align: center;
  position: relative;
  max-width: 420px;
  width: 90vw;
}

.preboot-id-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--cyan));
  z-index: -1;
  opacity: 0.15;
  animation: prebootBorderPulse 3s ease infinite;
}

@keyframes prebootBorderPulse {

  0%,
  100% {
    opacity: 0.1;
  }

  50% {
    opacity: 0.25;
  }
}

.preboot-id-header {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.preboot-id-logo {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--cyan);
  letter-spacing: 5px;
  text-shadow: 0 0 15px var(--cyan-glow), 0 0 40px var(--cyan-glow);
  margin-bottom: 1.5rem;
}

.preboot-id-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan-dim), transparent);
  margin: 0 auto 1.5rem;
  width: 80%;
}

.preboot-id-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--magenta);
  letter-spacing: 2px;
  margin-bottom: 2rem;
  animation: prebootStatusBlink 1.5s step-end infinite;
}

@keyframes prebootStatusBlink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

.preboot-btn {
  font-size: 0.85rem !important;
  padding: 0.75rem 2rem !important;
  letter-spacing: 2px !important;
  animation: prebootBtnGlow 2s ease infinite;
}

@keyframes prebootBtnGlow {

  0%,
  100% {
    box-shadow: 0 0 10px var(--cyan-glow);
  }

  50% {
    box-shadow: 0 0 25px var(--cyan-glow), 0 0 50px var(--cyan-glow);
  }
}

.preboot-id-footer {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin-top: 2rem;
  opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════
   CYBERDECK THEMES
   ═══════════════════════════════════════════════════════════ */

/* --- Arasaka (Red/Black corporate) --- */
body[data-theme="arasaka"] {
  --cyan: #ff1a1a;
  --cyan-dim: #991010;
  --cyan-glow: rgba(255, 26, 26, 0.3);
  --magenta: #ff6600;
  --magenta-dim: #993d00;
  --magenta-glow: rgba(255, 102, 0, 0.3);
  --green: #ff4444;
  --green-glow: rgba(255, 68, 68, 0.35);
  --border: 1px solid rgba(255, 26, 26, 0.15);
  --border-hover: 1px solid rgba(255, 26, 26, 0.4);
}

/* --- Militech (Military Green) --- */
body[data-theme="militech"] {
  --cyan: #7fff00;
  --cyan-dim: #4d9900;
  --cyan-glow: rgba(127, 255, 0, 0.3);
  --magenta: #aabb00;
  --magenta-dim: #667700;
  --magenta-glow: rgba(170, 187, 0, 0.3);
  --green: #00ff44;
  --green-glow: rgba(0, 255, 68, 0.35);
  --border: 1px solid rgba(127, 255, 0, 0.15);
  --border-hover: 1px solid rgba(127, 255, 0, 0.4);
}

/* --- Mox (Neon Pink / "Sexy" Cyber) --- */
body[data-theme="mox"] {
  --cyan: #ff00ff;
  /* Electric Magenta */
  --cyan-dim: #b300b3;
  --cyan-glow: rgba(255, 0, 255, 0.6);
  --magenta: #ff0055;
  /* Hot Pink/Red */
  --magenta-dim: #b3003b;
  --magenta-glow: rgba(255, 0, 85, 0.6);
  --green: #aa00ff;
  /* Deep Purple */
  --green-glow: rgba(170, 0, 255, 0.5);
  --yellow: #ff99cc;
  /* Soft Pink/Pastel */
  --yellow-dim: #cc6699;

  --bg-deep: #1a0510;
  /* Dark Purple-Black background */
  --bg-primary: #2b0a1a;
  --bg-panel: #330d20;
  --bg-panel-alt: #401026;
  --bg-input: #260815;

  --border: 1px solid rgba(255, 0, 255, 0.3);
  --border-hover: 1px solid rgba(255, 0, 85, 0.6);

  --text-primary: #ffccff;
  /* Pale Pink Text */
  --text-secondary: #ff99cc;
  --text-dim: #993366;
}

/* Theme switcher small select */
.select-small {
  min-width: 110px !important;
  font-size: 0.7rem;
  padding: 0.35rem 0.6rem;
}

/* ═══════════════════════════════════════════════════════════
   FIXER CONTRACT / GIG TYPE COLORS
   ═══════════════════════════════════════════════════════════ */

.gig-type-badge {
  font-size: 0.55rem;
  padding: 0.15rem 0.5rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius);
  margin-right: 0.5rem;
}

/* Gun for Hire — Red */
.gig-type-gun_for_hire .gig-item-title {
  color: #ff4444;
}

.gig-type-gun_for_hire {
  border-left: 3px solid #ff4444;
}

.badge-type-gun_for_hire {
  background: rgba(255, 68, 68, 0.1);
  color: #ff4444;
  border: 1px solid rgba(255, 68, 68, 0.2);
}

/* Thievery — Cyan (default) */
.gig-type-thievery .gig-item-title {
  color: var(--cyan);
}

.gig-type-thievery {
  border-left: 3px solid var(--cyan);
}

.badge-type-thievery {
  background: rgba(0, 240, 255, 0.1);
  color: var(--cyan);
  border: 1px solid rgba(0, 240, 255, 0.2);
}

/* Search & Recover — Amber */
.gig-type-search_recover .gig-item-title {
  color: #ffaa00;
}

.gig-type-search_recover {
  border-left: 3px solid #ffaa00;
}

.badge-type-search_recover {
  background: rgba(255, 170, 0, 0.1);
  color: #ffaa00;
  border: 1px solid rgba(255, 170, 0, 0.2);
}

/* SOS: Merc Needed — Green */
.gig-type-sos_merc .gig-item-title {
  color: #00ff9d;
}

.gig-type-sos_merc {
  border-left: 3px solid #00ff9d;
}

.badge-type-sos_merc {
  background: rgba(0, 255, 157, 0.1);
  color: #00ff9d;
  border: 1px solid rgba(0, 255, 157, 0.2);
}

/* Override completed/flatlined styles to be stronger */
.gig-item.completed .gig-item-title,
.gig-item.flatlined .gig-item-title {
  color: inherit;
}

/* ═══════════════════════════════════════════════════════════
   DATA SHARDS
   ═══════════════════════════════════════════════════════════ */

.shard-drop-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem;
  border: 1px dashed rgba(255, 170, 0, 0.25);
  background: rgba(255, 170, 0, 0.03);
  margin-bottom: 0.75rem;
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: all 0.3s ease;
  cursor: pointer;
}

.shard-drop-zone.drag-over {
  border-color: rgba(255, 170, 0, 0.6);
  background: rgba(255, 170, 0, 0.08);
  color: #ffaa00;
  box-shadow: 0 0 15px rgba(255, 170, 0, 0.15);
}

.drop-icon {
  font-size: 1rem;
  color: rgba(255, 170, 0, 0.4);
}

.note-item {
  border-left: 3px solid rgba(255, 170, 0, 0.3);
}

.note-item .note-title {
  color: #ffaa00;
}

.note-item::before {
  content: '⬡';
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  font-size: 0.7rem;
  color: rgba(255, 170, 0, 0.2);
}

/* ═══════════════════════════════════════════════════════════
   RELIC MALFUNCTION
   ═══════════════════════════════════════════════════════════ */

.relic-overlay {
  background: rgba(5, 0, 0, 0.96);
  z-index: 150;
  flex-direction: column;
}

.relic-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.relic-glitch-bar {
  width: 80vw;
  height: 3px;
  margin: 0 auto 2rem;
  background: linear-gradient(90deg, transparent, #ff1744, #00f0ff, #ff1744, transparent);
  animation: relicBarScan 0.5s linear infinite;
}

@keyframes relicBarScan {
  0% {
    transform: translateX(-20%);
  }

  100% {
    transform: translateX(20%);
  }
}

.relic-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: #ff1744;
  text-shadow: 0 0 30px rgba(255, 23, 68, 0.6), 3px 0 #00f0ff, -3px 0 #ff003c;
  letter-spacing: 8px;
  margin-bottom: 1.5rem;
  animation: relicGlitch 0.15s ease infinite;
}

@keyframes relicGlitch {
  0% {
    text-shadow: 3px 0 #00f0ff, -3px 0 #ff003c, 0 0 30px rgba(255, 23, 68, 0.6);
  }

  25% {
    text-shadow: -2px 1px #00f0ff, 2px -1px #ff003c, 0 0 30px rgba(255, 23, 68, 0.6);
    transform: translate(1px, -1px);
  }

  50% {
    text-shadow: 1px -2px #00f0ff, -1px 2px #ff003c, 0 0 30px rgba(255, 23, 68, 0.6);
    transform: translate(-1px, 1px);
  }

  75% {
    text-shadow: -3px 0 #00f0ff, 3px 0 #ff003c, 0 0 30px rgba(255, 23, 68, 0.6);
    transform: translate(2px, 0);
  }

  100% {
    text-shadow: 3px 0 #00f0ff, -3px 0 #ff003c, 0 0 30px rgba(255, 23, 68, 0.6);
    transform: translate(0);
  }
}

.relic-quote {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.relic-static {
  width: 60vw;
  max-width: 400px;
  height: 4px;
  margin: 0 auto 2rem;
  background: repeating-linear-gradient(90deg,
      transparent 0px,
      rgba(255, 23, 68, 0.3) 2px,
      transparent 4px);
  animation: relicStatic 0.1s step-end infinite;
}

@keyframes relicStatic {
  0% {
    opacity: 0.5;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.3;
  }
}

.relic-btn {
  font-size: 0.8rem !important;
  padding: 0.75rem 2rem !important;
  animation: relicBtnPulse 1.5s ease infinite;
}

@keyframes relicBtnPulse {

  0%,
  100% {
    box-shadow: 0 0 10px var(--cyan-glow);
  }

  50% {
    box-shadow: 0 0 30px var(--cyan-glow), 0 0 60px rgba(255, 23, 68, 0.2);
  }
}

.relic-warning {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: #ff1744;
  letter-spacing: 3px;
  margin-top: 2rem;
  animation: prebootStatusBlink 1s step-end infinite;
}

/* Screen shake effect applied to body during malfunction */
body.relic-shaking {
  animation: relicShake 0.1s linear infinite;
}

@keyframes relicShake {
  0% {
    transform: translate(0);
  }

  25% {
    transform: translate(2px, -1px);
  }

  50% {
    transform: translate(-1px, 2px);
  }

  75% {
    transform: translate(1px, 1px);
  }

  100% {
    transform: translate(-2px, -1px);
  }
}