/* ================= CYBERIA - Serial Experiments Lain theme ================= */

:root {
  --bg: #0a0410;
  --bg-overlay: rgba(10, 4, 16, 0.87);
  --panel-bg: rgba(20, 9, 32, 0.82);
  --purple: #b26bff;
  --purple-bright: #e3c4ff;
  --purple-dim: #7b2fbf;
  --text: #d8c7e8;
  --muted: #8a75a3;
  --border: #6a2bab;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--bg-overlay), var(--bg-overlay)),
    url("cyberia_background.webp");
  background-size: auto, cover;
  background-position: center, center;
  background-attachment: scroll, fixed;
  color: var(--text);
  font-family: "VT323", "Courier New", monospace;
  font-size: 22px;
  line-height: 1.5;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* CRT scanlines overlay */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 0, 0, 0.25) 3px
  );
  animation: flicker 6s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.55; }
  94% { opacity: 1; }
  97% { opacity: 0.75; }
  98% { opacity: 1; }
}

.terminal {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

/* ---------------- hero ---------------- */

.hero {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.logo-img {
  width: min(200px, 55vw);
  height: auto;
  animation: logo-pulse 4s ease-in-out infinite;
}

.site-title {
  color: var(--purple-bright);
  text-shadow: 0 0 8px var(--purple);
  font-size: clamp(1.4rem, 4vw, 2rem);
  letter-spacing: 3px;
  font-weight: normal;
}

@keyframes logo-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(178, 107, 255, 0.35)); }
  50% { filter: drop-shadow(0 0 22px rgba(178, 107, 255, 0.75)); }
}

.ascii-logo {
  color: var(--purple);
  text-shadow: 0 0 6px var(--purple), 0 0 18px rgba(178, 107, 255, 0.5);
  font-size: clamp(8px, 1.6vw, 14px);
  line-height: 1.15;
  user-select: none;
}

.typewriter-wrap {
  color: var(--purple-bright);
  text-shadow: 0 0 6px var(--purple-bright);
  font-size: 1.3rem;
}

.prompt {
  color: var(--purple);
  text-shadow: 0 0 6px var(--purple);
}

.cursor {
  color: var(--purple);
  animation: blink 1s step-end infinite;
}

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

/* ---------------- invite button ---------------- */

.invite-btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border: 2px solid var(--purple);
  background: rgba(178, 107, 255, 0.08);
  color: var(--purple);
  text-decoration: none;
  text-shadow: 0 0 6px var(--purple);
  letter-spacing: 2px;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.invite-btn:hover,
.invite-btn:focus {
  background: var(--purple);
  color: var(--bg);
  text-shadow: none;
  box-shadow: 0 0 22px rgba(178, 107, 255, 0.7);
}

.invite-note {
  color: var(--muted);
  font-size: 0.9rem;
}

/* ---------------- panels ---------------- */

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  box-shadow: 0 0 14px rgba(123, 47, 191, 0.3);
}

.panel-title {
  color: var(--purple-bright);
  text-shadow: 0 0 6px var(--purple);
  margin-bottom: 0.75rem;
  letter-spacing: 2px;
}

.panel p {
  margin-bottom: 0.5rem;
}

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

.feature-list {
  list-style: none;
}

.feature-list li {
  margin-bottom: 0.35rem;
}

.feature-list li::before {
  content: "* ";
  color: var(--purple);
}

.rules-list {
  list-style: none;
  counter-reset: rule;
  padding-left: 0;
}

.rules-list li {
  counter-increment: rule;
  position: relative;
  padding-left: 4.5rem;
  margin-bottom: 0.75rem;
  min-height: 1.5rem;
}

.rules-list li::before {
  content: counter(rule, decimal-leading-zero) " // ";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--purple);
  text-shadow: 0 0 6px var(--purple);
}

.disclaimer {
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px dashed var(--border);
  margin-top: 1rem;
  padding-top: 0.75rem;
}

/* ---------------- footer ---------------- */

.footer {
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

.footer-img {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  margin: 0 auto 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 0 14px rgba(123, 47, 191, 0.3);
}

.footer p {
  margin-bottom: 0.25rem;
}

.retro {
  font-size: 0.85rem;
}

@media (max-width: 600px) {
  body {
    font-size: 19px;
  }
  .ascii-logo {
    font-size: clamp(5px, 2.4vw, 9px);
  }
}
