* { box-sizing: border-box; }
:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #000;
  color: #ff2b2b;
  font-synthesis: none;
}
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #000;
}
button { font: inherit; }
.screen {
  position: relative;
  display: flex;
  min-height: 100vh;
  width: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 88px 24px 36px;
  text-align: center;
}
.auth-area { position: absolute; top: 24px; right: 24px; }
.title {
  margin: 0;
  color: #e60000;
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-style: italic;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  -webkit-text-stroke: 1px #ff2b2b;
  text-shadow: 0 0 18px rgb(255 0 0 / 55%), 0 0 60px rgb(255 0 0 / 25%);
  animation: title-in 1.1s ease-out both;
}
.buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 64px;
  animation: fade-in .8s ease-out .45s both;
}
.btn {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border: 2px solid #ff2b2b;
  border-radius: 6px;
  background: transparent;
  color: #ff2b2b;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn:hover, .btn:focus-visible {
  outline: none;
  background: #ff2b2b;
  color: #000;
  box-shadow: 0 0 26px rgb(255 0 0 / 55%);
  transform: translateY(-2px);
}
.btn:active { transform: scale(.98); }
.btn-small { min-height: 42px; padding: 9px 16px; font-size: .8rem; }
.content-view { width: min(1100px, 100%); margin-top: 36px; }
[hidden] { display: none !important; }
.section-title {
  margin: 0 0 20px;
  color: #ff2b2b;
  font-size: clamp(1.35rem, 4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgb(255 0 0 / 35%);
}
.section-hint { color: #ffb5b5; line-height: 1.6; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid #3d0a0a; border-radius: 6px; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 13px 15px; border-bottom: 1px solid #3d0a0a; white-space: nowrap; }
th { background: rgb(255 0 0 / 8%); font-size: .82rem; letter-spacing: .08em; text-transform: uppercase; }
tbody tr:hover { background: rgb(255 0 0 / 5%); }
td { color: #ffc0c0; }
.steam-link { color: #ff6b6b; text-decoration: underline; text-underline-offset: 3px; }
.back-button { margin-top: 28px; }
.footer { margin-top: auto; padding-top: 48px; color: #5c1717; font-size: .7rem; letter-spacing: .35em; }
@keyframes title-in { from { opacity: 0; transform: scale(.86); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 640px) {
  .screen { padding: 88px 14px 28px; }
  .auth-area { top: 16px; right: 14px; }
  .buttons { flex-direction: column; width: min(100%, 360px); gap: 14px; margin-top: 44px; }
  .btn { width: 100%; padding-inline: 16px; font-size: .85rem; }
  .btn-small { width: auto; }
  th, td { padding: 11px 12px; font-size: .85rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

.auth-dialog {
  width: min(440px, calc(100% - 28px));
  padding: 28px;
  border: 1px solid #ff2b2b;
  border-radius: 8px;
  background: #090000;
  color: #ffc0c0;
  box-shadow: 0 0 38px rgb(255 0 0 / 25%);
}
.auth-dialog::backdrop { background: rgb(0 0 0 / 82%); backdrop-filter: blur(3px); }
.auth-dialog .section-title { font-size: 1.25rem; }
.field-label { display: block; margin: 22px 0 8px; color: #ffb5b5; text-align: left; }
.auth-input {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid #8c2020; border-radius: 5px;
  background: #130606; color: #fff; font: inherit;
}
.auth-input:focus-visible { outline: 2px solid #ff2b2b; outline-offset: 2px; }
.form-message { min-height: 1.4em; color: #ff7777; text-align: left; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.dialog-actions .btn { flex: 1; }
.btn:disabled { cursor: wait; opacity: .55; transform: none; }
.btn-muted { border-color: #6c3434; color: #c68b8b; }

.editor-toolbar { display: flex; justify-content: flex-end; margin: 18px 0; }
.steam-format { display: block; color: #ffbaba; font-size: .78rem; line-height: 1.6; }
.steam-format-row { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 2px 0; }
.steam-copy-button {
  padding: 3px 7px;
  border: 1px solid #713030;
  border-radius: 4px;
  background: #160707;
  color: #ff9a9a;
  cursor: pointer;
  font-size: .68rem;
  line-height: 1.35;
}
.steam-copy-button:hover, .steam-copy-button:focus-visible {
  outline: none;
  border-color: #ff2b2b;
  background: #3a0909;
  color: #fff;
}
.steam-copy-button:focus-visible { outline: 1px solid #ff2b2b; outline-offset: 2px; }
.editable-cell { cursor: pointer; text-decoration: underline dotted #9f3333; text-underline-offset: 4px; }
.editable-cell:hover, .editable-cell:focus-visible { outline: 1px solid #ff2b2b; outline-offset: -3px; background: rgb(255 0 0 / 9%); }
.btn-danger { min-height: 34px; padding: 6px 10px; border-color: #8d2525; color: #ff8585; font-size: .72rem; }
.btn-danger:hover, .btn-danger:focus-visible { background: #8d2525; color: #fff; }
#member-dialog .field-label { margin-top: 14px; }
#member-dialog .auth-input { min-height: 42px; }
@media (max-width: 640px) {
  .editor-toolbar { justify-content: stretch; }
  .editor-toolbar .btn { width: 100%; }
}

.warnings-list { max-height: 280px; overflow-y: auto; margin: 12px 0 18px; text-align: left; }
.warning-item { padding: 14px 0; border-bottom: 1px solid #4a1717; }
.warning-reason { margin: 0 0 8px; color: #ffd0d0; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.warning-meta { margin: 0 0 8px; color: #a76b6b; font-size: .8rem; }
.warning-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
#warning-form textarea.auth-input { min-height: 92px; resize: vertical; }
#warning-form[hidden] { display: none; }

.lookup-form { display: grid; gap: 12px; width: min(620px, 100%); margin: 24px auto; text-align: left; }
.lookup-form .btn { justify-self: start; }
.lookup-result { width: min(760px, 100%); margin: 20px auto; text-align: left; }
.lookup-card { padding: 22px; border: 1px solid #4a1717; border-radius: 8px; background: #080303; }
.lookup-name { margin: 0 0 12px; color: #ff5555; font-size: 1.4rem; }
.lookup-ids { color: #e6baba; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.7; }
.lookup-count { color: #ff8585; font-weight: 700; }
.lookup-warnings { padding-left: 22px; }
.lookup-warnings li { margin: 12px 0; color: #ffd0d0; line-height: 1.5; }
.lookup-warnings small { display: block; margin-top: 4px; color: #a76b6b; }

.cell-editor { display: grid; min-width: 150px; gap: 8px; white-space: normal; }
.cell-editor-input {
  width: 100%; min-width: 120px; min-height: 36px; padding: 7px 9px;
  border: 1px solid #ff2b2b; border-radius: 4px;
  background: #130606; color: #fff; font: inherit; font-size: .85rem;
  text-decoration: none;
}
.cell-editor-input:focus-visible { outline: 2px solid #ff7777; outline-offset: 2px; }
.cell-editor-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.cell-editor-actions button {
  padding: 5px 8px; border: 1px solid #8c2020; border-radius: 4px;
  background: #190606; color: #ffc0c0; cursor: pointer; font-size: .72rem;
}
.cell-editor-actions .cell-editor-save { border-color: #d22; background: #5b0909; color: #fff; }
.cell-editor-actions button:hover, .cell-editor-actions button:focus-visible { border-color: #ff7777; outline: none; }
.cell-editor-actions button:disabled { cursor: wait; opacity: .55; }
.editable-cell.is-editing { min-width: 190px; background: rgb(255 0 0 / 8%); text-decoration: none; }
