/* Base layout and theme. */

:root {
  color-scheme: dark;
  --bg: #10111a;
  --panel: #1b1e2c;
  --text: #f7f7fb;
  --muted: #aab0c4;
  --accent: #8c6bff
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: radial-gradient(circle at 20% -10%,#403080,transparent 34%),var(--bg);
  color: var(--text);
  font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}

header,main,footer {
  max-width: 1180px;
  margin: auto;
  padding-left: 24px;
  padding-right: 24px
}

header {
  padding-top: 42px;
  padding-bottom: 25px;
  border-bottom: 1px solid #ffffff1d
}

.brand {
  color: white;
  text-decoration: none;
  letter-spacing: .1em;
  font-weight: 900;
  font-size: 1.35rem
}

.brand span,.eyebrow {
  color: #ad9aff
}

header p {
  color: var(--muted);
  margin: 8px 0 0
}

main {
  padding-top: 32px;
  padding-bottom: 64px
}

nav {
  display: flex;
  gap: 10px;
  overflow: auto;
  padding-bottom: 26px
}

button,.share-x {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: #ffffff14;
  color: var(--text);
  text-decoration: none
}

button: hover,button.active,.share-x:hover {
  background: var(--accent)
}

button: disabled {
  opacity: .5;
  cursor: wait
}

.heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px
}

.heading-actions {
  display: flex;
  gap: 10px
}

.eyebrow {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin: 0
}

h1 {
  font-size: clamp(1.7rem,4vw,2.6rem);
  margin: 5px 0
}

.filters {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
  background: #ffffff0b;
  border: 1px solid #ffffff16;
  border-radius: 12px;
  padding: 16px;
  margin: 20px 0
}

.filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: .82rem
}

.filters input:not([type="checkbox"]),.filters select {
  font: inherit;
  color: var(--text);
  background: #10111a;
  border: 1px solid #ffffff25;
  border-radius: 7px;
  padding: 9px 10px;
  min-width: 220px
}

.filters .checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--text)
}

.filters input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--accent)
}

#status {
  color: var(--muted);
  min-height: 1.5em
}

.stream-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(255px,1fr));
  gap: 18px
}

.card {
  display: block;
  color: inherit;
  text-decoration: none;
  background: var(--panel);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s
}

.card:hover {
  transform: translateY(-4px)
}

.card.is-archive {
  border-color: #8e98a8;
  box-shadow: 0 8px 22px #5b64724a
}

.card.is-archive .viewers,.card.is-archive .started {
  color: #667080
}

.thumbnail {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: #292d3e
}

.thumbnail-wrap {
  position: relative;
}

.card-body {
  padding: 14px
}

.mobile-platform-icon {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 12px;
  display: block;
  width: 24px;
  height: 24px;
}

.card h2 {
  font-size: 1rem;
  line-height: 1.4;
  margin: 7px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden
}

.channel,.viewers,.started {
  color: var(--muted);
  font-size: .88rem;
  margin: 4px 0
}

.empty {
  color: var(--muted);
  grid-column: 1/-1;
  padding: 36px 0
}

footer {
  border-top: 1px solid #ffffff1d;
  color: var(--muted);
  font-size: .8rem;
  padding-top: 25px;
  padding-bottom: 25px
}

@media(max-width:500px) {
  header,main,footer {
    padding-left: 16px;
    padding-right: 16px
  }

  .heading {
    align-items: center
  }

  .heading button,.share-x {
    padding: 9px 12px
  }

  .filters input:not([type="checkbox"]),.filters select {
    min-width: 100%
  }

}

:root {
  color-scheme: light;
  --bg: #f4f8ff;
  --panel: #ffffff;
  --text: #17213d;
  --muted: #5d6b86;
  --accent: #4f8cff
}

