/* ChooseRandomName.com — Premium SaaS Design System */
:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --accent-blue: #3b82f6;
  --accent-violet: #8b5cf6;
  --accent-soft: #eef2ff;
  --danger: #ef4444;
  --success: #10b981;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 45px rgba(79, 70, 229, 0.14);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(circle at top right, #eef2ff 0%, #f8fafc 45%, #ffffff 100%);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; height: auto; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 68px;
}
.brand-link { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; flex-shrink: 0; }
.brand-text { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.025em; color: var(--text); white-space: nowrap; }
.brand-accent { background: linear-gradient(135deg, var(--primary), var(--accent-violet)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  cursor: pointer;
  color: var(--text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.16s ease;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-violet));
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35); }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { background: var(--surface-alt); border-color: #cbd5e1; }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-alt); color: var(--text); }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 6px 11px; font-size: 0.82rem; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; border-radius: var(--radius-md); }

/* Hero */
.hero-intro {
  text-align: center;
  padding: 28px 0 18px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-soft);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.hero-intro h1 {
  font-size: clamp(1.65rem, 3.2vw, 2.55rem);
  line-height: 1.18;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}
.hero-intro p {
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
  font-size: 1rem;
}

/* Main Wheel Application Grid */
.wheel-app {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: start;
  padding: 12px 0 42px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.wheel-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.wheel-canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 520px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#wheelCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}
.wheel-pointer {
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  height: 44px;
  z-index: 5;
  filter: drop-shadow(0 3px 6px rgba(15, 23, 42, 0.25));
  pointer-events: none;
}

.wheel-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}
.spin-btn-main { min-width: 180px; }
.shortcut-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Right Panel: Entries & Tabs */
.panel-tabs {
  display: flex;
  gap: 6px;
  background: var(--surface-alt);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.panel-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}
.panel-tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.entry-count-badge {
  background: var(--accent-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.quick-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.input, textarea, select {
  width: 100%;
  font-family: inherit;
  font-size: 0.94rem;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.14);
}

.entries-textarea {
  min-height: 240px;
  resize: vertical;
  line-height: 1.55;
  font-size: 0.93rem;
}

.entry-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.entry-list-items {
  max-height: 250px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
}
.entry-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-bottom: 1px solid var(--surface-alt);
}
.entry-item-row:last-child { border-bottom: none; }
.entry-item-row input {
  flex: 1;
  border: 1px solid transparent;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
}
.entry-item-row input:focus { border-color: var(--primary); outline: none; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--surface-alt);
  font-size: 0.9rem;
}
.toggle-row:last-child { border-bottom: none; }

/* History & Saved Lists */
.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
}
.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 10px;
  border-bottom: 1px solid var(--surface-alt);
  font-size: 0.9rem;
}

/* Tool-specific helper bar (Number range / Team splitter) */
.tool-helper-bar {
  background: var(--accent-soft);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

/* Content Sections */
.section { padding: 48px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { text-align: center; max-width: 700px; margin: 0 auto 32px; }
.section-header h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); margin: 0 0 8px; letter-spacing: -0.02em; }
.section-header p { color: var(--text-muted); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }

.feature-card, .tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.tool-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.tool-card h3 { margin: 0 0 6px; font-size: 1.05rem; color: var(--text); }
.tool-card p { margin: 0; font-size: 0.88rem; color: var(--text-muted); }

/* FAQ Accordion */
.faq-list { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}
.faq-item summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-item p { margin: 10px 0 0; color: var(--text-muted); font-size: 0.94rem; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: modalPop 0.2s ease-out;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
.winner-name-display {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  font-weight: 800;
  text-align: center;
  padding: 18px;
  margin: 12px 0 18px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  color: var(--primary);
  word-break: break-word;
}
.theme-swatches { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
.theme-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
}
.theme-btn.active { border-color: var(--primary); background: var(--accent-soft); }
.swatch-dots { display: flex; gap: 3px; }
.swatch-dots span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Confetti Canvas */
#confettiCanvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 120;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: #0f172a;
  color: #ffffff;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  z-index: 150;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s ease;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
}
.site-footer h4 { color: #ffffff; margin: 0 0 12px; font-size: 0.95rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: 0.88rem; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #ffffff; }
.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: #94a3b8;
}

/* Prose pages */
.prose-card { max-width: 860px; margin: 28px auto; }
.prose-card h1 { margin-top: 0; }

/* Responsive */
@media (max-width: 960px) {
  .wheel-app { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
    align-items: flex-start;
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: inline-flex; }
}
@media (max-width: 600px) {
  .grid-3, .grid-4, .footer-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .header-actions .btn-customize-label { display: none; }
}
