/* Steam Workshop page (#/steam). All selectors are prefixed with .steam- */

.steam-page [hidden] {
  display: none !important;
}

.steam-subtitle {
  margin: 4px 0 0;
}

.steam-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* ---------- Item card ---------- */

.steam-item {
  overflow: hidden;
}

.steam-skel-img {
  height: 180px;
  border-radius: 10px;
  margin-bottom: 14px;
}

.steam-skel-line {
  height: 18px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.steam-skel-line.short {
  width: 55%;
}

.steam-error {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.steam-banner {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  width: 100%;
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 60%),
    var(--panel-2);
  overflow: hidden;
}

.steam-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.steam-banner.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
}

.steam-watch-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  box-shadow: var(--shadow);
}

.steam-title {
  margin: 0 0 6px;
  font-size: 1.3rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.steam-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.steam-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.steam-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
}

.steam-stat-icon {
  font-size: 1.1rem;
}

.steam-stat .stat-value {
  font-variant-numeric: tabular-nums;
}

.steam-dates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.steam-dates dt {
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.steam-dates dd {
  margin: 2px 0 0;
}

.steam-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.steam-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.steam-last-error {
  margin-top: 8px;
  overflow-wrap: anywhere;
}

/* ---------- Empty / hero ---------- */

.steam-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 28px;
  text-align: center;
}

.steam-hero-icon {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 16%, var(--panel-2));
  font-size: 2.2rem;
}

.steam-hero-title {
  margin: 6px 0 0;
  font-size: 1.2rem;
}

.steam-hero p {
  max-width: 460px;
  margin: 0;
}

.steam-steps {
  counter-reset: steam-step;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 460px;
  margin: 14px 0 0;
  padding: 0;
  text-align: left;
}

.steam-steps li {
  counter-increment: steam-step;
  position: relative;
  padding: 10px 12px 10px 46px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
}

.steam-steps li::before {
  content: counter(steam-step);
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-size: 0.8rem;
  font-weight: 700;
}

/* ---------- Settings form ---------- */

.steam-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.steam-form .field {
  margin: 4px 0 0;
}

.steam-form .switch + .hint {
  margin-top: -4px;
  padding-left: 2px;
}

.steam-form input[name="workshop"] {
  font-family: var(--mono);
  font-size: 0.85rem;
}

.steam-parse.is-ok {
  color: var(--success);
}

.steam-parse.is-bad {
  color: var(--danger);
}

.steam-poll {
  max-width: 220px;
}

.steam-poll input {
  width: 90px;
}

.steam-suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--text-muted);
}

.steam-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 6px;
}

.steam-dirty {
  color: var(--accent);
}

/* ---------- How it works ---------- */

.steam-how-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.5;
}

/* ---------- Responsive ---------- */

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

@media (max-width: 640px) {
  .steam-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steam-dates,
  .steam-how-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .steam-page .page-actions {
    width: 100%;
  }

  .steam-page .page-actions .btn {
    flex: 1;
  }
}
