/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #0f172a;
  --navy-light: #1e293b;
  --slate: #334155;
  --slate-light: #64748b;
  --gray: #94a3b8;
  --gray-light: #e2e8f0;
  --white: #f8fafc;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-light: #60a5fa;
  --purple: #8b5cf6;
  --green: #22c55e;
  --green-dark: #16a34a;
  --orange: #f97316;
  --red: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--navy);
  color: var(--white);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* === Screens === */
.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
  flex-direction: column;
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--gray);
  border: 1px solid var(--slate);
}

.btn-ghost:hover:not(:disabled) {
  color: var(--white);
  border-color: var(--gray);
}

.btn-large {
  padding: 16px 48px;
  font-size: 1.2rem;
  border-radius: var(--radius);
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.85rem;
}

/* === Logo === */
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}

.logo-small {
  font-size: 1.1rem;
}

/* === Landing === */
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
}

.landing-nav {
  display: flex;
  gap: 32px;
}

.landing-nav a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

.landing-nav a:hover {
  color: var(--white);
}

.landing-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
  max-width: 720px;
  margin: 0 auto;
}

.landing-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--white) 0%, var(--blue-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.2rem;
  color: var(--gray);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-hint {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--slate-light);
}

/* Secondary button (green for teams) */
.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 2px solid var(--green);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(34, 197, 94, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.3);
}

.btn-green {
  background: var(--green);
  color: var(--navy);
  font-weight: 700;
}

.btn-green:hover:not(:disabled) {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

/* Landing sections */
.landing-section {
  padding: 80px 40px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.landing-section h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 40px;
  letter-spacing: -0.02em;
}

.section-text {
  font-size: 1.1rem;
  color: var(--gray);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all var(--transition);
}

.step-card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--blue);
  border-radius: 50%;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--gray);
  font-size: 0.95rem;
}

.landing-footer {
  padding: 40px;
  text-align: center;
  color: var(--slate-light);
  font-size: 0.9rem;
}

/* === Q&A Screen === */
.qa-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 40px;
  border-bottom: 1px solid var(--slate);
}

.progress-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--slate);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  border-radius: 3px;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 0.85rem;
  color: var(--gray);
  white-space: nowrap;
  min-width: 48px;
}

.qa-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.question-container {
  width: 100%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.question-label {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.question-hint {
  color: var(--slate-light);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.question-why {
  color: var(--slate-light);
  font-size: 0.85rem;
  font-style: italic;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--slate);
}

/* Option cards */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  background: var(--navy-light);
  border: 2px solid var(--slate);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.option-card:hover {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.06);
}

.option-card.selected {
  border-color: var(--blue);
  background: rgba(59, 130, 246, 0.1);
}

.option-check {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: 2px solid var(--slate);
  border-radius: 6px;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.option-card[data-mode="single"] .option-check {
  border-radius: 50%;
}

.option-card.selected .option-check {
  background: var(--blue);
  border-color: var(--blue);
}

.option-card.selected .option-check::after {
  content: '';
  width: 10px;
  height: 10px;
  background: var(--white);
  border-radius: 2px;
}

.option-card[data-mode="single"].selected .option-check::after {
  border-radius: 50%;
  width: 8px;
  height: 8px;
}

.option-content {
  flex: 1;
}

.option-label {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 2px;
}

.option-desc {
  color: var(--gray);
  font-size: 0.88rem;
  line-height: 1.5;
}

/* Pick-limit badge */
.pick-limit {
  display: inline-block;
  background: var(--slate);
  color: var(--gray-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 24px;
}

/* Conditional sub-input */
.sub-input-group {
  margin-top: 16px;
  padding: 16px 20px;
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: var(--radius-sm);
  animation: fadeIn 0.25s ease;
}

.sub-input-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  margin-bottom: 8px;
}

.sub-input-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--navy);
  border: 1px solid var(--slate);
  border-radius: var(--radius-sm);
  color: var(--white);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition);
}

.sub-input-group input:focus {
  border-color: var(--blue);
}

.sub-input-group input::placeholder {
  color: var(--slate-light);
}

/* Tags input (for tech choices) */
.tags-input-wrap {
  margin-top: 16px;
}

.tags-input-wrap label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray);
  margin-bottom: 8px;
}

.tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  user-select: none;
}

.tag-chip:hover {
  border-color: var(--blue);
}

.tag-chip.selected {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--blue);
  color: var(--blue-light);
}

/* Q&A nav */
.qa-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
  width: 100%;
  justify-content: space-between;
}

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

.results-main {
  flex: 1;
  padding: 48px 24px;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.results-main h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.results-sub {
  color: var(--gray);
  margin-bottom: 40px;
}

/* Profile card */
.profile-card {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 40px;
}

.profile-section {
  margin-bottom: 24px;
}

.profile-section:last-child {
  margin-bottom: 0;
}

.profile-section-title {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--slate-light);
  margin-bottom: 8px;
}

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

.profile-tag {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.profile-tag.blue { background: rgba(59, 130, 246, 0.15); color: var(--blue-light); }
.profile-tag.purple { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
.profile-tag.green { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.profile-tag.orange { background: rgba(249, 115, 22, 0.15); color: #fb923c; }
.profile-tag.gray { background: rgba(148, 163, 184, 0.12); color: var(--gray); }

.profile-value {
  font-size: 1rem;
  color: var(--gray-light);
}

/* Match results */
.match-results {
  margin-bottom: 40px;
}

.match-results h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.match-card {
  background: var(--navy-light);
  border: 1px solid var(--slate);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition);
}

.match-card:hover {
  border-color: var(--blue);
}

.match-info h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.match-info p {
  font-size: 0.88rem;
  color: var(--gray);
}

.match-score {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--green);
}

.results-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Dual-track layout */
.dual-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  text-align: left;
}

.track-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.track-title-blue { color: var(--blue-light); }
.track-title-green { color: var(--green); }

.steps-grid-vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step-number-green {
  background: var(--green) !important;
}

/* Badge */
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 6px;
}

.badge-green {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
}

/* Team listing header */
.team-listing-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--slate);
}

.team-listing-name {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.team-listing-desc {
  color: var(--gray);
  font-size: 1rem;
}

/* Registered teams */
.registered-teams {
  margin-top: 24px;
}

.registered-teams h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-light);
}

/* === Responsive === */
@media (max-width: 640px) {
  .landing-header {
    padding: 16px 20px;
  }

  .landing-nav {
    gap: 16px;
  }

  .landing-section {
    padding: 48px 20px;
  }

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

  .dual-track {
    grid-template-columns: 1fr;
  }

  .hero-ctas {
    flex-direction: column;
    width: 100%;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .qa-header {
    padding: 12px 20px;
  }

  .qa-main {
    padding: 24px 16px;
  }

  .question-label {
    font-size: 1.3rem;
  }

  .results-main {
    padding: 32px 16px;
  }

  .profile-card {
    padding: 24px 20px;
  }

  .results-actions {
    flex-direction: column;
  }
}
