:root {
  --topbar-height: 57px;
  --bg: #050505;
  --bg-2: #111111;
  --panel: rgba(15, 15, 15, 0.84);
  --primary: #7515ff;
  --primary-dark: #5f0de0;
  --text: #f5f5f5;
  --muted: #b8b8be;
  --line: rgba(255, 255, 255, 0.14);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background: var(--bg);
}

main {
  width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 5, 5, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar__inner {
  width: 100%;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.topbar__logo {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  white-space: nowrap;
}

.topbar__logo span {
  color: var(--primary);
}

.topbar__toggle {
  display: none;
}

.topbar__nav {
  grid-column: 2;
  height: 56px;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  flex-wrap: wrap;
}

.topbar__nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.topbar__nav a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  min-height: calc(100vh - var(--topbar-height));
  min-height: calc(100dvh - var(--topbar-height));
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 60px 5vw;
  overflow: hidden;
  background: #050505;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image:
    linear-gradient(
      90deg,
      rgba(5, 5, 5, 0.62) 0%,
      rgba(5, 5, 5, 0.3) 38%,
      rgba(5, 5, 5, 0.08) 100%
    ),
    url("turniej2.jpg");
  background-size: cover;
  background-position: center;
}

.hero::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  content: "";
  background: var(--primary);
}

