/* ===== BASE ===== */
:root {
  --alt-bg: #020617;
  --alt-bg-soft: #020418;
  --alt-accent: #4ade80;
  --alt-accent-soft: rgba(74, 222, 128, 0.18);
  --alt-text-main: #e5e7eb;
  --alt-text-muted: #64748b;
  --alt-danger: #f97373;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.page-home-alt {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #02081c, #00010a);
  color: var(--alt-text-main);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  position: relative;
  overflow-x: hidden;
}

/* CRT scanline overlay */
.crt-overlay {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 3px
    );
  mix-blend-mode: soft-light;
  opacity: 0.4;
  z-index: 2;
  animation: crt-flicker 4s infinite ease-in-out alternate;
}

@keyframes crt-flicker {
  0% { opacity: 0.35; }
  35% { opacity: 0.45; }
  60% { opacity: 0.4; }
  100% { opacity: 0.5; }
}

/* ===== LAYOUT ===== */
.alt-header {
  position: relative;
  z-index: 3;
  padding: 1rem 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.8),
    rgba(15, 23, 42, 0.6)
  );
  backdrop-filter: blur(12px);
}

.alt-logo {
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 1),
    0 0 18px rgba(56, 189, 248, 0.15);
}

.alt-nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.alt-nav a {
  color: var(--alt-text-muted);
  position: relative;
}

.alt-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 0;
  height: 1px;
  background: var(--alt-accent);
  transition: width 0.15s ease;
}

.alt-nav a:hover {
  color: var(--alt-text-main);
}

.alt-nav a:hover::after {
  width: 100%;
}

.alt-main {
  position: relative;
  z-index: 3;
  padding: 2.5rem 7vw 3rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr);
  gap: 2.5rem;
  align-items: flex-start;
}

/* ===== INTRO PANEL ===== */
.alt-intro {
  max-width: 520px;
}

.intro-title {
  margin: 0 0 1rem;
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--alt-accent);
}

.intro-sub {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  color: var(--alt-text-main);
}

.intro-blink {
  border-bottom: 1px dashed rgba(148, 163, 184, 0.8);
  padding-bottom: 0.05rem;
}

.intro-list {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--alt-text-muted);
}

.intro-list li + li {
  margin-top: 0.6rem;
}

.intro-list span {
  color: var(--alt-text-main);
}

/* ===== AI CONSOLE ===== */
.ai-console {
  justify-self: stretch;
}

.ai-frame {
  position: relative;
  border-radius: 1.4rem;
  border: 1px solid rgba(15, 23, 42, 1);
  background:
    radial-gradient(circle at top left, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(circle at bottom right, rgba(74, 222, 128, 0.22), transparent 55%),
    linear-gradient(135deg, #020617, #02031a);
  box-shadow:
    0 28px 80px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  padding: 1rem 1.1rem 0.9rem;
  overflow: hidden;
}

/* Subtle inner glass border */
.ai-frame::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(148, 163, 184, 0.35);
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Header strip */
.ai-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border-radius: 0.9rem;
  background: linear-gradient(
    135deg,
    rgba(15, 23, 42, 0.95),
    rgba(15, 23, 42, 0.8)
  );
  border: 1px solid rgba(15, 23, 42, 1);
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.ai-status {
  font-size: 0.55rem;
  color: var(--alt-text-muted);
}

.status-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--alt-accent);
  box-shadow: 0 0 10px var(--alt-accent), 0 0 18px var(--alt-accent-soft);
  margin-left: 0.2rem;
  animation: status-pulse 1.4s infinite ease-in-out;
}

@keyframes status-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Log window */
.ai-log {
  position: relative;
  margin-top: 0.8rem;
  padding: 0.7rem 0.7rem 0.8rem;
  height: 260px;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top, #020617, #02010d);
  border: 1px solid rgba(15, 23, 42, 0.9);
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 0.62rem;
  line-height: 1.7;
  color: var(--alt-text-main);
  overflow-y: auto;
}

