:root {
  --bg: #0b1220;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-solid: #111827;
  --panel-soft: #1f2937;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(34, 197, 94, 0.18), transparent 30%),
    radial-gradient(circle at right, rgba(59, 130, 246, 0.12), transparent 30%),
    linear-gradient(180deg, #0f172a 0%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 24px auto;
}

.seo-header {
  padding: 28px 16px 12px;
}

.seo-header__content {
  max-width: 920px;
  margin: 0 auto;
  text-align: center;
}

.seo-header h1 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.seo-header p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.ads {
  width: min(1100px, calc(100% - 32px));
  margin: 18px auto;
  padding: 8px 0;
  text-align: center;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.22), rgba(255, 255, 255, 0.06));
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), #15803d);
  color: white;
  font-size: 26px;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.35);
}

.brand h2 {
  margin: 0;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.1;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.grid {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.panel h2,
.panel h3 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.stack {
  display: grid;
  gap: 14px;
}

.row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

label {
  display: block;
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 8px;
}

input,
select {
  width: 100%;
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  transition: 0.2s ease;
}

input:focus,
select:focus {
  border-color: rgba(34, 197, 94, 0.8);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

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

.star {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.65);
  color: #cbd5e1;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 22px;
  transition: 0.2s ease;
}

.star.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.4);
  transform: translateY(-1px);
}

.button {
  border: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 14px 18px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  transition: 0.2s ease;
  box-shadow: 0 12px 30px rgba(34, 197, 94, 0.25);
}

.button:hover {
  transform: translateY(-1px);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.button.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.2);
}

.cta {
  min-height: 200px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.92), rgba(22, 163, 74, 0.82));
}

.cta-button {
  width: 100%;
  border: 0;
  color: white;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cta-button:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
}

.cta-button:active {
  transform: scale(0.99);
}

.cta-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.35);
  outline-offset: 3px;
}

.cta h2 {
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  margin: 0;
  letter-spacing: 0.02em;
}

.icon {
  font-size: 48px;
  display: block;
  margin-bottom: 10px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.toolbar-top {
  margin-top: 16px;
}

.toolbar .meta {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.players-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
}

.players-table th,
.players-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.95rem;
}

.players-table th {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.skill-badge {
  font-weight: 700;
  color: #fbbf24;
}

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

.mini-btn {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
}

.mini-btn.delete {
  color: #fca5a5;
}

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

.team-card {
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.team-card header {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(22, 163, 74, 0.75));
  color: white;
}

.team-card header h4 {
  margin: 0;
  font-size: 1rem;
}

.team-card header small {
  display: block;
  margin-top: 6px;
  opacity: 0.95;
}

.team-body {
  padding: 14px;
  display: grid;
  gap: 10px;
}

.player-item {
  padding: 12px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-item strong {
  display: block;
}

.player-item span {
  color: var(--muted);
  font-size: 0.9rem;
}

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

.summary-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.summary-card small {
  color: var(--muted);
}

.summary-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
}

.empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  color: var(--muted);
  text-align: center;
}

.footer-note {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.seo-content {
  width: min(980px, calc(100% - 32px));
  margin: 36px auto 48px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.seo-content h2 {
  margin-top: 0;
}

.seo-content p,
.seo-content li {
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1 1 180px;
  }
}

@media (max-width: 640px) {
  .container,
  .ads,
  .seo-content {
    width: min(100% - 16px, 1200px);
  }

  .container {
    margin: 12px auto 20px;
  }

  .hero,
  .panel,
  .seo-content {
    padding: 16px;
    border-radius: 20px;
  }

  .brand {
    align-items: flex-start;
  }

  .brand-badge {
    width: 46px;
    height: 46px;
    font-size: 22px;
  }

  .brand h2 {
    font-size: 1.3rem;
  }

  .brand p {
    font-size: 0.9rem;
  }

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

  .toolbar {
    flex-direction: column;
  }

  .toolbar .button,
  .toolbar .meta,
  .hero-actions .button,
  .cta-button,
  #addPlayerBtn {
    width: 100%;
  }

  .rating {
    justify-content: space-between;
  }

  .star {
    width: calc(20% - 7px);
    min-width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .players-table th,
  .players-table td {
    padding: 10px 8px;
    font-size: 0.86rem;
  }

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

  .player-item {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .cta {
    min-height: 160px;
  }

  .cta h2 {
    font-size: 1.5rem;
  }
}