.hero__content {
  width: min(480px, 100%);
  padding: 56px 44px;
  position: relative;
  z-index: 1;
  background: rgba(5, 5, 5, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  text-align: left;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(117, 21, 255, 0.14);
  border: 1px solid rgba(117, 21, 255, 0.42);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
  max-width: 560px;
  margin-bottom: 28px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 16px 30px;
  background: var(--primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 16px 30px rgba(117, 21, 255, 0.28);
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(117, 21, 255, 0.42);
}

.info {
  background: #090909;
  padding: 80px 20px 100px;
}

.info__container {
  max-width: 1100px;
  margin: 0 auto;
  background: rgba(17, 17, 17, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 48px 40px;
}

.info h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 28px;
  letter-spacing: -0.04em;
}

.info__list {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

.info__list p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.info__intro {
  max-width: 760px;
  margin: 0 0 28px;
  color: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

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

.info__card {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(
    145deg,
    rgba(28, 28, 28, 0.82),
    rgba(8, 8, 8, 0.72)
  );
}

.info__card--format,
.info__card--stream {
  grid-column: 1 / -1;
}

.info__card-title {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 1.08rem;
}

.info__card p:not(.info__card-title) {
  margin: 0;
  font-size: 1rem;
}

.info__card--stream .info__card-title + p + p {
  margin-top: 10px;
}

.info__card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.info__card li {
  position: relative;
  padding: 12px 14px 12px 34px;
  border-radius: 6px;
  background: rgba(5, 5, 5, 0.58);
  color: var(--muted);
  line-height: 1.55;
}

.info__card li::before {
  position: absolute;
  left: 14px;
  color: var(--primary);
  content: "•";
}

.info__card .info__prizes {
  grid-template-columns: 1fr;
  gap: 8px;
}

.info__card .info__prizes li {
  padding: 4px 0;
  background: transparent;
}

.info__card .info__prizes li::before {
  content: none;
}

.info__closing {
  margin: 28px 0 0;
  color: var(--text);
  font-weight: 700;
}

.info__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid rgba(117, 21, 255, 0.65);
  color: var(--primary);
  box-shadow: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.secondary-button:hover {
  background: rgba(117, 21, 255, 0.12);
  transform: translateY(-2px);
}

.rules-page {
  min-height: calc(100vh - var(--topbar-height));
  padding: 64px 20px 88px;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(117, 21, 255, 0.14),
      transparent 42%
    ),
    #050505;
}

.rules-page__container {
  max-width: 1000px;
  margin: 0 auto;
}

.rules-page__header {
  margin-bottom: 32px;
}

.rules-page__header h1 {
  margin-bottom: 16px;
}

.rules-page__header p {
  margin: 0;
}

.rules-list {
  display: grid;
  gap: 14px;
  list-style: none;
  counter-reset: rules;
}

.rules-list > li {
  position: relative;
  padding: 26px 30px 26px 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 17, 17, 0.84);
  counter-increment: rules;
}

.rules-list > li::before {
  position: absolute;
  top: 25px;
  left: 28px;
  color: var(--primary);
  content: counter(rules, decimal-leading-zero);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.rules-list h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.rules-list p,
.rules-list ul {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.rules-list > li > p + p,
.rules-list > li > p + ul,
.rules-list > li > ul + p {
  margin-top: 10px;
}

.rules-list ul {
  padding-left: 20px;
}

.rules-list li li + li {
  margin-top: 4px;
}

.teams {
  background: #050505;
  padding: 80px 20px 100px;
}

.teams__container {
  max-width: 1200px;
  margin: 0 auto;
}

.teams__header {
  margin-bottom: 30px;
}

.teams__header h2 {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  letter-spacing: -0.05em;
}

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

.team-card {
  position: relative;
  min-height: 180px;
  padding: 22px 18px;
  border-radius: 8px;
  background: linear-gradient(
    180deg,
    rgba(24, 24, 24, 0.96),
    rgba(8, 8, 8, 0.98)
  );
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: rgba(117, 21, 255, 0.72);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

.team-card__content {
  position: relative;
  z-index: 2;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.team-card__number {
  display: inline-block;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.team-card h3 {
  font-size: 1.8rem;
  letter-spacing: -0.04em;
}

.team-card__players {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 22px 18px;
  list-style: none;
  background: rgba(5, 5, 5, 0.94);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease;
}

.team-card:hover .team-card__content,
.team-card:focus-within .team-card__content {
  opacity: 0;
  transform: translateY(-8px);
}

.team-card:hover .team-card__players,
.team-card:focus-within .team-card__players {
  opacity: 1;
  transform: translateY(0);
}

.team-card__players li {
  color: var(--text);
  font-size: 0.96rem;
  padding-left: 12px;
  position: relative;
}

.team-card__players li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

.bracket-page {
  height: calc(100vh - var(--topbar-height));
  height: calc(100dvh - var(--topbar-height));
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: clamp(20px, 4vh, 40px) 20px;
  background:
    radial-gradient(
      ellipse at 50% 0%,
      rgba(117, 21, 255, 0.14),
      transparent 42%
    ),
    #050505;
}

.bracket-page__container {
  max-width: 1200px;
  width: 100%;
  flex: 1;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

.bracket-page__header {
  flex: 0 0 auto;
  margin-bottom: 24px;
}

.bracket-page__header h1 {
  margin-bottom: 16px;
}

.bracket-page__header p {
  margin: 0;
}

.bracket {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 24px;
  overflow: auto;
  padding: 4px 2px 18px;
}

.bracket__round h2 {
  margin-bottom: 16px;
  color: var(--primary);
  font-size: 1rem;
}

.bracket__matches {
  display: grid;
  gap: 12px;
}

.bracket-match {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(18, 18, 18, 0.94);
}

.bracket-match__team {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.92rem;
}

.bracket-match__team + .bracket-match__team {
  border-top: 1px solid var(--line);
}

.bracket-match__score {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.bracket-match--final {
  border-color: rgba(117, 21, 255, 0.72);
}

.bracket-match--final .bracket-match__team:first-child {
  color: var(--primary);
}

.about {
  background: linear-gradient(180deg, #050505 0%, #0b0b0b 100%);
  padding: 80px 20px 100px;
}

.about__container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
  background: rgba(17, 17, 17, 0.84);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 48px 40px;
}

.about__text {
  width: 100%;
  display: grid;
  gap: 18px;
}

.about__text h2 {
  margin: -8px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.04em;
}

.about__text p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.about__details {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about__block {
  padding: 20px;
  background: rgba(5, 5, 5, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.about__block h3 {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.08rem;
}

.about__block p,
.about__closing {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.about__social-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  list-style: none;
}

.about__social-list li {
  min-width: 0;
}

.about__social-list a {
  min-height: 48px;
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(117, 21, 255, 0.32);
  background: rgba(17, 17, 17, 0.8);
  color: var(--muted);
  cursor: pointer;
  line-height: 1.5;
  text-decoration: none;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.about__social-list a:hover,
.about__social-list a:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(117, 21, 255, 0.8);
  background: rgba(117, 21, 255, 0.2);
  color: var(--text);
  box-shadow: 0 8px 20px rgba(117, 21, 255, 0.16);
}

.about__social-list a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.about__closing {
  color: var(--text);
  font-weight: 700;
}

.info__card--stream .secondary-button {
  margin-top: 16px;
}

.discord {
  padding: 0 20px 80px;
  background: #0b0b0b;
}

.discord__container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 44px 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(
      ellipse at 100% 0%,
      rgba(117, 21, 255, 0.16),
      transparent 48%
    ),
    rgba(17, 17, 17, 0.84);
}

.discord__container h2 {
  margin: -4px 0 16px;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.04em;
}

.discord__container p {
  margin: 0 0 24px;
  color: var(--muted);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 16px 30px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 16px 30px rgba(117, 21, 255, 0.28);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(117, 21, 255, 0.42);
}

.footer {
  background: #050505;
  border-top: 1px solid var(--line);
  padding: 26px 20px 40px;
}

.footer__container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer p,
.footer a {
  margin: 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
}

.footer a:hover {
  color: var(--text);
}

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

.footer__socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.footer__socials a:hover {
  transform: translateY(-2px);
  border-color: rgba(117, 21, 255, 0.65);
}

.footer__socials svg {
  width: 18px;
  height: 18px;
  fill: var(--text);
}

@media (max-width: 1000px) {
  .team-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
}

@media (max-width: 700px) {
  :root {
    --topbar-height: 61px;
  }

  .topbar__inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
  }

  .topbar__toggle {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
  }

  .topbar__toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transition:
      transform 0.2s ease,
      opacity 0.2s ease;
  }

  .topbar__toggle:hover {
    transform: none;
    box-shadow: none;
  }

  .topbar__toggle[aria-expanded="true"] span:first-child {
    transform: translateY(7px) rotate(45deg);
  }

  .topbar__toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .topbar__toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-7px) rotate(-45deg);
  }

  .topbar__nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    flex: none;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 14px;
    background: rgba(5, 5, 5, 0.98);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      visibility 0.2s ease;
  }

  .topbar__nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .topbar__nav a {
    padding: 12px 4px;
  }

  .hero {
    justify-content: center;
    padding: 40px 20px;
  }

  .hero__content {
    padding: 42px 22px;
    text-align: center;
  }

  p {
    margin-bottom: 22px;
  }

  .info__container {
    padding: 32px 22px;
  }

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

  .info__card--format,
  .info__card--stream {
    grid-column: auto;
  }

  .info__card ul {
    grid-template-columns: 1fr;
  }

  .info__actions {
    text-align: center;
  }

  .rules-page {
    padding: 40px 16px 60px;
  }

  .rules-list > li {
    padding: 24px 20px 24px 58px;
  }

  .rules-list > li::before {
    top: 24px;
    left: 20px;
  }

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

  .about__container {
    padding: 32px 22px;
  }

  .discord__container {
    padding: 32px 22px;
  }

  .about__details,
  .about__social-list {
    grid-template-columns: 1fr;
  }

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