:root {
  --bg-color: #0a0e17;
  --text-color: #e0e6ed;
  --accent: #00f0ff;
  --accent-dim: rgba(0, 240, 255, 0.2);
  --purple: #b026ff;
  --border: #1f2937;
  --panel-bg: #111827;
  --font-mono: "Courier New", Courier, monospace;
  --font-sans: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Scanline Effect */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 50%,
    rgba(0,0,0,0.1) 50%,
    rgba(0,0,0,0.1)
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 50;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 23, 0.9);
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(4px);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.brand {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 2px;
  color: var(--text-color);
}

.brand span {
  color: var(--accent);
}

.main-nav {
  display: flex;
  gap: 2rem;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: color 0.2s, text-shadow 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent-dim);
}

.sys-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--purple);
  border: 1px solid var(--purple);
  padding: 0.2rem 0.6rem;
}

/* Main & Hero */
main {
  flex: 1;
  padding: 4rem 0;
}

.hero {
  margin-bottom: 4rem;
}

.hero-tag {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.glitch-text {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.lead {
  font-size: 1.1rem;
  color: #9ca3af;
  max-width: 60ch;
  margin-bottom: 3rem;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.status-item {
  background: var(--bg-color);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.status-item .label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: #6b7280;
}

.status-item .value {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  color: var(--text-color);
}

.status-item .value.active {
  color: var(--accent);
  text-shadow: 0 0 5px var(--accent-dim);
}

/* Modules */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.module {
  border: 1px solid var(--border);
  padding: 2rem;
  background: var(--panel-bg);
  position: relative;
}

.module::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--accent);
}

.module h2 {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.module p {
  font-size: 0.9rem;
  color: #9ca3af;
  margin-bottom: 1.5rem;
}

.bar {
  height: 6px;
  background: #1f2937;
  width: 100%;
  overflow: hidden;
}

.fill {
  height: 100%;
  background: var(--accent);
  width: var(--p);
}

/* Page Header */
.page-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 2rem;
}

.page-header h1 {
  font-family: var(--font-mono);
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #9ca3af;
}

/* Terminal Window */
.terminal-window {
  border: 1px solid var(--border);
  background: #000;
  margin-bottom: 3rem;
}

.term-head {
  background: var(--panel-bg);
  padding: 0.5rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-bottom: 1px solid var(--border);
  color: #9ca3af;
}

.term-body {
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.term-body p {
  margin-bottom: 0.5rem;
}

.ok { color: #10b981; }
.warn { color: #f59e0b; }
.err { color: #ef4444; }

/* Data Table */
.data-table {
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.data-table .row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.data-table .row:last-child {
  border-bottom: none;
}

.data-table .col {
  padding: 1rem;
}

.data-table .row.head {
  background: var(--panel-bg);
  color: #6b7280;
  font-size: 0.8rem;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 8px;
}

.dot.ok { background: #10b981; box-shadow: 0 0 5px #10b981; }
.dot.off { background: #6b7280; }

/* Logs List */
.log-list {
  list-style: none;
}

.log-list li {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  font-family: var(--font-mono);
}

.log-time {
  min-width: 200px;
  color: var(--accent);
  font-size: 0.85rem;
}

.log-text {
  color: #9ca3af;
  font-size: 0.9rem;
}

/* Error Page */
.error-page {
  text-align: center;
  padding: 5rem 0;
}

.error-code {
  font-family: var(--font-mono);
  font-size: 8rem;
  font-weight: bold;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1rem;
  text-shadow: 0 0 20px var(--accent-dim);
}

.error-page h1 {
  font-family: var(--font-mono);
  margin-bottom: 1rem;
}

.error-page p {
  color: #9ca3af;
  margin-bottom: 3rem;
}

.error-page .terminal-window {
  text-align: left;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

.btn {
  display: inline-block;
  font-family: var(--font-mono);
  text-decoration: none;
  color: var(--bg-color);
  background: var(--accent);
  padding: 1rem 2rem;
  font-weight: bold;
  transition: background 0.2s;
}

.btn:hover {
  background: #fff;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.muted {
  color: #4b5563;
}

@media (max-width: 768px) {
  .site-header .container {
    flex-direction: column;
    height: auto;
    padding: 1rem 2rem;
    gap: 1rem;
  }
  
  .log-list li {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .data-table .row {
    grid-template-columns: 1fr;
    padding: 1rem 0;
  }
  
  .data-table .col {
    padding: 0.25rem 1rem;
  }
  
  .site-footer .container {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}