:root {
  --bg-1: #0f172a;
  --bg-2: #1e293b;
  --accent: #38bdf8;
  --accent-2: #22d3ee;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --panel-bg: rgba(15, 23, 42, 0.68);
  --panel-border: rgba(148, 163, 184, 0.25);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Segoe UI", Tahoma, sans-serif;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top right, #1d4ed8 0%, transparent 35%),
    radial-gradient(circle at bottom left, #0ea5e9 0%, transparent 30%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  padding: 2rem;
}

.layout {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  align-items: stretch;
}

.sidebar {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.35);
  padding: 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-self: flex-start;
  position: sticky;
  top: 2rem;
}

.sidebar h2 {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-btn {
  text-decoration: none;
  color: var(--text);
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.55);
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-btn:hover,
.nav-btn.active {
  transform: translateX(2px);
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(14, 165, 233, 0.2);
}

.content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  width: 100%;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  padding: 2.5rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.45);
}

.badge {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--accent-2);
  border: 1px solid rgba(34, 211, 238, 0.4);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-bottom: 0.7rem;
  line-height: 1.1;
}

h1 span {
  color: var(--accent);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  margin-bottom: 1.8rem;
  max-width: 62ch;
}

.actions {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.btn {
  text-decoration: none;
  padding: 0.8rem 1.15rem;
  border-radius: 12px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  color: #082f49;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(30, 41, 59, 0.4);
}

.btn:hover {
  transform: translateY(-2px);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.9rem;
  margin-top: 0.6rem;
}

.tile {
  display: block;
  text-decoration: none;
  color: var(--text);
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.55);
  border-radius: 14px;
  padding: 1rem;
  min-height: 110px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tile-title {
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.tile-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.tile:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.65);
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.35);
}

footer {
  margin-top: 1.6rem;
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0.8;
}

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

  .sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .sidebar h2 {
    width: 100%;
  }
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 260px;
  margin-bottom: 1.1rem;
}

.form-row label {
  font-weight: 600;
}

.form-row input,
.team-table input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(30, 41, 59, 0.45);
  color: var(--text);
  padding: 0.62rem 0.7rem;
  font-size: 0.98rem;
}

.team-table input::placeholder,
.form-row input::placeholder {
  color: var(--muted);
}

.table-wrapper {
  overflow-x: auto;
}

.team-table {
  width: 100%;
  border-collapse: collapse;
}

.team-table th,
.team-table td {
  border: 1px solid rgba(148, 163, 184, 0.25);
  padding: 0.7rem;
  text-align: left;
}

.team-table th {
  color: var(--accent-2);
  font-weight: 700;
  background: rgba(30, 41, 59, 0.4);
}

.team-table td:first-child {
  width: 64px;
  text-align: center;
  font-weight: 700;
}

.generator-top-row {
  display: flex;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.form-message {
  color: var(--muted);
  min-height: 1.4rem;
  margin-bottom: 0.9rem;
}

.form-message[data-type='error'] {
  color: #fda4af;
}

.form-message[data-type='success'] {
  color: #86efac;
}

.generator-layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr);
  gap: 1rem;
  align-items: start;
}

.schedule-panel {
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.35);
  padding: 1rem;
  min-height: 100%;
}

.schedule-panel h4 {
  color: var(--accent-2);
  margin-bottom: 0.8rem;
}

.round-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 0.7rem;
  background: rgba(15, 23, 42, 0.45);
}

.round-card + .round-card {
  margin-top: 0.65rem;
}

.round-card h5 {
  margin-bottom: 0.5rem;
  color: var(--text);
  font-size: 1rem;
}

.round-card ul {
  list-style: none;
  padding-left: 0;
}

.round-card li {
  color: var(--muted);
  line-height: 1.5;
}


.schedule-lines {
  list-style: none;
  padding-left: 0;
}

.schedule-lines li {
  color: var(--muted);
  line-height: 1.5;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.2);
}

.schedule-lines li:last-child {
  border-bottom: none;
}

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