/* =========================================================
   CORE VARIABLES
   ========================================================= */
:root {
  --black: #000;
  --off-white: #e0e0e0;
  --white: #fff;
  --bg: #0b1220;
  --text: #e8ecf3;
  --brand: #e7b44b;
  --green: #00ff7f;
  --green-dark: #003d18;
  --green-border: #004d1a;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
html { background: var(--bg); scroll-padding-top: 55px; }
body {
  font-family: 'Lato', sans-serif;
  color: var(--text);
  line-height: 1.4;
  min-height: 100dvh;
  padding-top: 55px;
  position: relative;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(1000px 700px at 80% -10%, rgba(231,180,75,.15), transparent 60%),
    radial-gradient(700px 600px at -10% 10%, rgba(92,200,255,.12), transparent 60%),
    var(--bg);
}

/* =========================================================
   HERO HEADER
   ========================================================= */
.terminal-hero {
  text-align: center;
  padding: 80px 20px 60px;
  color: var(--green);
  text-shadow: 0 0 8px var(--green);
}
.terminal-hero h1 {
  font-family: 'Share Tech Mono', monospace;
  margin-bottom: 10px;
}
.terminal-hero .lead {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.05rem;
  color: var(--off-white);
}

/* =========================================================
   CHAT LAYOUT — ChatGPT-style
   ========================================================= */
.chat-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 12px 40px;
  min-height: calc(100dvh - 55px);
  background: radial-gradient(circle at center, #001909 0%, #000 100%);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 auto;
  width: 100%;
  max-width: 840px;
  background: #010f05;
  border: 1px solid var(--green-border);
  border-radius: var(--radius);
  box-shadow: 0 0 25px rgba(0,255,100,0.1);
  overflow: hidden;
}

/* --- Header --- */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #00290f;
  border-bottom: 1px solid var(--green-border);
  color: var(--green);
  text-shadow: 0 0 6px var(--green);
  font-family: 'Share Tech Mono', monospace;
}

