:root {
  --bg-1: #09090d;
  --bg-2: #15161b;
  --panel: rgba(14, 16, 21, 0.94);
  --panel-2: rgba(28, 30, 37, 0.92);
  --ink: #f5f7fb;
  --muted: #aab2c2;
  --line: rgba(255, 255, 255, 0.14);
  --red: #d41d24;
  --red-deep: #7f0d13;
  --gold: #f1b544;
  --steel: #d7dde7;
  --teal: #68cfd0;
  --teal-deep: #2f9ba4;
  --shadow: 0 20px 44px rgba(0, 0, 0, 0.45);
  --panel-shadow: 0 22px 40px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  background:
    radial-gradient(circle at top left, rgba(212, 29, 36, 0.28), transparent 28%),
    radial-gradient(circle at top right, rgba(104, 207, 208, 0.18), transparent 26%),
    linear-gradient(180deg, #050609 0%, #101116 55%, #171922 100%);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Trebuchet MS", "Lucida Grande", "Verdana", sans-serif;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 72px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 72px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 28%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 1px,
      transparent 1px,
      transparent 4px
    );
  opacity: 0.35;
  mix-blend-mode: screen;
}

.page-shell {
  position: relative;
  width: min(1180px, calc(100% - 36px));
  margin: 24px auto 48px;
}

.hero-card,
.panel,
.ticker-bar {
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-card,
.panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 22%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 30%),
    linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}

.hero-card::before,
.panel::before,
.ticker-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(125deg, transparent 0 22%, rgba(255, 255, 255, 0.05) 22.5%, transparent 23%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%);
}

.hero-card::after,
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  clip-path: polygon(10px 10px, calc(100% - 38px) 10px, calc(100% - 10px) 38px, calc(100% - 10px) calc(100% - 10px), 10px calc(100% - 10px));
}

.hero-card {
  padding: 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.58fr);
  gap: 22px;
}

