:root {
  color-scheme: dark;
  --bg: #130f18;
  --panel: rgba(41, 31, 53, 0.78);
  --panel-strong: rgba(55, 40, 72, 0.92);
  --line: rgba(255, 255, 255, 0.14);
  --text: #fff8ff;
  --muted: #d6c4dc;
  --pink: #f16baa;
  --violet: #a974ff;
  --orange: #ff9b4f;
  --cyan: #74e0ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(19, 15, 24, 0.9), rgba(19, 15, 24, 0.64)),
    radial-gradient(circle at 14% 8%, rgba(255, 155, 79, 0.24), transparent 28rem),
    radial-gradient(circle at 82% 2%, rgba(169, 116, 255, 0.27), transparent 30rem),
    linear-gradient(140deg, #130f18 0%, #21182a 48%, #18111d 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 80%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: url("../assets/kalimpoche-bg.png") center top / cover no-repeat;
  opacity: 0.36;
}

a {
  color: inherit;
}

img,
iframe {
  display: block;
  max-width: 100%;
}

.site-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 76px;
  padding-block: 10px;
  backdrop-filter: blur(18px);
}

.brand,
.nav-links,
.hero-actions,
.stream-topline,
.footer {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 12px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: linear-gradient(145deg, var(--pink), var(--orange));
  box-shadow: 0 10px 30px rgba(241, 107, 170, 0.28);
}

.nav-links {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(19, 15, 24, 0.54);
}

.nav-links a,
.hero-actions a,
.stream-topline a,
.text-link,
.footer a,
.primary-cta {
  text-decoration: none;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  gap: 42px;
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: 34px 0 70px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  font-size: clamp(52px, 9vw, 108px);
  line-height: 0.9;
}

h2 {
  margin-bottom: 12px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.hero-text,
.section-heading p,
.schedule-card p,
.footer {
  color: var(--muted);
}

.hero-text {
  max-width: 670px;
  margin-bottom: 28px;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-actions a,
.text-link {
  min-height: 48px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
}

.hero-actions a:first-child,
.primary-cta {
  color: #201027;
  background: linear-gradient(135deg, var(--pink), var(--orange));
  border-color: transparent;
}

.status-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 760px;
  margin: 0;
}

.status-strip div,
.stream-card,
.schedule-card,
.model-frame,
.slider-shell,
.roulette-card,
.roulette-empty,
.tournament-card,
.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-strip div {
  padding: 14px;
}

.status-strip dt {
  color: var(--muted);
  font-size: 12px;
}

.status-strip dd {
  margin: 4px 0 0;
  font-weight: 800;
}

.model-frame {
  position: relative;
  align-self: center;
  justify-self: center;
  width: clamp(380px, 28vw, 490px);
  height: clamp(660px, 82vh, 920px);
  margin: 0;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(145deg, rgba(19, 15, 24, 0.32), rgba(255, 155, 79, 0.12)),
    url("../assets/kalimpoche-bg.png") 58% 50% / auto 100% no-repeat,
    var(--panel-strong);
}

.model-frame::before {
  position: absolute;
  inset: auto -20% -16% -20%;
  height: 44%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(19, 15, 24, 0.86));
  pointer-events: none;
}

.model-frame img {
  position: absolute;
  left: 55%;
  top: clamp(8px, 3vh, 25px);
  scale: clamp(1.2, 1.2, 1.5);
  width: auto;
  height: calc(100% - 82px);
  max-height: 760px;
  max-width: none;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 22px 45px rgba(0, 0, 0, 0.34));
}

.model-frame figcaption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 15, 24, 0.64);
  font-weight: 800;
  backdrop-filter: blur(16px);
}

.live-section,
.schedule-section,
.arts-section,
.roulette-section,
.history-section,
.tournaments-section,
.news-section {
  padding: 76px 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 26px;
}

.section-heading p {
  max-width: 650px;
  line-height: 1.65;
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.stream-card,
.schedule-card {
  min-width: 0;
  padding: 16px;
}

.stream-topline {
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.stream-topline a,
.text-link,
.history-card a {
  color: var(--cyan);
  font-weight: 800;
}

.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.live-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff3b7f;
  box-shadow: 0 0 0 6px rgba(255, 59, 127, 0.16);
}

.stream-preview {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 420px;
  padding: 28px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(19, 15, 24, 0.84), rgba(19, 15, 24, 0.18)),
    url("../assets/kalimpoche-bg.png") center / cover no-repeat;
}

