:root {
  --bg: #000000;
  --fg: #ffffff;
  --accent: #00ff41; /* Matrix Green-ish */
    --dim: #444;
  --error: #ff3333;
  --tui-bg: #000000;
  --tui-fg: #ffffff;
  --tui-border: #00ff41;
  --tui-highlight: #00ff41;
  --font-mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; overflow: hidden; }

[hidden] { display: none !important; }

body {
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair; /* Gamer/Hacker feel */
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
}

.void-container {
  position: relative;
  z-index: 10;
  text-align: left;
  padding: 2rem;
  border: 1px solid var(--dim);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.glitch-title {
  font-size: 4rem;
  margin: 0 0 1rem 0;
  font-weight: 700;
  letter-spacing: -2px;
  text-transform: uppercase;
  position: relative;
  color: var(--fg);
  mix-blend-mode: difference;
}

.terminal-output {
  font-size: 1.2rem;
  line-height: 1.8;
}

.terminal-output p {
  margin: 0.5rem 0;
  color: var(--dim);
}

.highlight {
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent);
}

.status-ok {
  color: var(--accent);
}

.blinking-cursor {
  display: inline-block;
  width: 10px;
  height: 1.2rem;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: middle;
}

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

/* Glitch Effect on Hover */
.glitch-title:hover {
  text-shadow: 2px 0 var(--accent), -2px 0 #ff00ff;
}

@media (max-width: 600px) {
  .glitch-title { font-size: 2.5rem; }
  .terminal-output { font-size: 1rem; }
}

/* TUI Modal Styles */
.tui-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

/* Full Screen Overlay (Result Screens) */
.full-screen-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 50; /* Below TUI but above content */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.tui-window {
  background: var(--tui-bg);
  color: var(--tui-fg);
  border: 1px solid var(--tui-border);
  padding: 2px;
  min-width: 300px;
  box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
  font-family: var(--font-mono);
  font-weight: normal;
}

.tui-header {
  background: var(--tui-border);
  color: #000;
  text-align: center;
  padding: 4px 0;
  margin-bottom: 1rem;
  font-weight: bold;
  letter-spacing: 1px;
}

.tui-body {
  padding: 1rem 2rem;
  text-align: center;
}

.tui-buttons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
}

.tui-btn {
  background: transparent;
  color: var(--tui-fg);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  transition: all 0.2s;
}

.tui-btn:hover, .tui-btn:focus, .tui-btn.active {
  background: var(--tui-highlight);
  color: #000;
  outline: none;
  box-shadow: 0 0 10px var(--tui-highlight);
}

/* Reboot Button */
.reboot-btn {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: transparent;
  border: 1px solid var(--dim);
  color: var(--dim);
  font-family: var(--font-mono);
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 300;
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.reboot-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.2);
  text-shadow: 0 0 5px var(--accent);
}

.reboot-btn:active {
  transform: scale(0.98);
}

/* Scrollable Wrapper for Content */
.scrollable-wrapper {
  max-height: 100vh;
  overflow-y: auto;
  padding: 4rem 1rem;
  width: 100%;
  max-width: 800px;
  /* Hide scrollbar for Chrome, Safari and Opera */
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}
.scrollable-wrapper::-webkit-scrollbar {
  display: none;
}

/* Manifesto Box */
.manifesto-box {
  margin: 2rem 0;
  text-align: left;
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
}

.manifesto-box p {
  margin: 0.5rem 0;
  font-size: 1.1rem;
  color: var(--fg);
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Countdown Styles */
.countdown-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 3rem 0;
  font-family: var(--font-mono);
  justify-content: flex-start;
  align-items: flex-start;
}

.time-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.time-val {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--fg);
  line-height: 1;
  text-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.time-label {
  font-size: 0.9rem;
  color: var(--dim);
  margin-top: 0.5rem;
  letter-spacing: 1px;
}

.time-sep {
  font-size: 2.5rem;
  color: var(--dim);
  line-height: 1;
  animation: blink 2s infinite;
  margin-top: -0.2rem;
}

/* Data Sections */
.data-section {
  margin-top: 4rem;
  text-align: left;
  position: relative;
  padding-top: 2rem;
}

/* Cyberpunk Separator */
.data-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.3;
  box-shadow: 0 0 5px var(--accent);
}

.glitch-subtitle {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--fg);
  text-transform: uppercase;
  cursor: default;
}

.glitch-subtitle:hover {
  color: var(--accent);
  text-shadow: 2px 0 var(--fg);
}

/* File List */
.file-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.file-list li {
  margin-bottom: 1rem;
}

.file-link {
  color: var(--muted); /* Was --dim, but let's use a lighter gray if available or define it */
  text-decoration: none;
  font-size: 1.2rem;
  transition: all 0.3s;
  display: inline-block;
}

.file-link:hover {
  color: var(--accent);
  transform: translateX(10px);
  text-shadow: 0 0 8px var(--accent);
}

/* Uplink Box */
.uplink-box {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.uplink-btn {
  display: inline-block;
  background: var(--accent);
  color: #000;
  padding: 1rem 2rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s;
  box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
  border: none; /* Fix for button element */
  cursor: pointer; /* Fix for button element */
  font-family: var(--font-mono); /* Fix for button element */
}

.uplink-btn:hover {
  background: #fff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

/* Fix for Chrome Autofill yellow background */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active{
    -webkit-box-shadow: 0 0 0 30px #000 inset !important;
    -webkit-text-fill-color: var(--fg) !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Input Group */
.input-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  width: 100%;
}

.terminal-input {
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--dim);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 1.2rem;
  padding: 0.5rem;
  width: 100%;
  max-width: 300px;
  outline: none;
  transition: all 0.3s;
  caret-color: var(--accent); /* Green caret when typing */
}

.terminal-input:focus {
  border-color: var(--accent);
  box-shadow: 0 5px 10px -5px rgba(0, 255, 65, 0.2);
}

.terminal-input::placeholder {
  color: var(--accent);
  opacity: 1;
  text-shadow: 0 0 5px var(--accent);
  animation: placeholder-blink 1.5s infinite step-end;
}

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

/* Log / Article Styles */
.log-content {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  text-align: left;
}

.log-header {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--dim);
  padding-bottom: 1rem;
}

.log-meta, .log-date {
  color: var(--dim);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.log-body {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--fg);
}

.log-body h2 {
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.5rem;
  text-transform: uppercase;
}

.log-body p {
  margin-bottom: 1.5rem;
}

.cyber-separator {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0.5;
  margin: 2rem 0;
  box-shadow: 0 0 5px var(--accent);
}

.code-block {
  background: rgba(0, 255, 65, 0.05);
  border-left: 3px solid var(--accent);
  padding: 1rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  color: var(--accent);
}

.log-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--dim);
  color: var(--dim);
  text-align: center;
  font-size: 0.9rem;
}

/* Mobile Controls */
.mobile-controls {
  display: none; /* Hidden on desktop */
  gap: 2rem;
  margin-top: 2rem;
  justify-content: flex-start;
}

@media (max-width: 768px) {
  .mobile-controls {
    display: flex;
  }
  
  .input-hint {
    display: none; /* Hide "PRESS Y/N" text on mobile since we have buttons */
  }
}
