.tournament-section {
  position: relative;
  margin-top: 34px;
}

.tournament-section .section-head {
  align-items: center;
  gap: 11px;
  margin-bottom: 14px;
}

.tournament-section .section-head .section-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid #a7e54d45;
  border-radius: 11px;
  background: linear-gradient(145deg, #a5e54d24, #a5e54d08);
  color: #b5f16b;
  font-size: 17px;
  box-shadow: 0 5px 16px #8bc74315;
}

.tournament-section .section-head h2 {
  color: #f5f7fa;
  font-size: 21px;
  font-weight: 850;
  letter-spacing: -.55px;
}

.tournament-section .section-head small {
  color: #9ba8b8;
  font-size: 12px;
}

.tournament-section .section-head .mini-arrows {
  margin-left: auto;
}

.tournament-section .mini-arrows button {
  width: 36px;
  height: 36px;
  border: 1px solid #445365;
  border-radius: 50%;
  background: linear-gradient(145deg, #273344, #1d2735);
  color: #e8edf2;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 5px 14px #070c1466;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.tournament-section .mini-arrows button:hover {
  transform: translateY(-1px);
  border-color: #9cda55;
  background: #31402f;
}

.tournament-rail {
  display: flex;
  align-items: stretch;
  gap: 16px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 7px 3px 19px;
  scroll-padding-inline: 3px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.tournament-rail::-webkit-scrollbar {
  display: none;
}

.tournament-card {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 0 0 clamp(310px, 32vw, 410px);
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #566476;
  border-radius: 21px;
  background: linear-gradient(150deg, #263244 0%, #1c2634 68%, #17212e 100%);
  box-shadow: 0 15px 35px #080d1680, inset 0 1px #ffffff0a;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}

.tournament-card::before {
  position: absolute;
  z-index: 4;
  inset: 0 18% auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, #ffffff7a, transparent);
  content: "";
  pointer-events: none;
}

.tournament-card:hover {
  transform: translateY(-3px);
  border-color: #89c94c;
  box-shadow: 0 20px 40px #080d1699, 0 0 0 1px #9de65a24;
}

.tournament-art {
  position: relative;
  isolation: isolate;
  height: 196px;
  flex: 0 0 196px;
  overflow: hidden;
  background: #183a37;
}

.tournament-art::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, #07141dcc 0%, #07141d69 48%, #07141d1a 100%), linear-gradient(0deg, #111a27d9 0%, transparent 67%);
  content: "";
}

.tournament-art::after {
  position: absolute;
  z-index: 0;
  right: -66px;
  bottom: -148px;
  width: 315px;
  height: 225px;
  border: 1px solid #e0f5c333;
  border-radius: 50%;
  box-shadow: 0 0 0 16px #e0f5c308, 0 0 0 32px #e0f5c306;
  transform: rotate(-20deg);
  content: "";
}

.tournament-art-roulette {
  background: radial-gradient(circle at 77% 37%, #fff0ba 0 4%, #f3c46b 4.8% 8%, #583a73 8.7% 17%, transparent 17.8%), radial-gradient(ellipse at 78% 43%, #a53f82 0 27%, transparent 28%), linear-gradient(130deg, #123a42 0%, #18765d 49%, #6e863a 100%);
}

.tournament-art-crown {
  background: radial-gradient(circle at 77% 40%, #f8d99e 0 5%, #9a5d99 5.8% 8%, #493d87 8.7% 22%, transparent 22.8%), radial-gradient(ellipse at 78% 45%, #af55ae 0 29%, transparent 30%), linear-gradient(130deg, #202b5c 0%, #613d83 54%, #a34f71 100%);
}

.tournament-art-autumn {
  background: radial-gradient(circle at 78% 39%, #ffe2a0 0 5%, #f19a3d 5.8% 9%, #88412e 9.8% 22%, transparent 22.8%), radial-gradient(ellipse at 78% 47%, #bd6639 0 29%, transparent 30%), linear-gradient(130deg, #542b29 0%, #b45b36 53%, #79713d 100%);
}

.tournament-art-weekend {
  background: radial-gradient(circle at 78% 39%, #d7ffff 0 5%, #66e2dc 5.8% 9%, #356995 9.8% 22%, transparent 22.8%), radial-gradient(ellipse at 78% 47%, #3585ad 0 29%, transparent 30%), linear-gradient(130deg, #18384c 0%, #287b7c 53%, #514b91 100%);
}

.tournament-art-orbit {
  position: absolute;
  z-index: 1;
  top: -79px;
  right: -2px;
  width: 252px;
  height: 252px;
  border: 1px solid #e6ffd24f;
  border-radius: 50%;
  box-shadow: 0 0 38px #a3e05a20, inset 0 0 32px #c5f29716;
}

.tournament-art-icon {
  position: absolute;
  z-index: 2;
  top: 26px;
  right: 51px;
  color: #fff2cf;
  font-size: 76px;
  line-height: 1;
  filter: drop-shadow(0 8px 14px #06101ca8);
  transform: rotate(-8deg);
}

.tournament-card-violet .tournament-art-icon { color: #f1ddff; }
.tournament-card-amber .tournament-art-icon { color: #ffe6a8; }
.tournament-card-cyan .tournament-art-icon { color: #d8fcff; }

.tournament-art-wordmark {
  position: absolute;
  z-index: 2;
  bottom: 38px;
  left: 20px;
  color: #f8fafb;
  font-size: 25px;
  font-weight: 950;
  letter-spacing: 1.2px;
  line-height: .95;
  text-shadow: 0 3px 13px #07131d;
}

.tournament-art-wordmark span {
  color: #a7eb5c;
}

.tournament-card-violet .tournament-art-wordmark span { color: #e1b9ff; }
.tournament-card-amber .tournament-art-wordmark span { color: #ffd27d; }
.tournament-card-cyan .tournament-art-wordmark span { color: #88e8eb; }

.tournament-art-caption {
  position: absolute;
  z-index: 2;
  bottom: 18px;
  left: 21px;
  color: #e3edda;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 2.3px;
}

.tournament-info {
  position: relative;
  z-index: 2;
  flex: 1;
  margin: -27px 12px 12px;
  padding: 16px;
  border: 1px solid #657286a6;
  border-radius: 18px;
  background: linear-gradient(145deg, #303b4df5, #252f3ef7 78%);
  box-shadow: 0 12px 26px #080d1977, inset 0 1px #ffffff0a;
  backdrop-filter: blur(15px);
}

.tournament-card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 11px;
}

.tournament-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
  padding: 5px 11px;
  border-radius: 999px;
  color: #152315;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .15px;
}

.tournament-badge::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.tournament-badge.is-live {
  background: linear-gradient(180deg, #a9ec62, #85cf3d);
  box-shadow: 0 4px 13px #80cc3d40;
}

.tournament-badge.is-live::before {
  color: #27843b;
  box-shadow: 0 0 0 3px #27843b20;
  animation: tournament-live-pulse 1.8s ease-out infinite;
}

.tournament-badge.is-upcoming {
  background: #d9caff;
  color: #332a4d;
}

.tournament-badge.is-upcoming::before {
  color: #7e64c2;
}

.tournament-category {
  overflow: hidden;
  color: #b3becc;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .75px;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.tournament-card h3 {
  min-height: 43px;
  margin: 0 0 13px;
  color: #f6f8fb;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.22;
  letter-spacing: -.4px;
}

.tournament-prize {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
  padding: 11px 14px;
  border: 1px solid #ffffff12;
  border-radius: 13px;
  background: linear-gradient(105deg, #182330cc, #222d3bcc);
}

.tournament-prize span {
  color: #b6c1ce;
  font-size: 11px;
  font-weight: 700;
}

.tournament-prize strong {
  color: #a8ed5a;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.8px;
  white-space: nowrap;
  text-shadow: 0 3px 16px #89d3462e;
}

.tournament-card-violet .tournament-prize strong { color: #d5b5ff; }
.tournament-card-amber .tournament-prize strong { color: #ffd27b; }
.tournament-card-cyan .tournament-prize strong { color: #8ce0e4; }

.tournament-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 11px 2px 0;
  color: #aeb9c7;
  font-size: 10px;
}

.tournament-card-footer span:last-child {
  color: #dce7d1;
  font-weight: 800;
}

.tournament-actions {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 9px;
  margin-top: 14px;
}

.tournament-join,
.tournament-details summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 45px;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid #657286;
  border-radius: 999px;
  background: linear-gradient(180deg, #354155, #2a3546);
  color: #f2f5f8;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
  cursor: pointer;
  list-style: none;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}

.tournament-join {
  border-color: #a3e95b;
  background: linear-gradient(180deg, #a4e951 0%, #80c936 100%);
  box-shadow: 0 6px 16px #68ac3240, inset 0 1px #ffffff55;
  color: #192713;
}

.tournament-join:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.tournament-details {
  position: relative;
  min-width: 0;
}

.tournament-details summary::-webkit-details-marker { display: none; }

.tournament-details summary::after {
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  content: "";
  transform: translateY(-2px) rotate(45deg);
  transition: transform .18s ease;
}

.tournament-details[open] summary::after {
  transform: translateY(2px) rotate(225deg);
}

.tournament-details summary:hover,
.tournament-details[open] summary {
  border-color: #9bdd58;
}

.tournament-details p {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: calc(100% + 9px);
  width: min(280px, calc(100vw - 56px));
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #56677a;
  border-radius: 12px;
  background: #1a2432;
  color: #c8d2de;
  font-size: 11px;
  line-height: 1.5;
  box-shadow: 0 12px 28px #070c14b8;
}

.tournament-rail:focus-visible {
  outline: 2px solid #a5e54d;
  outline-offset: 3px;
}

@keyframes tournament-live-pulse {
  0% { box-shadow: 0 0 0 0 #27843b58; }
  70%, 100% { box-shadow: 0 0 0 6px #27843b00; }
}

@media (max-width: 680px) {
  .tournament-section {
    margin-top: 28px;
  }

  .tournament-section .section-head {
    gap: 9px;
    margin-bottom: 10px;
  }

  .tournament-section .section-head .section-icon {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
    border-radius: 10px;
  }

  .tournament-section .section-head h2 {
    font-size: 19px;
  }

  .tournament-section .section-head small {
    order: 3;
    flex-basis: 100%;
    margin: -5px 0 0 41px;
    font-size: 11px;
  }

  .tournament-section .section-head .mini-arrows {
    gap: 6px;
  }

  .tournament-section .mini-arrows button {
    width: 33px;
    height: 33px;
  }

  .tournament-rail {
    gap: 12px;
    margin-right: -12px;
    padding: 5px 12px 16px 2px;
    scroll-padding-left: 2px;
  }

  .tournament-card {
    flex-basis: min(86vw, 380px);
    border-radius: 19px;
  }

  .tournament-art {
    height: 177px;
    flex-basis: 177px;
  }

  .tournament-art-icon {
    top: 24px;
    right: 42px;
    font-size: 68px;
  }

  .tournament-art-wordmark {
    bottom: 35px;
    left: 16px;
    font-size: 22px;
  }

  .tournament-art-caption {
    bottom: 16px;
    left: 17px;
    font-size: 7px;
  }

  .tournament-info {
    margin: -24px 9px 9px;
    padding: 14px;
    border-radius: 16px;
  }

  .tournament-card-meta {
    gap: 7px;
    margin-bottom: 9px;
  }

  .tournament-category {
    font-size: 9px;
    letter-spacing: .55px;
  }

  .tournament-card h3 {
    min-height: 40px;
    margin-bottom: 11px;
    font-size: 16px;
  }

  .tournament-prize {
    min-height: 58px;
    padding: 10px 12px;
  }

  .tournament-prize strong {
    font-size: 23px;
  }

  .tournament-actions {
    gap: 8px;
    margin-top: 12px;
  }

  .tournament-join,
  .tournament-details summary {
    min-height: 43px;
    padding-inline: 10px;
    font-size: 12px;
  }
}

@media (max-width: 380px) {
  .tournament-card {
    flex-basis: min(88vw, 340px);
  }

  .tournament-art {
    height: 164px;
    flex-basis: 164px;
  }

  .tournament-info {
    padding: 12px;
  }

  .tournament-card h3 {
    font-size: 15px;
  }

  .tournament-prize strong {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tournament-card,
  .tournament-section .mini-arrows button,
  .tournament-join,
  .tournament-details summary,
  .tournament-details summary::after {
    transition: none;
  }

  .tournament-badge.is-live::before {
    animation: none;
  }
}