.stream-preview::after {
  position: absolute;
  right: clamp(8px, 3vw, 46px);
  bottom: -10px;
  width: min(38%, 390px);
  aspect-ratio: 1015 / 1369;
  content: "";
  background: url("../assets/kalimpoche-chibi-model.png") center bottom / contain no-repeat;
  filter: drop-shadow(0 22px 34px rgba(0, 0, 0, 0.44));
}

.stream-preview > div {
  position: relative;
  z-index: 1;
  max-width: 460px;
}

.stream-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.stream-preview h3 {
  margin-bottom: 10px;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.04;
}

.stream-preview p,
.schedule-card p,
.roulette-empty p,
.history-card p,
.tournament-header p,
.news-card p {
  color: var(--muted);
  line-height: 1.55;
}

.primary-cta {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  margin-top: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  font-weight: 900;
}

.schedule-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.schedule-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(255, 176, 215, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 176, 215, 0.2) 1px, transparent 1px),
    rgba(255, 248, 255, 0.08);
  background-size: 34px 34px;
  box-shadow: var(--shadow);
}

.day-card {
  position: relative;
  min-height: 184px;
  padding: 18px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  color: #321d38;
}

.day-card::after {
  position: absolute;
  right: 12px;
  bottom: 10px;
  width: 58px;
  height: 58px;
  content: "";
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 42%, #321d38 0 8%, transparent 9%),
    radial-gradient(circle at 62% 42%, #321d38 0 8%, transparent 9%),
    radial-gradient(circle at 50% 62%, #ff9b4f 0 18%, transparent 19%),
    #fff5fb;
  opacity: 0.25;
}

.day-card span {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--pink);
  color: white;
  font-weight: 900;
}

.day-card h3 {
  margin-bottom: 12px;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.08;
}

.day-card time {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 155, 79, 0.18);
  color: #d45c18;
  font-size: 22px;
  font-weight: 900;
}

.day-card p {
  margin: 10px 0 0;
  color: rgba(50, 29, 56, 0.72);
  font-weight: 800;
}

.monday { border-color: #f58bbb; }
.rest { border-color: #7ad8ff; }
.rest span { background: #7ad8ff; color: #24445d; }
.wednesday { border-color: #f2d676; }
.wednesday span { background: #f2d676; color: #5a4213; }
.thursday { border-color: #84e99f; }
.thursday span { background: #84e99f; color: #184a28; }
.friday { border-color: #ffad72; }
.friday span { background: #ffad72; color: #57270c; }
.surprise { border-color: #c39cff; }
.surprise span { background: #c39cff; color: #34145e; }
.sunday { grid-column: auto; }

.slider-shell {
  position: relative;
  padding: 18px 64px;
}

.slider-viewport {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border-radius: var(--radius);
}

.slider-track,
.slider-slide {
  position: absolute;
  inset: 0;
}

.slider-slide {
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 380ms ease;
}

.slider-button {
  position: absolute;
  top: 50%;
  z-index: 5;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(19, 15, 24, 0.82);
  color: var(--text);
  cursor: pointer;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
}

.slider-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.12);
}

.slider-button.prev { left: 14px; }
.slider-button.next { right: 14px; }

.art-slide {
  display: grid;
  height: 100%;
  margin: 0;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, rgba(241, 107, 170, 0.16), transparent 24rem),
    rgba(255, 255, 255, 0.04);
}

.art-slide img {
  width: 100%;
  height: 560px;
  object-fit: contain;
}

.art-slide figcaption {
  align-self: end;
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

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

.roulette-card {
  padding: 18px;
  border-color: color-mix(in srgb, var(--rarity), white 18%);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--rarity), transparent 78%), transparent),
    rgba(255, 255, 255, 0.055);
}

.roulette-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.roulette-top span {
  color: var(--rarity);
  font-weight: 900;
  text-transform: uppercase;
}

.roulette-top strong {
  padding: 8px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--rarity), transparent 78%);
  color: var(--text);
}

.roulette-card ul,
.group-card ol {
  margin: 0;
  padding-left: 18px;
}

.roulette-card li,
.group-card li {
  margin-bottom: 8px;
}

.roulette-empty {
  grid-column: 1 / -1;
  padding: 22px;
  border-color: rgba(255, 184, 77, 0.42);
}

.history-slider .slider-viewport {
  min-height: 540px;
}

.history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  height: 100%;
  align-items: stretch;
}

.video-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: #09070c;
}

.video-frame::before {
  display: block;
  padding-top: 56.25%;
  content: "";
}

.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.history-card > div:last-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.tournaments-list {
  display: grid;
  gap: 18px;
}

.tournament-card {
  padding: 20px;
}

.tournament-header {
  max-width: 760px;
  margin-bottom: 18px;
}

.tournament-spotlight {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
}

.podium-art {
  position: relative;
  min-height: 360px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 50% 20%, rgba(241, 107, 170, 0.18), transparent 24rem),
    rgba(255, 255, 255, 0.05);
}

.podium-art::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, transparent 58%, rgba(19, 15, 24, 0.22)),
    linear-gradient(90deg, rgba(19, 15, 24, 0.2), transparent 18%, transparent 82%, rgba(19, 15, 24, 0.2));
  pointer-events: none;
}

