/* The frame around every page: header, latest drops strip and footer.
   All three line their content up with .page, so every left and right edge on the site
   sits on the same two vertical lines. */

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: stretch;
  gap: 32px;
  height: var(--header-height);
  padding-inline: var(--frame-inline);
  background: rgba(18, 16, 17, 0.86);
  border-bottom: var(--border);
  backdrop-filter: blur(12px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white-hot);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo strong {
  color: var(--ember);
  font-weight: 700;
}

.logo-icon {
  width: 38px;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
}

/* Each link is as tall as the header, so the active line sits exactly on the header's edge */
.header-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--ash);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.header-link:hover {
  color: var(--white-hot);
}

.header-link[aria-current="page"] {
  color: var(--white-hot);
}

.header-link[aria-current="page"]::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  background: var(--ember);
  border-radius: 2px 2px 0 0;
}

.account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Every control in the header is the same height */
.account > *,
.wallet > * {
  height: var(--control-height);
}

/* The balance and the Deposit button form one piece: what you have, and how to get more */
.wallet {
  display: flex;
}

.balance {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 9px;
  background: var(--iron);
  border: var(--border);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  color: var(--white-hot);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.account-nav {
  display: flex;
}

.account-nav .header-deposit {
  height: 100%;
  padding: 0 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

#account-signin {
  padding: 0 18px;
}

/* Signed in: the avatar and name are the way to the profile */
.account-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px 0 4px;
  border: var(--border);
  border-radius: var(--radius);
  color: var(--white-hot);
  text-decoration: none;
}

.account-chip:hover,
.account-chip[aria-current="page"] {
  background: var(--surface-control);
  border-color: var(--line-ember);
}

.account-chip .avatar {
  width: 32px;
  height: 32px;
}

.account-name {
  overflow: hidden;
  max-width: 140px;
  font-size: var(--text-sm);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button {
  display: grid;
  place-items: center;
  width: var(--control-height);
  padding: 0;
  background: transparent;
  border: var(--border);
  border-radius: var(--radius);
  color: var(--ash);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--surface-control);
  border-color: var(--line-ember);
  color: var(--white-hot);
}

/* A player's picture. Without their own Steam avatar, the first letter of their name stands in. */
.avatar {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  overflow: hidden;
  width: 40px;
  height: 40px;
  background: radial-gradient(circle at 50% 30%, var(--iron-lighter), var(--iron));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

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

.avatar-initial {
  color: var(--ember-light);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

/* The strip of latest drops under the header */
.drops {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--frame-inline);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.22);
  border-bottom: var(--border);
  /* The oldest drop fades out on the right instead of being cut off */
  -webkit-mask: linear-gradient(90deg, #000 calc(100% - 96px), transparent);
  mask: linear-gradient(90deg, #000 calc(100% - 96px), transparent);
}

/* "Live" with a green dot, and the number of players online under it */
.drops-live {
  display: flex;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  width: 64px;
}

.drops-live-title {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ash);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* The dot says the strip updates by itself */
.drops-live-title::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--success-text);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success-text);
}

