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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Courier New', Courier, monospace;
  background:
    radial-gradient(circle at 20%, rgba(255, 247, 159, 0.24) 0 18%, transparent 18%),
    radial-gradient(circle at 80% 12%, rgba(140, 255, 245, 0.24) 0 16%, transparent 16%),
    radial-gradient(circle at 80% 80%, rgba(140, 155, 255, 0.24) 0 16%, transparent 16%),

    linear-gradient(180deg, #e8edf6 50%, #d5dceb 100%);
  color: #1a1a1a;
  line-height: 1.6;
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.chai-container {
  width: min(920px, 92vw);
  margin: 2.5rem auto;
  background: #f7f7f7;
  border-radius: 0;
  border: 2px solid #111;
  box-shadow: 10px 10px 0 #111;
  overflow: hidden;
}

.retro-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: linear-gradient(90deg, #dce4ff 0%, #c7d4ff 100%);
  border-bottom: 2px solid #111;
}

.retro-dots {
  display: flex;
  gap: 0.5rem;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #111;
  display: inline-block;
}

.dot-red {
  background: #f56a6a;
}

.dot-amber {
  background: #ffcf56;
}

.dot-green {
  background: #7de685;
}

.retro-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.retro-actions {
  justify-self: end;
  display: flex;
  gap: 0.35rem;
}

.retro-action {
  width: 22px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #111;
  background: #fff;
  font-size: 0.65rem;
  line-height: 1;
}

.chai-hero {
  padding: 4rem 2rem;
  text-align: center;
  background: linear-gradient(180deg, #fcfcfc 0%, #eceff5 100%);
  color: #111;
  border-bottom: 2px solid #111;
}

.chai-heading-main {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
  animation: slideInDown 0.8s ease-out;
  text-shadow: 2px 2px 0 #9fc6ff;
}

.chai-subtitle {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  opacity: 1;
  animation: slideInUp 0.8s ease-out 0.2s backwards;
}

.chai-intro {
  font-size: 1rem;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
  opacity: 1;
  animation: fadeIn 0.8s ease-out 0.4s backwards;
}

.chai-section {
  padding: 3rem 2rem;
  border-top: 2px solid #111;
  background: #f7f7f7;
}

.chai-section:first-of-type {
  border-top: none;
}

.chai-section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #111;
  border-left: 6px solid #6f8fe6;
  padding-left: 1rem;
}

.chai-section-description {
  font-size: 1rem;
  color: #2f2f2f;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.chai-demo-container {
  background: #ffffff;
  padding: 2rem;
  border-radius: 0;
  border: 2px solid #111;
}

#demoBox {
  margin-bottom: 2rem;
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-weight: 500;
}

.chai-demo-text {
  text-align: center;
  font-size: 1.1rem;
}

.chai-input-section {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chai-label {
  font-weight: 600;
  color: #111;
  font-size: 0.95rem;
}

.chai-input {
  padding: 0.75rem 1rem;
  border: 2px solid #111;
  border-radius: 0;
  font-size: 0.95rem;
  font-family: 'Courier New', monospace;
  transition: all 0.3s ease;
  background: #fbfbfb;
}

.chai-input:focus {
  outline: none;
  border-color: #3563d9;
  box-shadow: 3px 3px 0 #8fb2ff;
}

.chai-button {
  padding: 0.75rem 1.5rem;
  background: #4b73e8;
  color: #fff;
  border: 2px solid #111;
  border-radius: 0;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 3px 3px 0 #111;
}

.chai-button:hover {
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 #111;
}

.chai-button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #111;
}

.chai-info-box {
  background: #7e7ec9;
  padding: 1.5rem;
  border-radius: 0;
  border: 2px solid #111;
}

.chai-info-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #111;
}

.chai-preset-list {
  color: #111;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.chai-preset-list li {
  padding: 0.75rem 1rem;
  background: #6d8ae6;
  border-radius: 0;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: 2px solid #111;
}

.lie {
  color: #111;
}

.chai-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.chai-feature-card {
  border: 2px solid #111;
  transition: all 0.3s ease;
}

.chai-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 6px 6px 0 #111;
  border-color: #111;
}

.chai-feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #1b3eab;
}

.chai-feature-desc {
  font-size: 0.9rem;
  color: #2f2f2f;
}

.chai-utilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.chai-utility-group {
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 0;
  border: 2px solid #111;
}

.chai-utility-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1b3eab;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.chai-utility-group code {
  display: block;
  font-size: 0.85rem;
  color: #111;
  font-family: 'Courier New', monospace;
  background: #f4f7ff;
  padding: 0.75rem;
  border-radius: 0;
  border: 1px solid #111;
  overflow-x: auto;
  word-break: break-word;
}

.chai-footer {
  padding: 2rem;
  background: #e6ecff;
  text-align: center;
  border-top: 2px solid #111;
}

.chai-footer p {
  margin-bottom: 0.5rem;
  color: #111;
}

.chai-footer-sub {
  font-size: 0.9rem;
  color: #222;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem 2rem;
  }

  .chai-container {
    width: min(920px, 96vw);
    margin: 1rem auto;
    box-shadow: 6px 6px 0 #111;
  }

  .retro-titlebar {
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem;
    padding: 0.55rem 0.7rem;
  }

  .retro-title {
    font-size: 0.72rem;
    text-align: center;
  }

  .chai-heading-main {
    font-size: 2.5rem;
  }

  .chai-subtitle {
    font-size: 1.2rem;
  }

  .chai-section {
    padding: 2rem 1.5rem;
  }

  .chai-section-title {
    font-size: 1.5rem;
  }

  .chai-hero {
    padding: 2rem 1.5rem;
  }

  .chai-features-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: white;
  }

  .chai-container {
    box-shadow: none;
    border-radius: 0;
  }
}