.hero-topline,
.panel-kicker,
.sidecar-kicker,
.session-label,
.ticker-label {
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 12px 7px;
  font-size: 0.92rem;
  line-height: 1;
  color: white;
  background: linear-gradient(180deg, #ff3c44 0%, var(--red) 58%, var(--red-deep) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.hero-channel {
  color: var(--gold);
  font-size: 0.9rem;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand-mark {
  position: relative;
  width: 70px;
  height: 70px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(104, 207, 208, 0.18), rgba(7, 9, 13, 0.36));
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.check-stem,
.check-arm {
  position: absolute;
  background: linear-gradient(180deg, #98eef0 0%, var(--teal) 55%, var(--teal-deep) 100%);
  border-radius: 999px;
  transform-origin: center;
  box-shadow: 0 0 18px rgba(104, 207, 208, 0.24);
}

.check-stem {
  width: 11px;
  height: 28px;
  left: 23px;
  top: 27px;
  transform: rotate(-44deg);
}

.check-arm {
  width: 11px;
  height: 42px;
  left: 37px;
  top: 15px;
  transform: rotate(43deg);
}

.brand-wordmark,
h1,
h2,
.mode-title,
.sidecar-stat,
.panel-stamp {
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.brand-wordmark {
  font-size: clamp(2.9rem, 5.2vw, 5.3rem);
  line-height: 0.88;
  color: var(--teal);
  text-shadow: 0 0 18px rgba(104, 207, 208, 0.2);
}

.brand-star {
  margin-left: auto;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--gold);
}

.hero-copy,
.panel-copy,
.feed-note,
.status-line,
.sidecar-copy,
.mode-copy,
.chip-meta,
.result-meta {
  color: var(--muted);
}

.hero-copy {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 1.03rem;
  line-height: 1.52;
}

.hero-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.mode-card,
.hero-sidecar,
.session-card,
.result-row,
.player-chip,
.empty-chip-list,
input[type="text"],
input[type="search"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 8, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.mode-card,
.hero-sidecar {
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.mode-card {
  padding: 14px 16px 15px;
}

.mode-label {
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  color: var(--gold);
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.mode-title {
  margin-top: 5px;
  font-size: 1.34rem;
  color: white;
}

.mode-copy {
  margin-top: 6px;
  font-size: 0.94rem;
  line-height: 1.45;
}

.hero-sidecar {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(212, 29, 36, 0.16), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 8, 12, 0.86);
}

.hero-avatar {
  width: 108px;
  height: 108px;
  object-fit: cover;
  margin-bottom: 14px;
  border: 3px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 12px 22px rgba(0, 0, 0, 0.35),
    0 0 0 4px rgba(212, 29, 36, 0.18);
  background: #10131a;
}

.sidecar-kicker {
  color: var(--gold);
  font-size: 0.76rem;
}

.sidecar-stat {
  margin-top: 10px;
  font-size: clamp(1.9rem, 4vw, 3.2rem);
  line-height: 0.95;
  color: white;
}

.sidecar-copy {
  margin-top: 12px;
  line-height: 1.5;
  font-size: 0.94rem;
}

.feed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
}

.feed-note {
  display: inline-flex;
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.87rem;
  word-break: break-all;
}

.ticker-bar {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: stretch;
  margin-top: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background:
    linear-gradient(90deg, rgba(212, 29, 36, 0.22), rgba(8, 9, 12, 0.95) 14%, rgba(8, 9, 12, 0.95) 100%);
}

.ticker-label {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: white;
  background: linear-gradient(180deg, #ef2d37 0%, #b0141c 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.9rem;
}

.ticker-window {
  position: relative;
  overflow: hidden;
}

.ticker-track {
  display: inline-flex;
  gap: 34px;
  white-space: nowrap;
  min-width: max-content;
  padding: 12px 18px;
  color: var(--steel);
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: ticker-scroll 22s linear infinite;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.78fr) minmax(0, 1.22fr);
  gap: 20px;
  margin-top: 20px;
}

.panel {
  padding: 24px;
  box-shadow: var(--panel-shadow);
}

.preview-panel {
  margin-top: 20px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.panel-kicker,
.session-label {
  color: var(--gold);
  font-size: 0.72rem;
}

.panel-stamp {
  flex: 0 0 auto;
  padding: 10px 12px 9px;
  font-size: 0.86rem;
  line-height: 1;
  color: #14171d;
  background:
    linear-gradient(180deg, #f7c669 0%, #d9931d 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

h1,
h2 {
  margin: 8px 0 10px;
  line-height: 0.92;
  color: white;
}

h1 {
  font-size: clamp(2.45rem, 4vw, 4rem);
}

h2 {
  font-size: clamp(2rem, 3.2vw, 3.3rem);
}

.panel-copy {
  margin: 0 0 4px;
  line-height: 1.55;
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.search-module {
  min-width: 0;
}

label {
  display: block;
  margin: 0 0 8px;
  color: var(--steel);
  font-size: 0.84rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
}

input[type="text"],
input[type="search"] {
  width: 100%;
  padding: 14px 16px;
  color: white;
  font: inherit;
  outline: none;
  border-radius: 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45);
}

input::placeholder {
  color: #8993a7;
}

input[type="text"]:focus,
input[type="search"]:focus {
  border-color: rgba(104, 207, 208, 0.75);
  box-shadow:
    0 0 0 3px rgba(104, 207, 208, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(0, 0, 0, 0.45);
}

.login-row {
  display: flex;
  gap: 12px;
}

.login-row input {
  flex: 1;
}

.primary-link,
.login-row button,
.ghost-button,
#save-button,
.chip-remove {
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.primary-link,
.login-row button,
#save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: white;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, var(--red) 0%, #821218 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 26px rgba(212, 29, 36, 0.2);
}

.ghost-button,
.chip-remove {
  color: var(--steel);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  cursor: pointer;
}

.primary-link,
.login-row button,
.ghost-button,
#save-button,
.result-row,
.chip-remove {
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.primary-link:hover,
.login-row button:hover,
#save-button:hover,
.ghost-button:hover,
.result-row:hover,
.chip-remove:hover {
  transform: translateY(-1px);
}

.session-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
}

.session-handle {
  margin-top: 3px;
  font-size: 1.08rem;
  font-weight: 700;
}

.results-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  min-height: 78px;
}

.result-row,
.player-chip,
.empty-chip-list {
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}

.result-row {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  color: white;
  cursor: pointer;
}

.result-row:hover {
  border-color: rgba(104, 207, 208, 0.44);
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.22);
}

.result-row.empty-row {
  cursor: default;
}

.result-name,
.chip-name {
  display: block;
  font-weight: 700;
  color: white;
}

.result-meta,
.chip-meta {
  display: block;
  margin-top: 5px;
  font-size: 0.88rem;
}

.selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  color: var(--steel);
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.secondary-header {
  margin-top: 16px;
}

.chip-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.player-chip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
}

.empty-chip-list {
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.status-line {
  margin-top: 14px;
  min-height: 1.5em;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.preview-status {
  margin-top: 10px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.preview-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 8, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 0 100%);
}

.preview-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  padding: 12px 14px 0;
  color: var(--steel);
  font-size: 0.82rem;
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.preview-handle {
  color: var(--gold);
}

.preview-thumb {
  width: calc(100% - 28px);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: 12px 14px 0;
  background: #0f1218;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.preview-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.preview-copy-wrap {
  padding: 14px;
}

.preview-headline {
  color: white;
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  font-size: 1.22rem;
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.preview-body {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.93rem;
}

.preview-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding: 0 14px 14px;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  color: white;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, var(--red) 0%, #821218 100%);
  font-family: "Impact", "Haettenschweiler", "Arial Narrow Bold", sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.preview-link:hover {
  transform: translateY(-1px);
}

.secondary-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.04);
  color: var(--steel);
}

.preview-empty {
  grid-column: 1 / -1;
}

.hidden {
  display: none !important;
}

@keyframes ticker-scroll {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .main-grid,
  .search-grid,
  .preview-grid {
    grid-template-columns: 1fr;
  }

  .hero-sidecar {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100%, calc(100% - 20px));
    margin: 14px auto 28px;
  }

  .hero-card,
  .panel {
    padding: 18px;
  }

  .brand-row,
  .feed-actions,
  .panel-header,
  .selected-header,
  .session-card,
  .player-chip,
  .login-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-star {
    margin-left: 0;
  }

  .primary-link,
  .login-row button,
  .ghost-button,
  #save-button {
    width: 100%;
  }

  .ticker-bar {
    grid-template-columns: 1fr;
  }

  .ticker-label {
    justify-content: flex-start;
  }

  .hero-mode-grid {
    grid-template-columns: 1fr;
  }
}
