:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101114;
  color: #f4f4f5;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #101114;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid #303139;
  background: #17181d;
}

.brand {
  color: #fff;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  text-decoration: none;
}

.twitch-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid #a970ff;
  border-radius: 5px;
  background: #9146ff;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.twitch-login:hover {
  background: #7f35e7;
}

.twitch-mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  background: #fff;
  color: #9146ff;
  font-size: 13px;
  font-weight: 900;
}

.account-controls {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.account-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.account-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-controls form {
  margin: 0;
}

.logout-button {
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #4d4f58;
  border-radius: 4px;
  background: #24252b;
  color: #e6e7ea;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.logout-button:hover {
  border-color: #777a84;
  color: #fff;
}

main {
  min-height: calc(100vh - 68px);
}

.case-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.case-heading {
  margin-bottom: 24px;
}

.case-heading h1 {
  margin: 3px 0 0;
  font-size: clamp(28px, 5vw, 44px);
  line-height: 1.05;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: #8ad8cd;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.trophy-case {
  --shelf-height: 17px;
  overflow: hidden;
  border: 8px solid;
  border-radius: 6px;
}

.trophy-shelf {
  position: relative;
  display: block;
  min-height: 194px;
  padding-bottom: 18px;
}

.shelf-bar {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  height: 17px;
  border-top: 3px solid;
  border-bottom: 4px solid;
}

.shelf-bar::after {
  position: absolute;
  z-index: 3;
  right: 18px;
  bottom: -7px;
  left: 18px;
  height: 7px;
  border-right: 16px solid;
  border-left: 16px solid;
  content: "";
}

.trophy-case > .trophy-case-topbar {
  position: relative;
  inset: auto;
}

.streamer-sign {
  position: absolute;
  z-index: 6;
  top: 4px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: min(280px, calc(100% - 48px));
  min-height: 36px;
  padding: 5px 10px 5px 6px;
  border: 2px solid #777a84;
  border-radius: 4px;
  background: #17181d;
  box-shadow: 0 5px 0 rgb(0 0 0 / 35%);
  color: #fff;
  transform: translateX(-50%);
}

.streamer-sign-logo {
  display: grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  background: #353740;
  color: #bfc2ca;
  font-size: 9px;
  font-weight: 900;
}

.streamer-sign-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trophy-rail {
  position: absolute;
  right: 0;
  bottom: var(--shelf-height);
  left: 0;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  height: 162px;
  padding: 16px 16px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

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

.shelf-style-picker {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.shelf-style-button {
  min-width: 92px;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid #52545d;
  border-radius: 4px;
  background: #202127;
  color: #d6d7dc;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.shelf-style-button:hover {
  border-color: #8ad8cd;
  color: #fff;
}

.shelf-style-button.is-active {
  border-color: #8ad8cd;
  background: #31534f;
  color: #fff;
}

.trophy-rail:focus-visible {
  outline: 2px solid var(--streamer-accent);
  outline-offset: -3px;
}

.trophy {
  position: relative;
  z-index: 4;
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  justify-content: center;
  width: calc(var(--trophy-width, 102px) + 14px);
  height: 142px;
  padding: 8px 7px 0;
  outline: none;
}

.trophy:focus-visible .trophy-mystery {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.trophy-mystery {
  position: relative;
  overflow: hidden;
  align-self: end;
  width: var(--trophy-width, 102px);
  height: var(--trophy-height, 102px);
  border: 1px solid #393939;
  background: #181719;
  image-rendering: pixelated;
}

.trophy-image {
  display: block;
  align-self: flex-end;
  width: var(--trophy-width, 102px);
  height: var(--trophy-height, 102px);
  object-fit: contain;
}

.trophy-mystery::before,
.trophy-mystery::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: "";
  transform: translate(-50%, -50%);
}

.trophy-mystery::before {
  width: 8px;
  height: 8px;
  background: #302d33;
  box-shadow:
    -34px -32px #252328,
    -28px 9px #3b3740,
    -13px -16px #29262c,
    -7px 31px #343039,
    16px -34px #3e3943,
    25px 4px #28252b,
    35px 30px #39353d,
    4px 17px #252328,
    33px -14px #343039;
}

.trophy-mystery::after {
  width: 5px;
  height: 5px;
  background: #45404a;
  box-shadow:
    -36px 29px #45404a,
    -25px -8px #312e35,
    -9px -35px #49434e,
    8px 15px #403b45,
    23px -20px #2e2b31,
    35px 5px #46414b,
    -31px -27px #3c3841,
    30px 34px #49434e;
}

@media (max-width: 480px) {
  .site-header {
    padding-inline: 12px;
  }

  .brand {
    font-size: 21px;
  }

  .twitch-login {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .account-name {
    max-width: 110px;
  }

  .case-page {
    width: min(100% - 20px, 1180px);
    padding-top: 28px;
  }

  .trophy-shelf {
    min-height: 180px;
  }

  .trophy-rail {
    padding-inline: 8px;
  }
}
