:root {
  --df-ink: #0f172a;
  --df-muted: #475569;
  --df-line: rgba(15, 23, 42, 0.12);
  --df-panel: rgba(255, 255, 255, 0.96);
  --df-soft: #f8fafc;
  --df-accent: #4f46e5;
  --df-accent-dark: #3730a3;
  --df-coral: #ef4444;
  --df-gold: #f59e0b;
  --df-emerald: #10b981;
  --df-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.draft-generator-page {
  color: var(--df-ink);
}

.draft-generator-page .site-logo-mark {
  display: inline-block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  background: url('/favicon.svg') center / contain no-repeat;
  filter: drop-shadow(0 6px 14px rgba(79, 70, 229, 0.25));
}

.draft-generator-page .page-bg {
  background:
    radial-gradient(circle at 10% 10%, rgba(79, 70, 229, 0.12), transparent 30%),
    radial-gradient(circle at 90% 20%, rgba(239, 68, 68, 0.1), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(16, 185, 129, 0.08), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, #f1f5f9 50%, #fafafa 100%);
}

.df-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 72px;
}

.df-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 0 10px;
  color: var(--df-muted);
  font-size: 0.9rem;
}

.df-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.df-breadcrumb a:hover {
  color: var(--df-accent);
}

.df-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 28px;
  align-items: center;
  padding: 40px;
  margin: 10px 0 28px;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 255, 0.95)),
    var(--df-panel);
  box-shadow: var(--df-shadow);
  overflow: hidden;
  position: relative;
}

.df-hero::after {
  content: "DRAFT";
  position: absolute;
  right: 4%;
  bottom: -32px;
  font-size: clamp(6rem, 14vw, 11rem);
  line-height: 1;
  font-weight: 900;
  color: rgba(79, 70, 229, 0.04);
  pointer-events: none;
}

.df-kicker {
  margin: 0 0 10px;
  color: var(--df-accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.df-hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.df-hero .lead {
  max-width: 700px;
  margin: 18px 0 0;
  color: var(--df-muted);
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.68;
}

.df-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.df-chip {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(79, 70, 229, 0.08);
  color: var(--df-accent);
}

.df-hero-side {
  border-left: 1px dashed var(--df-line);
  padding-left: 24px;
}

.df-hero-stat-card {
  padding: 18px;
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  margin-bottom: 12px;
}

.df-hero-stat-val {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--df-ink);
}

.df-hero-stat-lbl {
  font-size: 0.82rem;
  color: var(--df-muted);
  font-weight: 600;
}

/* App Box */
.draft-app-box {
  margin-bottom: 40px;
}

.draft-loading-state {
  text-align: center;
  padding: 60px 20px;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--df-line);
}

.draft-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(79, 70, 229, 0.15);
  border-top-color: var(--df-accent);
  border-radius: 50%;
  animation: df-spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes df-spin {
  to { transform: rotate(360deg); }
}

/* Roster Board */
.draft-roster-board {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  box-shadow: var(--df-shadow);
  margin-bottom: 28px;
}

.roster-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.roster-title-wrap h2 {
  font-size: 1.45rem;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
}

.roster-subtitle {
  font-size: 0.88rem;
  color: var(--df-muted);
}

.roster-budget-stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.budget-metric-chip {
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--df-soft);
  border: 1px solid var(--df-line);
  font-size: 0.88rem;
}

.budget-metric-val {
  font-weight: 800;
  color: var(--df-accent);
}

.draft-progress-wrap {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 24px;
}

.draft-progress-bar {
  height: 100%;
  background: var(--df-emerald);
  width: 0%;
  transition: width 0.3s ease, background-color 0.3s ease;
}

/* Slots Grid */
.draft-roster-slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.roster-slot {
  background: var(--df-soft);
  border: 2px dashed var(--df-line);
  border-radius: 18px;
  padding: 12px 10px;
  text-align: center;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.roster-slot.is-filled {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.roster-slot.is-empty .roster-empty-icon {
  font-size: 1.8rem;
  color: #94a3b8;
  line-height: 1;
  margin-bottom: 6px;
}

.roster-slot.is-empty .roster-empty-label {
  font-size: 0.78rem;
  color: #94a3b8;
  font-weight: 600;
}

.roster-slot-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.slot-tier {
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 6px;
}

.btn-slot-remove {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.btn-slot-remove:hover {
  color: var(--df-coral);
}

.roster-slot-img img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.roster-slot-name {
  font-size: 0.84rem;
  font-weight: 700;
  margin: 4px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.roster-slot-types {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Roster Action Bar */
.roster-actions-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--df-line);
}

.roster-btn-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-df {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

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

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

.btn-df-secondary {
  background: var(--df-soft);
  color: var(--df-ink);
  border-color: var(--df-line);
}

.btn-df-secondary:hover {
  background: #e2e8f0;
}

.btn-df-danger {
  background: #fef2f2;
  color: var(--df-coral);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-df-danger:hover {
  background: #fee2e2;
}

/* Filter Controls Box */
.draft-filter-board {
  background: #ffffff;
  border-radius: 24px;
  padding: 24px 28px;
  border: 1px solid var(--df-line);
  margin-bottom: 28px;
}

.filter-controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  align-items: flex-end;
}

.filter-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-item label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--df-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.filter-item input[type="search"],
.filter-item select {
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--df-line);
  background: var(--df-soft);
  font-size: 0.92rem;
  color: var(--df-ink);
  outline: none;
  transition: border-color 0.2s ease;
}

.filter-item input[type="search"]:focus,
.filter-item select:focus {
  border-color: var(--df-accent);
  background: #ffffff;
}

.filter-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
}

.filter-checkbox-item label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--df-ink);
  cursor: pointer;
}