.ai-log::-webkit-scrollbar {
  width: 6px;
}
.ai-log::-webkit-scrollbar-track {
  background: transparent;
}
.ai-log::-webkit-scrollbar-thumb {
  background: rgba(30, 64, 175, 0.7);
  border-radius: 999px;
}

/* Lines */
.ai-line {
  margin-bottom: 0.4rem;
}

.ai-line-system {
  color: var(--alt-text-muted);
}

.ai-line-user {
  color: #93c5fd;
}

.ai-line-oracle {
  color: #bbf7d0;
}

/* AI name highlight */
.ai-name {
  color: var(--alt-accent);
}

/* Prompt form */
.ai-form {
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 0.7rem;
}

.prompt-prefix {
  color: var(--alt-accent);
}

.ai-input {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(30, 64, 175, 0.8);
  background: rgba(15, 23, 42, 0.9);
  color: var(--alt-text-main);
  font-family: inherit;
  font-size: 0.65rem;
  outline: none;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.8);
}

.ai-input::placeholder {
  color: rgba(148, 163, 184, 0.75);
}

/* Glassy send button */
.ai-send-btn {
  position: relative;
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(15, 23, 42, 0.95)),
    radial-gradient(circle at top, rgba(56, 189, 248, 0.35), rgba(15, 23, 42, 1));
  color: var(--alt-text-main);
  font-family: "Press Start 2P", system-ui, sans-serif;
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  overflow: hidden;
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.9),
    0 0 18px rgba(56, 189, 248, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition:
    transform 0.12s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.ai-send-btn::before {
  content: "";
  position: absolute;
  inset: -100%;
  background: linear-gradient(
    120deg,
    transparent 10%,
    rgba(255, 255, 255, 0.8) 50%,
    transparent 90%
  );
  opacity: 0;
  transform: translateX(-100%);
  mix-blend-mode: screen;
  transition: opacity 0.3s ease, transform 0.7s ease;
}

.ai-send-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: var(--alt-accent);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.95),
    0 0 26px rgba(56, 189, 248, 0.6);
}

.ai-send-btn:hover::before {
  opacity: 0.9;
  transform: translateX(0);
}

.ai-send-btn:active {
  transform: translateY(0) scale(0.96);
}

/* ===== FOOTER ===== */
.alt-footer {
  position: relative;
  z-index: 3;
  padding: 1.5rem 7vw 2rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--alt-text-muted);
}

/* Slot under the warning */
.ai-footer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--alt-muted, #9ca3af);
}

.ai-warning {
  margin: 0;
}

/* Glassy Go Deeper button */
.go-deeper-btn {
  margin-top: 0.65rem;
  padding: 0.45rem 1.4rem;
  border-radius: 999px;
  border: 1px solid rgba(248, 250, 252, 0.25);
  background:
    radial-gradient(circle at 0% 0%, rgba(248, 250, 252, 0.12), transparent 55%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.75));
  color: #e5e7eb;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.3),
    0 10px 30px rgba(15, 23, 42, 0.9),
    0 0 20px rgba(56, 189, 248, 0.18);
  backdrop-filter: blur(10px);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background 0.15s ease;
}

.go-deeper-btn::after {
  content: "›";
  font-size: 0.9rem;
}

.go-deeper-btn:hover {
  transform: translateY(-1px) scale(1.02);
  border-color: rgba(56, 189, 248, 0.9);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.8),
    0 14px 40px rgba(15, 23, 42, 1),
    0 0 28px rgba(56, 189, 248, 0.4);
}

/* Offline input look */
.ai-form-offline #ai-input {
  background: #020617;
  border-color: #4b5563;
  color: #6b7280;
  box-shadow: none;
  cursor: not-allowed;
}

.ai-form-offline #ai-input::placeholder {
  color: #4b5563;
}

.ai-form-offline button[type="submit"] {
  opacity: 0.35;
  cursor: default;
  box-shadow: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .alt-main {
    grid-template-columns: 1fr;
  }

  .ai-log {
    height: 220px;
  }
}

@media (max-width: 640px) {
  .alt-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .alt-main {
    padding-inline: 5vw;
  }
}