/* --- Messages --- */
.chat-messages {
  flex: 1;
  padding: 14px 18px;
  overflow-y: auto;
  color: var(--green);
  font-family: 'Share Tech Mono', monospace;
  line-height: 1.45;
  scroll-behavior: smooth;
}
.message { margin-bottom: 10px; }
.message.user {
  color: #39ff14;
  font-weight: 500;
  text-shadow: 0 0 6px #39ff14;
}
.message.assistant { color: var(--green); }
.message.assistant strong { color: #33ff99; }
.message.assistant em { color: #66ffaa; }

/* --- Input --- */
.chat-input {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #001909;
  border-top: 1px solid var(--green-border);
  border-radius: 8px;
  box-sizing: border-box;
}

/* The textarea is what triggers zooming, so we fix font-size here */
.chat-input textarea {
  flex: 1;
  resize: none;
  max-height: 150px;
  background: #000;
  color: var(--green);
  border: 1px solid var(--green-border);
  border-radius: 6px;
  padding: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 16px;          /* 👈 prevents mobile zoom */
  line-height: 1.4;
  outline: none;
}

.chat-input textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 8px #00ff7f33;
}

.chat-input button {
  background: var(--green-dark);
  color: var(--green);
  border: 1px solid var(--green);
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: bold;
  cursor: pointer;
}
.chat-input button:hover {
  background: var(--green);
  color: #000;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  background: var(--black);
  color: var(--off-white);
  text-align: center;
  padding: 25px 40px;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
footer a {
  color: var(--brand);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
footer a:hover {
  color: #ffd98a;
  text-shadow: 0 0 5px rgba(231,180,75,0.4);
}

/* =========================================================
   MODAL — 1XLR8 Guide
   ========================================================= */
.btn-guide {
  background: transparent;
  color: var(--green);
  padding: 6px 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .25s ease;
}
.btn-guide:hover {
  background: var(--green);
  color: #000;
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(3px);
}
.modal-content {
  background: #001808;
  margin: 8% auto;
  padding: 30px 40px;
  border: 1px solid #00ff7f55;
  border-radius: var(--radius);
  width: 90%;
  max-width: 720px;
  color: var(--green);
  box-shadow: 0 0 20px rgba(0,255,127,0.2);
  font-family: 'Share Tech Mono', monospace;
}
.modal-content h2 {
  margin-top: 0;
  color: var(--green);
  text-shadow: 0 0 8px var(--green);
}
.modal-content ul { list-style-type: square; margin-left: 20px; }
.close-btn {
  float: right;
  font-size: 1.5rem;
  color: var(--green);
  cursor: pointer;
}
.close-btn:hover { color: #33ff99; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .terminal-hero {
    padding: 70px 24px 50px;
    font-size: 1rem;
  }
  .chat-input {
    flex-direction: column;
  }
  .chat-input textarea,
  .chat-input button {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .terminal-hero { padding: 60px 16px 40px; font-size: 0.9rem; }
  .chat-messages { font-size: 14px; padding: 10px; }
  .chat-panel { border-radius: 0; }
  footer { font-size: 0.75rem; padding: 20px; }
  .modal-content { padding: 22px 18px; width: 94%; }
}
@media (max-width: 400px) {
  .chat-messages { font-size: 13px; }
  footer { font-size: 0.7rem; padding: 16px; }
}

/* =========================================================
   MOBILE SCALING + HEADER REFINEMENT
   ========================================================= */
.terminal-hero {
  text-align: center;
  padding: 50px 20px 30px; /* reduced top/bottom space */
  color: #00ff7f;
  text-shadow: 0 0 6px #00ff7f;
  margin-top: 0;
}


/* Headings — tighten font size across breakpoints */
.terminal-hero h1 {
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.6rem;
  margin: 0 0 10px;
  letter-spacing: 0.6px;
}
.chat-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

/* Smaller tagline text */

.terminal-hero .lead {
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 620px;
  margin: 0 auto;
  color: #d8fcd8;
}


/* Compact guide button */
.btn-guide {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.85rem;
}

/* Only show the 💡 icon on phones */
@media (max-width: 768px) {
  .terminal-hero h1 { font-size: 1.4rem; }
  .terminal-hero .lead { font-size: 0.85rem; }
  .chat-header h2 { font-size: 0.95rem; }
  .btn-guide {
    width: 34px;
    height: 34px;
    font-size: 1.1rem;
    padding: 0;
    border-radius: 50%;
  }
  .btn-guide::after { content: ''; } /* hide text */
}

@media (max-width: 600px) {
  .terminal-hero {
    padding: 36px 14px 20px;
  }
  .terminal-hero h1 {
    font-size: 1.2rem;
    margin-bottom: 6px;
  }
  .terminal-hero .lead {
    font-size: 0.82rem;
    line-height: 1.4;
  }
}

/* Extra-small phones */
@media (max-width: 420px) {
  .terminal-hero h1 { font-size: 1.25rem; }
  .chat-header h2 { font-size: 0.9rem; }
  .terminal-hero .lead { font-size: 0.8rem; }
}

.btn-guide {
  background: transparent;
  border: none;              /* remove outer border */
  color: #00ff7f;
  font-size: 1.3rem;
  cursor: pointer;
  text-shadow: 0 0 6px #00ff7f;
  transition: color .2s, text-shadow .2s;
}

.btn-guide:hover {
  color: #00ffaa;
  text-shadow: 0 0 8px #00ffaa;
}


textarea::placeholder,
input::placeholder {
  font-size: 0.8rem;
  color: #00ff7f88;  /* soft neon green with 50% opacity */
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 0.5px;
}

.modal-content {
  font-size: 0.9rem;         /* was ~1rem or larger */
  line-height: 1.45;
}

.modal-content h2 {
  font-size: 1.1rem;         /* smaller heading */
}

.modal-content ul {
  font-size: 0.88rem;
  line-height: 1.4;
}

.modal-content .note {
  font-size: 0.8rem;
  opacity: 0.85;
}