/* Candidates Grid */
.draft-candidates-section {
  background: #ffffff;
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--df-line);
}

.candidates-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.candidates-header-row h3 {
  font-size: 1.25rem;
  margin: 0;
}

.candidates-count-pill {
  font-size: 0.82rem;
  color: var(--df-muted);
  font-weight: 600;
  background: var(--df-soft);
  padding: 4px 10px;
  border-radius: 12px;
}

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

.draft-card {
  background: var(--df-soft);
  border: 1px solid var(--df-line);
  border-radius: 18px;
  padding: 14px 12px;
  text-align: center;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.draft-card:hover {
  transform: translateY(-4px);
  border-color: var(--df-accent);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
  background: #ffffff;
}

.draft-card-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 8px;
}

.draft-card-img-wrap {
  width: 76px;
  height: 76px;
  margin: 6px auto 10px;
}

.draft-card-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.06));
}

.draft-card-name {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.draft-card-types {
  display: flex;
  gap: 4px;
  justify-content: center;
  margin-bottom: 6px;
}

.draft-card-bst {
  font-size: 0.76rem;
  color: var(--df-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.btn-draft-add {
  margin-top: auto;
  width: 100%;
  padding: 7px 0;
  border-radius: 10px;
  border: 1px solid rgba(79, 70, 229, 0.2);
  background: #ffffff;
  color: var(--df-accent);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
}

.draft-card:hover .btn-draft-add {
  background: var(--df-accent);
  color: #ffffff;
}

.draft-more-hint {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px;
  color: var(--df-muted);
  font-size: 0.86rem;
  background: var(--df-soft);
  border-radius: 12px;
  margin-top: 10px;
}

.draft-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 20px;
  color: var(--df-muted);
}

/* Type Badges */
.poke-type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #ffffff;
  letter-spacing: 0.04em;
}

.poke-type-normal { background: #9fa19f; }
.poke-type-fire { background: #e62829; }
.poke-type-water { background: #2980ef; }
.poke-type-electric { background: #fac000; color: #1e293b; }
.poke-type-grass { background: #3fa129; }
.poke-type-ice { background: #3dcef3; color: #1e293b; }
.poke-type-fighting { background: #ff8000; }
.poke-type-poison { background: #9141cb; }
.poke-type-ground { background: #915121; }
.poke-type-flying { background: #81b9ef; color: #1e293b; }
.poke-type-psychic { background: #ef4179; }
.poke-type-bug { background: #91a119; }
.poke-type-rock { background: #afa981; }
.poke-type-ghost { background: #704170; }
.poke-type-dragon { background: #5060e1; }
.poke-type-steel { background: #60a1b8; }
.poke-type-fairy { background: #ef70ef; }
.poke-type-dark { background: #50413f; }

/* Toast */
.draft-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 20px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  transform: translateY(100px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 9999;
}

.draft-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

/* Content Sections */
.df-content-section {
  background: #ffffff;
  border-radius: 28px;
  padding: 40px;
  border: 1px solid var(--df-line);
  margin-bottom: 32px;
  box-shadow: var(--df-shadow);
}

.df-content-section h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}

.df-content-section h3 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
}

.df-content-section p,
.df-content-section li {
  color: var(--df-muted);
  line-height: 1.75;
  font-size: 1rem;
}

.df-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.df-feature-card {
  padding: 24px;
  border-radius: 18px;
  background: var(--df-soft);
  border: 1px solid var(--df-line);
}

.df-feature-card h4 {
  font-size: 1.1rem;
  margin: 0 0 8px;
  color: var(--df-ink);
}

.df-feature-card p {
  margin: 0;
  font-size: 0.92rem;
}

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

.df-faq-item {
  border: 1px solid var(--df-line);
  border-radius: 18px;
  padding: 22px 24px;
  background: var(--df-soft);
}

.df-faq-question {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--df-ink);
  margin: 0 0 10px;
}

.df-faq-answer {
  color: var(--df-muted);
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.df-faq-answer strong {
  color: var(--df-ink);
}

/* Internal Linking Cards */
.df-tool-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.df-tool-link-card {
  display: block;
  padding: 20px;
  border-radius: 16px;
  background: var(--df-soft);
  border: 1px solid var(--df-line);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.df-tool-link-card:hover {
  transform: translateY(-3px);
  border-color: var(--df-accent);
}

.df-tool-link-card h4 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: var(--df-accent);
}

.df-tool-link-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--df-muted);
}

@media (max-width: 768px) {
  .df-hero {
    grid-template-columns: 1fr;
    padding: 28px 20px;
  }
  .df-hero-side {
    border-left: none;
    border-top: 1px dashed var(--df-line);
    padding-left: 0;
    padding-top: 20px;
  }
  .df-content-section {
    padding: 24px 20px;
  }
  .draft-roster-board,
  .draft-filter-board,
  .draft-candidates-section {
    padding: 20px 16px;
  }
}