.podium-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px;
  border: 1px solid rgba(255, 155, 79, 0.3);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 155, 79, 0.14), transparent 58%),
    rgba(255, 255, 255, 0.06);
}

.winner-panel > span {
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.winner-panel h4 {
  margin: 8px 0 12px;
  color: #fff3b7;
  font-size: clamp(32px, 4.6vw, 58px);
  line-height: 0.95;
  text-shadow: 0 0 28px rgba(255, 184, 77, 0.28);
}

.winner-panel p {
  margin-bottom: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.podium-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.podium-list li {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: rgba(19, 15, 24, 0.36);
}

.podium-list li > span {
  display: grid;
  grid-row: span 2;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.11);
  font-weight: 900;
}

.podium-list li[data-place="1"] > span {
  color: #301800;
  background: linear-gradient(135deg, #ffe588, var(--orange));
}

.podium-list strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
}

.podium-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.tournament-header span {
  color: var(--orange);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.groups-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.group-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.group-card h4 {
  margin-bottom: 10px;
  color: var(--cyan);
  font-size: 18px;
}

.news-card {
  min-height: 190px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(255, 255, 255, 0.055);
}

.news-card time {
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.news-card h3 {
  margin-top: 12px;
  font-size: 20px;
}

.news-card a {
  display: inline-flex;
  margin-top: 16px;
  color: var(--orange);
  font-weight: 800;
  text-decoration: none;
}

.empty-state {
  display: grid;
  min-height: 300px;
  place-items: center;
  color: var(--muted);
}

.footer {
  justify-content: space-between;
  gap: 18px;
  padding: 34px 0 50px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer p {
  margin-bottom: 0;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-links {
    width: 100%;
    justify-content: flex-start;
    border-radius: var(--radius);
  }

  .hero,
  .live-grid,
  .history-card,
  .tournament-spotlight {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .model-frame {
    width: min(100%, 390px);
    height: clamp(560px, 76vh, 700px);
  }

  .schedule-board,
  .roulette-grid,
  .groups-grid,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sunday {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 20px, 1180px);
  }

  h1 {
    font-size: 48px;
  }

  .nav-links a {
    padding-inline: 10px;
    font-size: 13px;
  }

  .status-strip,
  .schedule-board,
  .roulette-grid,
  .groups-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .model-frame {
    width: min(100%, 360px);
    height: clamp(520px, 78vh, 650px);
  }

  .model-frame img {
    width: auto;
    height: calc(100% - 78px);
    max-height: 600px;
    max-width: none;
  }

  .stream-preview {
    min-height: 430px;
    align-items: flex-start;
  }

  .stream-preview::after {
    right: -4px;
    bottom: -6px;
    width: min(52%, 210px);
    opacity: 0.84;
  }

  .podium-art {
    min-height: 250px;
  }

  .winner-panel {
    padding: 18px;
  }

  .slider-shell {
    padding: 14px 10px 68px;
  }

  .slider-viewport,
  .history-slider .slider-viewport {
    min-height: 520px;
  }

  .slider-button {
    top: auto;
    bottom: 14px;
    transform: none;
  }

  .slider-button.prev {
    left: calc(50% - 52px);
  }

  .slider-button.next {
    right: calc(50% - 52px);
  }

  .art-slide img {
    height: 460px;
  }

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