:root {
  --bg: #08131a;
  --bg-soft: #102633;
  --panel: rgba(7, 20, 27, 0.76);
  --panel-strong: rgba(10, 26, 35, 0.92);
  --line: rgba(165, 216, 255, 0.14);
  --text: #eff7fb;
  --muted: #9fbcc8;
  --accent: #ff9f43;
  --accent-2: #2ec4b6;
  --accent-3: #7be495;
  --danger: #ef6f6c;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 159, 67, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(46, 196, 182, 0.22), transparent 32%),
    linear-gradient(135deg, #071017 0%, #0f2330 54%, #08131a 100%);
  overflow-x: hidden;
}

.page-shell {
  position: relative;
  min-height: 100vh;
  padding: 32px;
}

.ambient {
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.65;
  pointer-events: none;
}

.ambient-one {
  width: 240px;
  height: 240px;
  top: 40px;
  right: 8%;
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.5), rgba(239, 111, 108, 0.15));
  animation: floatOne 9s ease-in-out infinite;
}

.ambient-two {
  width: 300px;
  height: 300px;
  bottom: 6%;
  left: 5%;
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.45), rgba(123, 228, 149, 0.1));
  animation: floatTwo 11s ease-in-out infinite;
}

.hero,
.rankings-card,
.queue-card {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(260px, 0.8fr);
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.8rem;
  color: var(--accent-3);
}

.hero h1 {
  margin: 0;
  max-width: 12ch;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.5rem, 4vw, 4.8rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 58ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}

.hero-meta {
  display: grid;
  gap: 16px;
}

.metric-card {
  padding: 18px;
  border-radius: 22px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.metric-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.metric-card strong {
  font-size: 1.2rem;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.7fr);
  gap: 24px;
  margin-top: 24px;
}

.rankings-card,
.queue-card {
  border-radius: 28px;
  padding: 24px;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.tab-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.tab-button:hover,
.tab-button.active {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.28), rgba(46, 196, 182, 0.28));
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
}

.table-wrap {
  position: relative;
  overflow-x: auto;
}

.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table th,
.ranking-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.ranking-table th {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ranking-table tbody tr {
  opacity: 0;
  transform: translateY(8px);
  animation: rowEnter 0.45s ease forwards;
}

.ranking-table tbody tr:nth-child(2) { animation-delay: 0.04s; }
.ranking-table tbody tr:nth-child(3) { animation-delay: 0.08s; }
.ranking-table tbody tr:nth-child(4) { animation-delay: 0.12s; }
.ranking-table tbody tr:nth-child(5) { animation-delay: 0.16s; }
.ranking-table tbody tr:nth-child(6) { animation-delay: 0.2s; }

.place-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  min-height: 34px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.32), rgba(46, 196, 182, 0.32));
  font-weight: 700;
}

.player-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-cell span,
.queue-copy,
.queue-meta,
.queue-active,
.muted,
.empty-state {
  color: var(--muted);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
}

.queue-list {
  display: grid;
  gap: 14px;
}

.queue-item {
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.queue-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.queue-status.open {
  background: rgba(123, 228, 149, 0.12);
  color: var(--accent-3);
}

.queue-status.closed {
  background: rgba(239, 111, 108, 0.12);
  color: #ff9d9a;
}

.queue-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.queue-active {
  margin-top: 14px;
  line-height: 1.5;
}

.empty-state {
  padding: 28px 8px 8px;
}

.hidden {
  display: none;
}

@keyframes floatOne {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

@keyframes floatTwo {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(20px, -18px, 0); }
}

@keyframes rowEnter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .page-shell {
    padding: 18px;
  }

  .hero,
  .dashboard-layout {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    max-width: none;
  }
}
