:root {
  --bg: #2b2d55;
  --card: #383b77;
  --accent: #ff7bd5;
  --accent-2: #77f0ff;
  --accent-3: #ffd166;
  --text: #f7f4ff;
  --muted: #c9c7ff;
  --border: #6f6cc0;
  --shadow: 0 10px 30px rgba(14, 10, 40, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, #27264c, #302a67 40%, #2b2d55);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  border-bottom: 3px solid var(--border);
  background: rgba(25, 20, 55, 0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 2;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  font-weight: 800;
  font-size: 20px;
  color: var(--accent-2);
  text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.nav a {
  margin-left: 16px;
  font-weight: 600;
  color: var(--muted);
}

.nav a:hover {
  color: var(--accent-3);
}

.site-footer {
  margin-top: 60px;
  border-top: 3px solid var(--border);
  padding: 24px 0 40px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
  margin: 40px 0 30px;
}

.hero-text h1 {
  font-size: 44px;
  margin: 0 0 12px;
}

.hero-text p {
  color: var(--muted);
  font-size: 18px;
}

.hero-actions {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card {
  background: linear-gradient(135deg, #3c3b87, #4a3a88);
  border: 3px solid var(--border);
  border-radius: 18px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
}

.hero-badge {
  background: var(--accent);
  color: #2b1546;
  font-weight: 800;
  display: inline-block;
  padding: 6px 10px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.hero-sparkles {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, var(--accent-2), transparent 60%);
  opacity: 0.7;
}

.section {
  margin: 40px 0;
}

.section-title h2 {
  margin: 0;
  font-size: 28px;
}

.section-title p {
  margin: 6px 0 18px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.cards {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.bot-card {
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}

.bot-card:hover {
  transform: translateY(-4px);
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: #4b4f95;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 800;
  font-size: 22px;
  color: var(--accent-3);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar.xl {
  width: 120px;
  height: 120px;
  border-radius: 24px;
  font-size: 40px;
}

.card-body h3 {
  margin: 0 0 6px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.tag {
  background: #5a5fb4;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.markdown p {
  margin: 0 0 8px;
}

.markdown a {
  color: var(--accent-2);
}

.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.btn {
  border: 3px solid var(--border);
  background: transparent;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: var(--accent);
  color: #2b1546;
  border-color: #ffb7ea;
}

.btn-ghost {
  background: #42458d;
}

.btn-ghost.danger,
.btn-primary.danger {
  background: #ff6b6b;
  color: #2b1546;
}

.empty-card {
  background: #3a3d7b;
  border: 3px dashed var(--border);
  padding: 24px;
  border-radius: 16px;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.select, input, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 3px solid var(--border);
  background: #2d2f62;
  color: var(--text);
}

input[type="checkbox"] {
  width: auto;
}

.form {
  display: grid;
  gap: 12px;
}

.form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.inline-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-bottom: 8px;
}

.help {
  color: var(--muted);
  font-size: 14px;
}

.auth-card {
  background: var(--card);
  border: 3px solid var(--border);
  padding: 20px;
  border-radius: 16px;
  max-width: 420px;
}

.error {
  background: #5a2d4f;
  border: 2px solid #ff7bd5;
  padding: 10px;
  border-radius: 10px;
}

.table {
  margin-top: 20px;
  display: grid;
  gap: 8px;
}

.table-header,
.table-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 2fr;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.table-header {
  background: #46488f;
  font-weight: 800;
}

.table-row {
  background: #3a3d7b;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bot-header {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 18px;
  align-items: center;
  margin: 30px 0 10px;
}

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.prompt-card {
  background: #3c3f85;
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.prompt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo {
  background: #3a3d7b;
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.demo-log {
  display: grid;
  gap: 10px;
  min-height: 120px;
}

.bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 2px solid var(--border);
}

.bubble.bot {
  background: #4b4f95;
}

.bubble.user {
  background: #5a2d4f;
  margin-left: auto;
}

.bubble.pending {
  opacity: 0.7;
}

.demo-actions {
  margin: 12px 0;
  display: flex;
  gap: 8px;
}

.demo-choices {
  display: grid;
  gap: 8px;
}

.choice {
  background: #45488f;
  border: 2px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
}

.demo-end {
  margin-top: 12px;
  color: var(--muted);
}

.videos {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.video-card {
  background: #3c3f85;
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

.video-label {
  margin-bottom: 8px;
  font-weight: 700;
}

.video-embed {
  width: 100%;
  height: 240px;
  border-radius: 12px;
  border: 2px solid var(--border);
}

.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 20, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.age-card {
  background: #3a3d7b;
  border: 3px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  width: min(560px, 90vw);
  text-align: center;
  box-shadow: var(--shadow);
}

.age-badge {
  background: var(--accent-3);
  color: #2b1546;
  font-weight: 800;
  display: inline-block;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.age-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.age-locked .page {
  filter: blur(16px) saturate(0.4);
  pointer-events: none;
  user-select: none;
}

.age-locked .age-gate {
  display: flex;
}

.sr-only {
  position: absolute;
  left: -9999px;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .bot-header {
    grid-template-columns: 1fr;
  }
}