body {
  background: radial-gradient(circle at 20% -10%,#b9ddff,transparent 38%),radial-gradient(circle at 100% 15%,#f4d4ff,transparent 30%),var(--bg)
}

header {
  border-bottom-color: #dce5f5
}

.filters {
  background: #ffffffb8;
  border-color: #d8e3f4;
  box-shadow: 0 8px 24px #536e9620
}

.filters input:not([type="checkbox"]),.filters select {
  color: var(--text);
  background: #f8fbff;
  border-color: #cbd9ee
}

.card {
  border: 1px solid #dce5f5;
  box-shadow: 0 8px 22px #536e9620
}

.card:hover {
  box-shadow: 0 14px 30px #536e9635
}

.thumbnail {
  background: #eaf0fa
}

footer {
  border-top-color: #dce5f5
}

header {
  max-width: none;
  background: linear-gradient(105deg,#172444,#283d6b);
  border: 0;
  box-shadow: 0 4px 16px #111b344d;
  color: #fff;
  padding: 24px max(24px,calc((100vw - 1180px)/2 + 24px)) 22px
}

.brand {
  font-size: 1.65rem;
  font-weight: 950;
  letter-spacing: .075em;
  text-shadow: 0 2px 8px #07102080
}

.brand span {
  color: #9fd4ff
}

header p {
  color: #d6e5ff;
  font-weight: 600
}

.tagline {
  font-size: .76rem;
  letter-spacing: .08em;
  opacity: .82;
  text-transform: uppercase
}

main {
  padding-top: 28px
}

nav {
  gap: 4px;
  overflow: visible;
  padding: 0;
  margin-bottom: -1px;
  position: relative;
  z-index: 1
}

.game-tab {
  --tab-color: #4f8cff;
  border: 1px solid color-mix(in srgb,var(--tab-color) 45%,#a7b5cc);
  border-bottom: 0;
  border-radius: 11px 11px 0 0;
  background: color-mix(in srgb,var(--tab-color) 16%,#edf3fc);
  color: #34425b;
  font-weight: 800;
  padding: 12px 18px;
  box-shadow: none
}

.game-tab:hover {
  background: color-mix(in srgb,var(--tab-color) 27%,#edf3fc);
  color: #17213d
}

.game-tab.active {
  background: #fff;
  color: var(--tab-color);
  box-shadow: inset 0 4px 0 var(--tab-color);
  position: relative
}

.stream-panel {
  background: #ffffffd9;
  border: 1px solid #d8e3f4;
  border-radius: 0 12px 12px 12px;
  box-shadow: 10px 10px 20px #30406050;
  padding: 15px;
  margin-bottom: 18px
}

.filters {
  background: #f8fbff;
  box-shadow: none
}

.card {
  /* box-shadow: 10px 10px 20px #30406050; */
  box-shadow: 0 14px 30px #263c642e
}

.card:hover {
  transform: translateY(-5px);
  /* box-shadow: 10px 10px 20px #30406050; */
  box-shadow: 0 22px 42px #263c6445
}

.card:not(.is-archive) {
  border-color: #e6bb2e;
}

@media(max-width:500px) {
  header {
    padding: 20px 16px
  }

  nav {
    overflow-x: auto
  }

  .game-tab {
    white-space: nowrap;
    padding: 10px 14px
  }

  .stream-panel {
    padding: 16px;
    border-radius: 0 12px 12px 12px
  }

}

footer p {
  margin: 0 0 8px
}

.rights-notices {
  display: grid;
  gap: 3px;
  font-size: .72rem;
  line-height: 1.45
}

.rights-notices p {
  margin: 0
}

.game-carousel {
  display: contents
}

.game-carousel-control {
  display: none
}

.platform-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0
}

.platform-filter legend {
  padding: 0;
  color: var(--muted);
  font-size: .82rem
}

.platform-filter .checkbox {
  padding: 0
}

.platform-filter input {
  flex: 0 0 auto
}

.advanced-filters {
  flex-basis: 100%;
  border-top: 1px solid #d8e3f4;
  padding-top: 12px
}

.advanced-filters summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  color: #34425b;
  font-size: .88rem;
  font-weight: 750;
  list-style: none
}

.advanced-filters summary::-webkit-details-marker {
  display: none
}

.advanced-filters summary::before {
  content: '+';
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1
}

.advanced-filters[open] summary::before {
  content: '−'
}

.advanced-filters summary span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 600
}

.advanced-filter-controls {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-top: 12px
}

.advanced-filter-controls>.checkbox {
  padding: 0
}

@media(max-width:720px) {
  header,main,footer {
    padding-left: 16px;
    padding-right: 16px
  }

  .heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px
  }

  .heading-actions {
    width: 100%
  }

  .heading-actions>* {
    flex: 1;
    text-align: center
  }

  .game-carousel {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr) 40px;
    align-items: stretch;
    gap: 6px;
    margin-bottom: -1px;
    position: relative;
    z-index: 1
  }

  .game-carousel-control {
    display: block;
    border-radius: 0;
    padding: 0;
    background: transparent;
    color: #314766;
    font-size: 1.85rem;
    line-height: 1
  }

  .game-carousel-control:hover {
    background: transparent;
    color: #17213d
  }

  .game-carousel nav {
    display: block;
    overflow: hidden;
    margin: 0;
    padding: 0
  }

  .game-carousel .game-tab {
    display: none;
    width: 100%;
    height: 100%;
    padding: 11px 10px;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    text-overflow: ellipsis
  }

  .game-carousel .game-tab.active {
    display: block
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px
  }

  .filters label,.platform-filter {
    width: 100%
  }

  .filters input:not([type="checkbox"]),.filters select {
    width: 100%;
    min-width: 0
  }

  .advanced-filters {
    padding-top: 10px
  }

  .advanced-filter-controls {
    display: grid;
    gap: 12px;
    padding-top: 12px
  }

  .platform-filter {
    flex-wrap: wrap;
    gap: 8px 14px
  }

  .platform-filter legend {
    width: 100%
  }

  .filters .checkbox {
    padding: 2px 0
  }

  .stream-panel {
    padding: 16px
  }

  .stream-grid {
    grid-template-columns: 1fr;
    gap: 14px
  }

  .card h2 {
    font-size: 1.05rem
  }

  .rights-notices {
    font-size: .7rem
  }

}

@media(max-width:380px) {
  .brand {
    font-size: 1.35rem
  }

  .tagline {
    letter-spacing: .04em
  }

  .heading-actions {
    gap: 8px
  }

  .heading-actions>* {
    padding: 9px 8px
  }

  .advanced-filters summary span {
    display: none
  }

}
