/* ── Variables ─────────────────────────────────────────────── */
:root {
  --green:   #00ff88;
  --green2:  #00cc66;
  --cyan:    #00ffff;
  --red:     #ff3333;
  --yellow:  #ffcc00;
  --bg:      #0a0a0a;
  --bg2:     #0f0f0f;
  --bg3:     #141414;
  --border:  #1a3a2a;
  --text:    #c0ffc0;
  --dim:     #2a4a2a;
  --font:    'Courier New', Courier, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── CRT Scanlines overlay ─────────────────────────────────── */
.scanlines {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0,0,0,.18) 2px,
    rgba(0,0,0,.18) 4px
  );
}

/* ── Noise overlay ─────────────────────────────────────────── */
.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  animation: noise-shift 0.4s steps(1) infinite;
}

@keyframes noise-shift {
  0%   { background-position:   0   0; }
  25%  { background-position: -20px -20px; }
  50%  { background-position:  10px  15px; }
  75%  { background-position: -15px  10px; }
  100% { background-position:   0   0; }
}

/* ── Matrix canvas ─────────────────────────────────────────── */
#matrix-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: .12;
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
  position: relative;
  z-index: 10;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.logo-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ascii-logo {
  color: var(--green);
  font-size: clamp(5px, 1.5vw, 13px);
  line-height: 1.2;
  text-shadow: 0 0 8px var(--green), 0 0 20px var(--green2);
  letter-spacing: 0;
  white-space: pre;
  animation: flicker 8s infinite;
  user-select: none;
}

.logo-sub {
  color: var(--cyan);
  font-size: clamp(18px, 5vw, 40px);
  font-weight: bold;
  letter-spacing: 0.5em;
  text-shadow: 0 0 10px var(--cyan), 0 0 30px rgba(0,255,255,.4);
  margin-top: -4px;
}

.tagline {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: .15em;
  color: #3a7a4a;
}

@keyframes flicker {
  0%, 95%, 100% { opacity: 1; }
  96%            { opacity: .6; }
  97%            { opacity: 1; }
  98%            { opacity: .4; }
  99%            { opacity: 1; }
}

/* ── Cursor ────────────────────────────────────────────────── */
.cursor {
  animation: blink 1s step-end infinite;
  color: var(--cyan);
}

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

/* ── Terminal box ──────────────────────────────────────────── */
.terminal-box {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(0,255,136,.08), 0 0 1px var(--green);
  background: var(--bg2);
}

.terminal-bar {
  background: #1a1a1a;
  padding: 8px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red    { background: #ff5f57; box-shadow: 0 0 4px #ff5f57; }
.dot.yellow { background: #ffbd2e; box-shadow: 0 0 4px #ffbd2e; }
.dot.green  { background: #28c840; box-shadow: 0 0 4px #28c840; }

.terminal-title {
  margin-left: 8px;
  font-size: 12px;
  color: #555;
  letter-spacing: .1em;
}

.terminal-body {
  padding: 20px 24px;
  height: 210px;
  font-size: 14px;
  line-height: 1.7;
  overflow: hidden;
}

.prompt { color: var(--green); }
.at     { color: #555; }
.path   { color: var(--cyan); }
.dollar { color: #555; margin: 0 6px; }
.cmd    { color: var(--text); }

.cursor-inline {
  color: var(--green);
  animation: blink 0.8s step-end infinite;
  font-size: 14px;
}

.output {
  margin-top: 10px;
  color: #5a9a6a;
  font-size: 13px;
  line-height: 1.8;
}

.output .ok   { color: var(--green); }
.output .warn { color: var(--yellow); }
.output .err  { color: var(--red); }

/* ── Server grid ───────────────────────────────────────────── */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.server-card {
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg3);
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}

.server-card:hover {
  border-color: var(--green2);
  box-shadow: 0 0 16px rgba(0,255,136,.12);
}

.card-header {
  background: #111;
  padding: 10px 16px;
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--cyan);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 4px var(--green); }
  50%       { box-shadow: 0 0 10px var(--green), 0 0 20px var(--green2); }
}

.card-body { padding: 14px 16px; }

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  border-bottom: 1px solid #151515;
  font-size: 12px;
}
.stat-row:last-child { border-bottom: none; }

.stat-label  { color: #4a7a5a; letter-spacing: .1em; }
.stat-value  { color: var(--text); font-weight: bold; }
.online-text { color: var(--green); text-shadow: 0 0 6px var(--green2); }

/* ── CTA / Status button ───────────────────────────────────── */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
}

.status-btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 48px;
  border: 2px solid var(--green);
  border-radius: 4px;
  color: var(--green);
  text-decoration: none;
  font-family: var(--font);
  font-size: 18px;
  font-weight: bold;
  letter-spacing: .25em;
  text-transform: uppercase;
  background: transparent;
  position: relative;
  overflow: hidden;
  transition: color .25s, box-shadow .25s;
  text-shadow: 0 0 8px var(--green2);
  box-shadow: 0 0 12px rgba(0,255,136,.15), inset 0 0 12px rgba(0,255,136,.03);
}

.status-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--green);
  transform: translateX(-101%);
  transition: transform .3s ease;
  z-index: 0;
}

.status-btn:hover::before { transform: translateX(0); }

.status-btn:hover {
  color: var(--bg);
  box-shadow: 0 0 30px rgba(0,255,136,.5), inset 0 0 20px rgba(0,255,136,.1);
  text-shadow: none;
}

.status-btn span { position: relative; z-index: 1; }

.btn-icon  { font-size: 20px; }
.btn-arrow { font-size: 20px; transition: transform .25s; }
.status-btn:hover .btn-arrow { transform: translateX(4px); }

.cta-hint {
  font-size: 11px;
  color: #2a5a3a;
  letter-spacing: .12em;
}

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  text-align: center;
  font-size: 11px;
  color: #2a4a2a;
  letter-spacing: .15em;
}

.footer-line {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--dim), transparent);
  margin-bottom: 16px;
}

.sep { color: #1a3a2a; margin: 0 4px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 500px) {
  .status-btn { padding: 14px 28px; font-size: 14px; letter-spacing: .15em; }
  .ascii-logo { font-size: 4px; }
}
