@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-soft: #0d1a2d;
  --card: rgba(9, 18, 31, 0.78);
  --card-strong: rgba(14, 26, 44, 0.95);
  --stroke: rgba(155, 187, 255, 0.12);
  --stroke-strong: rgba(155, 187, 255, 0.2);
  --text: #e9f0ff;
  --muted: #9fb0cc;
  --accent: #7ce7c4;
  --accent-2: #87a7ff;
  --warn: #ffba6a;
  --danger: #ff7c96;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(124, 231, 196, 0.18), transparent 26%),
    radial-gradient(circle at top right, rgba(135, 167, 255, 0.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(255, 186, 106, 0.15), transparent 30%),
    linear-gradient(180deg, #050b14 0%, #09111d 48%, #07101a 100%);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

input,
select,
textarea {
  color: var(--text);
  background: rgba(8, 15, 27, 0.82);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(124, 231, 196, 0.7);
  box-shadow: 0 0 0 4px rgba(124, 231, 196, 0.12);
}

select[multiple] {
  min-height: 8.4rem;
}

.selection-field {
  display: grid;
  gap: 10px;
}

.selection-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.selection-row select {
  flex: 1 1 180px;
}

.selected-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(124, 231, 196, 0.08);
  color: var(--text);
}

.selected-chip.muted {
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
}

.selected-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 0.95rem;
}

input[type="range"] {
  padding: 0;
  height: 1.5rem;
  accent-color: var(--accent);
}

textarea {
  resize: vertical;
  min-height: 96px;
}

.shell {
  width: min(1440px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 24px 0 72px;
  position: relative;
  z-index: 1;
}

.page-shell {
  display: grid;
  gap: 20px;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.ambient-one {
  top: -40px;
  left: -30px;
  width: 260px;
  height: 260px;
  background: rgba(124, 231, 196, 0.22);
}

.ambient-two {
  right: -40px;
  top: 140px;
  width: 340px;
  height: 340px;
  background: rgba(135, 167, 255, 0.16);
}

.card {
  background: linear-gradient(180deg, rgba(13, 24, 41, 0.84), rgba(8, 15, 27, 0.84));
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.brand-lockup {
  display: grid;
  gap: 4px;
}

.brand-mark {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 0.92rem;
}

.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.page-link,
.wide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.page-link {
  border-radius: 999px;
  padding: 0.72rem 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}

.page-link.active {
  color: var(--accent);
  border-color: rgba(124, 231, 196, 0.22);
  background: rgba(124, 231, 196, 0.08);
}

.inset {
  background: linear-gradient(180deg, rgba(10, 18, 31, 0.95), rgba(7, 13, 23, 0.88));
}

.hero-wide {
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
}

.feature-stack {
  display: grid;
  gap: 16px;
  margin-top: 12px;
}

.feature-stack strong,
.landing-card h2 {
  font-family: "Space Grotesk", "Inter", sans-serif;
}

.feature-stack p,
.landing-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.landing-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.landing-card {
  min-height: 260px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.wide-link {
  margin-top: auto;
  width: fit-content;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
  gap: 20px;
  padding: 28px;
  margin-bottom: 20px;
}

.hero-copy h1,
.panel h2 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 0.94;
  max-width: 10ch;
  margin-top: 8px;
}

.hero-copy p,
.share-copy {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 70ch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.74rem;
  color: var(--accent);
}

.hero-actions,
.share-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.primary,
.secondary,
.ghost,
.segmented-btn,
.chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.86rem 1.1rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.primary,
.secondary,
.ghost,
.page-link,
.wide-link {
  text-decoration: none;
}

.primary {
  background: linear-gradient(135deg, var(--accent), #b9ffe8);
  color: #07111f;
  font-weight: 800;
}

.secondary {
  background: rgba(124, 231, 196, 0.08);
  color: var(--text);
  border: 1px solid rgba(124, 231, 196, 0.22);
}

.ghost,
.segmented-btn,
.chip-btn {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  border: 1px solid var(--stroke);
}

.chip-btn {
  padding: 0.62rem 0.95rem;
}

.chip-btn.danger {
  border-color: rgba(255, 124, 150, 0.22);
  color: #ff9fba;
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.segmented-btn:hover,
.chip-btn:hover,
button:hover {
  transform: translateY(-1px);
}

.hero-status {
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 220px;
  border: 1px solid var(--stroke-strong);
}

.status-label,
.team-summary,
.mode-chip,
.weight-chip,
.mini-field span,
.inline-field label,
.inline-field span {
  color: var(--muted);
  font-size: 0.86rem;
}

.status-value {
  font-family: "Space Grotesk", "Inter", sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1;
  margin-top: 10px;
}

.status-meta {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.bottom-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
}

.panel {
  padding: 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.panel h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-top: 8px;
}

.segmented {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
}

.segmented-btn.active {
  background: rgba(124, 231, 196, 0.14);
  border-color: rgba(124, 231, 196, 0.28);
  color: var(--accent);
}

.panel-toolbar,
.settings-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.panel-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
}

.settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inline-field {
  display: grid;
  gap: 8px;
}

.inline-field.grow,
.mini-field.grow {
  width: 100%;
}

.item-list {
  display: grid;
  gap: 12px;
}

.item-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, auto);
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}

.player-row {
  grid-template-columns: minmax(0, 1fr) minmax(170px, 0.6fr) minmax(0, 1.2fr) auto auto;
}

.item-name {
  width: 100%;
}

.row-badges,
.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.weight-chip,
.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.48rem 0.78rem;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.03);
}

.mode-chip {
  color: #9eb5ff;
  border-color: rgba(135, 167, 255, 0.22);
}

.weight-chip.weighted {
  color: #7ce7c4;
  border-color: rgba(124, 231, 196, 0.22);
}

.weight-chip.skill {
  color: #ffcf84;
  border-color: rgba(255, 186, 106, 0.22);
}

.mini-field {
  display: grid;
  gap: 6px;
}

.mini-field input[type="text"] {
  width: 100%;
}

.teams-result {
  display: grid;
  gap: 12px;
}

.empty-state {
  padding: 22px;
  border: 1px dashed var(--stroke-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.team-card {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
}

.team-card h3 {
  margin: 0;
  font-family: "Space Grotesk", "Inter", sans-serif;
}

.team-card .meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.team-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.member-pill {
  padding: 0.72rem 0.85rem;
  border-radius: 999px;
  background: rgba(7, 17, 31, 0.75);
  border: 1px solid var(--stroke);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.member-pill small {
  color: var(--muted);
}

.share-panel textarea {
  width: 100%;
  margin-top: 12px;
}

.team-summary {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

@media (max-width: 960px) {
  .hero,
  .hero-wide,
  .grid,
  .bottom-grid,
  .landing-grid,
  .settings-grid,
  .panel-toolbar,
  .player-row,
  .item-row,
  .topbar {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }

  .topbar {
    display: grid;
    justify-content: start;
  }

  .team-summary,
  .row-badges,
  .row-actions {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100vw - 20px, 1200px);
    padding-top: 14px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }

  .hero-actions,
  .share-actions {
    flex-direction: column;
  }

  .primary,
  .secondary,
  .ghost,
  .page-link,
  .segmented-btn,
  .chip-btn {
    width: 100%;
    justify-content: center;
  }

  .wide-link {
    width: 100%;
  }
}
