/* ========================================================
   TeamGenerator.org - Clean Theme Stylesheet
   Designed under GeFeiSites Design Recipes (Fresh Direction)
   ======================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
  --bg: #f6f8fb;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-muted: #475569; /* Darkened for accessibility & high contrast */
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
  --accent: #0d9488;
  --accent-light: #f0fdfa;
  --danger: #ef4444;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--primary-hover);
}

img, svg {
  vertical-align: middle;
}

/* Container */
.container {
  width: 100%;
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

.container-sm {
  width: 100%;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

.brand-logo:hover {
  color: var(--text);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 700;
}

.brand-name {
  letter-spacing: -0.02em;
}

.brand-dot {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: var(--primary-light);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-share:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
}

/* Hero Section (Immediate Tool Access) */
.tool-hero {
  padding-top: 32px;
  padding-bottom: 24px;
  text-align: center;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid #bfdbfe;
  border-radius: 9999px;
  margin-bottom: 12px;
}

h1 {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 18px;
  color: #334155;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Main Tool Workspace */
.tool-workspace {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
  margin-top: 24px;
  margin-bottom: 48px;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Card Common */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

/* Inputs & Form Controls */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.label-counter {
  font-size: 12px;
  color: #334155;
  font-weight: 600;
}

textarea.form-textarea {
  width: 100%;
  height: 200px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  resize: vertical;
  outline: none;
  transition: border-color 0.15s ease;
}

textarea.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 16px;
}

.preset-chip {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a; /* High contrast */
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Control Controls */
.controls-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mode-toggle {
  display: flex;
  background: var(--bg);
  padding: 4px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.mode-btn {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.mode-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.stepper-box {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stepper-btn {
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s;
}

.stepper-btn:hover {
  background: var(--bg);
}

.stepper-input {
  width: 54px;
  height: 44px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  outline: none;
}

/* Primary CTA Button */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
  transition: background-color 0.15s ease, transform 0.05s ease;
  width: 100%;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

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

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 10px 18px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Results Display */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.results-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

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

.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.team-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease;
}

.team-card-header {
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.team-card-count {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a; /* High contrast on background */
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 9999px;
}

.team-card-members {
  list-style: none;
  padding: 8px 12px;
}

.member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  margin-bottom: 6px;
}

.member-item.locked {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
}

.lock-btn {
  background: none;
  border: none;
  color: #475569;
  cursor: pointer;
  padding: 2px;
  font-size: 14px;
}

.lock-btn:hover {
  color: var(--text);
}

.lock-btn.active {
  color: var(--accent);
}

/* Toast Message */
.toast-msg {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

/* Content & Article Section */
.content-section {
  padding-top: 48px;
  padding-bottom: 48px;
}

.editorial-article {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.editorial-article h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.editorial-article h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 12px;
}

.editorial-article p {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}

.editorial-article ul, .editorial-article ol {
  margin-left: 24px;
  margin-bottom: 20px;
  color: var(--text);
}

.editorial-article li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Data Comparison Table */
.table-wrapper {
  overflow-x: auto;
  margin-top: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

table.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

table.comparison-table th {
  background: var(--bg);
  padding: 12px 16px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

table.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

table.comparison-table tr:last-child td {
  border-bottom: none;
}

.highlight-row {
  background: var(--primary-light);
}

/* Steps Grid */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: relative;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}

.step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 14px;
  color: #334155;
  line-height: 1.6;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}

.faq-item {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 16px 20px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-question:hover {
  background: var(--bg);
}

.faq-icon {
  font-size: 18px;
  color: #475569;
  transition: transform 0.2s;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  display: none;
  padding: 0 20px 20px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

.faq-item.active .faq-answer {
  display: block;
}

/* Sports Roller / Team Picker Workspace */
.picker-container {
  max-width: 900px;
  margin: 0 auto;
}

.roller-box {
  background: #0f172a;
  color: #ffffff;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
}

.roller-display {
  min-height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.team-badge-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.roller-team-name {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.roller-team-meta {
  font-size: 14px;
  color: #cbd5e1;
}

.roller-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.filter-chips {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip.active, .filter-chip:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Draft Order Table */
.draft-table-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}

.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.draft-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.draft-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.draft-rank {
  width: 24px;
  height: 24px;
  background: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #334155;
}

/* Footer */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  margin-top: auto;
  padding-top: 48px;
  padding-bottom: 32px;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-heading {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 14px;
  color: #94a3b8;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid #1e293b;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748b;
  flex-wrap: wrap;
  gap: 12px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }

  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .mobile-menu {
    display: none;
    flex-direction: column;
    padding: 12px 0;
    border-top: 1px solid var(--border);
  }

  .mobile-menu.open {
    display: flex;
  }

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  h1 {
    font-size: 28px;
  }

  .roller-team-name {
    font-size: 22px;
  }
}