.drops-online {
  color: var(--white-hot);
  font-size: var(--text-xs);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.drop {
  position: relative;
  flex: none;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  width: 176px;
  padding: 4px 10px 4px 4px;
  background: linear-gradient(100deg, color-mix(in srgb, var(--rarity, var(--steel)) 22%, var(--iron)), var(--iron) 70%);
  border: var(--border);
  border-left: 2px solid var(--rarity, var(--steel));
  border-radius: var(--radius);
}

.drop-new {
  animation: drop-in 0.4s ease-out;
}

@keyframes drop-in {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

.drop-image {
  grid-row: span 2;
  width: 48px;
  height: 36px;
  object-fit: contain;
}

.drop-name {
  overflow: hidden;
  font-size: var(--text-xs);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.drop .skin-price {
  gap: 4px;
  font-size: var(--text-xs);
}

.drop .coin {
  width: 14px;
  height: 14px;
}

.drop-avatar {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

a.drop {
  color: inherit;
  text-decoration: none;
}

/* The bigger card over a hovered drop (drops.js): where it came from on top, then the skin and the player.
   Fixed on the page, so the strip's edges never cut it. */
.drop-peek {
  position: fixed;
  z-index: 95;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 6px;
  padding: 10px 12px 12px;
  background: linear-gradient(180deg, var(--iron-light), color-mix(in srgb, var(--rarity, var(--steel)) 20%, var(--iron)));
  border: 1px solid var(--line-strong);
  border-bottom: 3px solid var(--rarity, var(--steel));
  border-radius: var(--radius);
  box-shadow: var(--shadow), 0 10px 30px -12px var(--rarity, transparent);
  color: var(--white-hot);
  text-decoration: none;
  animation: drop-peek-in 0.16s var(--ease-out, ease-out);
}

.drop-peek[hidden] {
  display: none;
}

.drop-peek[href]:hover .drop-peek-player-name {
  color: var(--ember-light);
}

@keyframes drop-peek-in {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.drop-peek-source {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: stretch;
  padding-bottom: 6px;
  border-bottom: var(--border);
  color: var(--ash);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.drop-peek-case {
  width: 40px;
  height: 30px;
  object-fit: contain;
}

.drop-peek-source-name {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.3;
}

.drop-peek-image {
  width: 150px;
  height: 104px;
  object-fit: contain;
}

.drop-peek-name {
  max-width: 100%;
  font-size: var(--text-sm);
  font-weight: 600;
  text-align: center;
}

.drop-peek .skin-price {
  gap: 4px;
  font-size: var(--text-sm);
}

.drop-peek .coin {
  width: 16px;
  height: 16px;
}

.drop-peek-player {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ash);
  font-size: var(--text-xs);
}

.drop-peek-player img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

/* Footer */
.site-footer {
  margin-top: auto;
  /* The bottom leaves room for the chat button, so it never covers the last footer line */
  padding: 48px var(--frame-inline) 88px;
  background: rgba(0, 0, 0, 0.25);
  border-top: var(--border);
  color: var(--ash);
  font-size: var(--text-sm);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: var(--border);
}

.footer-brand .logo {
  width: fit-content;
  font-size: 1.1rem;
}

.footer-brand .logo-icon {
  width: 32px;
}

.footer-tagline {
  max-width: 320px;
  margin: 12px 0 20px;
  line-height: 1.5;
  text-wrap: pretty;
}

.footer-heading {
  margin-bottom: 14px;
  color: var(--white-hot);
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a {
  color: var(--ash);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--white-hot);
}

/* Pages and accounts that don't exist yet: they keep their place but can't be clicked */
.is-soon {
  color: var(--ash);
  cursor: default;
  opacity: 0.5;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.social {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: var(--border);
  border-radius: var(--radius);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 20px;
  font-size: var(--text-xs);
}

.footer-bottom p {
  margin: 0;
}

/* The copyright and, under it, the company that runs the site */
.footer-company {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* The support chat button, bottom right on every page (owner, 2026-11-26): a round iron button, the pair of the
   wheel button on the left. It opens the live chat (chat-badge.js) and shows a cross while the chat is open. */
.chat-badge {
  position: fixed;
  right: var(--frame-inline);
  bottom: var(--round-button-bottom);
  z-index: 90;
  display: grid;
  place-items: center;
  width: var(--round-button-size);
  height: var(--round-button-size);
  padding: 0;
  background: var(--surface-control);
  border: 1px solid var(--line-ember);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--ember-light);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out, ease-out), background-color 0.2s, border-color 0.2s;
}

.chat-badge:hover {
  transform: translateY(-2px);
  background: var(--surface-hover);
  border-color: var(--ember);
}

.chat-badge:focus-visible {
  outline: 2px solid var(--ember-light);
  outline-offset: 3px;
}

.chat-badge.is-open {
  border-color: var(--ember);
  background: var(--surface-hover);
}

.chat-badge .icon {
  width: 26px;
  height: 26px;
}

/* tawk.to's own round green button: hidden, our button opens and closes its chat */
#min-widget {
  display: none !important;
}

/* The bonus wheel button, bottom left on every page (owner, 2026-11-24): a round iron button, with an ember dot
   when the daily spin is ready (wheel-badge.js). */
.wheel-badge {
  position: fixed;
  left: var(--frame-inline);
  bottom: var(--round-button-bottom);
  z-index: 90;
  display: grid;
  place-items: center;
  width: var(--round-button-size);
  height: var(--round-button-size);
  background: var(--surface-control);
  border: 1px solid var(--line-ember);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--ember-light);
  transition: transform 0.2s var(--ease-out, ease-out), background-color 0.2s, border-color 0.2s;
}

.wheel-badge:hover {
  transform: translateY(-2px) rotate(-20deg);
  background: var(--surface-hover);
  border-color: var(--ember);
}

.wheel-badge .icon {
  width: 26px;
  height: 26px;
}

.wheel-badge-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--soot);
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px var(--ember);
}

/* "How it works" for newcomers (index and cases, 2026-11-26): three numbered steps in iron cards */
.how-it-works {
  margin: 48px auto 0;
  max-width: 1100px;
  text-align: center;
}

.how-title {
  margin-bottom: 16px;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.how-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-step {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 20px 16px;
  background: var(--surface-control);
  border: var(--border);
  border-radius: var(--radius);
  color: var(--ash);
  font-size: var(--text-sm);
}

.how-step strong {
  color: var(--white-hot);
  font-size: 1rem;
}

.how-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-ember);
  border-radius: 50%;
  color: var(--ember-light);
  font-weight: 800;
}

.how-link {
  display: inline-block;
  margin-top: 12px;
  color: var(--ember-light);
  font-size: var(--text-sm);
}

@media (max-width: 640px) {
  .how-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}
