/* Magic 8 Ball Question Generator — styles */

:root {
  --bg: #f4f6fb;
  --ink: #1b2340;
  --muted: #5a6480;
  --card: #ffffff;
  --accent: #2743c7;
  --accent-dark: #1c33a0;
  --accent-soft: #e4e9ff;
  --header-bg: #141a33;
  --border: #dfe4f2;
  --success: #1e7e34;
  --error: #b3261e;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

/* Header */

.site-header {
  background: var(--header-bg);
  color: #fff;
  padding: 2rem 1rem;
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.eight-ball {
  flex: 0 0 auto;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #4a5578 0%, #141a33 55%, #05070f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.eight-ball span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-header h1 {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.25;
}

.tagline {
  margin: 0.35rem 0 0;
  color: #c3cbe8;
  font-size: 1.05rem;
}

/* Layout */

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
}

h2 {
  margin-top: 0;
  font-size: 1.45rem;
}

.disclaimer {
  font-size: 0.95rem;
  color: var(--muted);
  border-left: 4px solid var(--accent);
  padding-left: 0.9rem;
}

/* Generator */

.category-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.cat-btn {
  border: 2px solid var(--border);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.cat-btn:hover {
  border-color: var(--accent);
}

.cat-btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.cat-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.question-card {
  background: var(--header-bg);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  margin-bottom: 1.25rem;
  min-height: 9rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.question-text {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
}

.question-meta {
  color: #aeb8dd;
  font-size: 0.9rem;
  text-align: center;
  margin: 0.75rem 0 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.generator-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: background 0.15s, transform 0.05s;
}

.btn:active { transform: translateY(1px); }

.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.btn-secondary:hover { background: #d3dbff; }

.copy-feedback {
  min-height: 1.5rem;
  margin: 0.6rem 0 0;
  font-weight: 600;
}

.copy-feedback.ok { color: var(--success); }
.copy-feedback.err { color: var(--error); }

/* CTA */

.cta {
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, #16246b 100%);
  color: #fff;
  border: none;
}

.cta h2 { color: #fff; }

.cta p { color: #dbe2ff; }

.btn-cta {
  background: #fff;
  color: var(--accent-dark);
  margin-top: 0.5rem;
}

.btn-cta:hover { background: var(--accent-soft); }

/* Library */

.library-intro { color: var(--muted); }

.library-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.library-nav a {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.library-nav a:hover { background: #d3dbff; }

.library-category { margin-bottom: 2rem; }

.library-category:last-child { margin-bottom: 0; }

.library-category h3 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-soft);
}

.library-category ul {
  margin: 0;
  padding-left: 1.25rem;
  columns: 1;
}

.library-category li { margin-bottom: 0.35rem; }

@media (min-width: 640px) {
  .library-category ul { columns: 2; column-gap: 2.5rem; }
}

/* Footer */

.site-footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* Small screens */

@media (max-width: 520px) {
  .site-header h1 { font-size: 1.45rem; }
  .eight-ball { width: 64px; height: 64px; }
  .eight-ball span { width: 32px; height: 32px; font-size: 1.15rem; }
  section { padding: 1.25rem; }
  .question-text { font-size: 1.15rem; }
  .generator-actions .btn { flex: 1 1 100%; }
}
