:root {
  --bg: #08090d;
  --panel: #0d0e14;
  --panel-2: #101118;
  --panel-3: #14151d;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .12);
  --text: #eeeef2;
  --muted: #858590;
  --muted-2: #5f606b;
  --accent: #8d8d98;
  --accent-bright: #c8c8cf;
  --success: #79d69c;
  --danger: #df7e88;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, .045), transparent 34rem),
    linear-gradient(180deg, #090a0e 0%, #08090d 100%);
  font-size: 14px;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.ambient {
  position: fixed;
  pointer-events: none;
  filter: blur(90px);
  opacity: .13;
}

.ambient-a {
  width: 320px;
  height: 320px;
  top: 20%;
  left: -180px;
  background: #74747f;
}

.ambient-b {
  width: 300px;
  height: 300px;
  right: -160px;
  bottom: 0;
  background: #4b4b55;
}

.brand-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.topbar {
  height: 70px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: rgba(7, 8, 12, .78);
  backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -.03em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid var(--line-strong);
  background: #111219;
  font-size: 12px;
}

.muted-brand {
  color: #777882;
  font-weight: 600;
  margin-left: 2px;
}

.topbar nav {
  display: flex;
  align-items: center;
  gap: 7px;
}

.topbar nav a,
.nav-button {
  border: 0;
  background: transparent;
  color: #888993;
  padding: 9px 12px;
  border-radius: 7px;
  cursor: pointer;
  transition: .18s ease;
}

.topbar nav a:hover,
.topbar nav a.active,
.nav-button:hover {
  color: #eeeef2;
  background: rgba(255, 255, 255, .045);
}

.inline-form {
  display: inline;
}

.auth-shell {
  min-height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 44px 18px;
}

.auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--line-strong);
  background: rgba(13, 14, 20, .83);
  padding: 40px;
  text-align: center;
  box-shadow: 0 22px 80px rgba(0, 0, 0, .28);
}

.discord-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 26px;

  display: grid;
  place-items: center;

  border: 1px solid var(--line-strong);
  background: #101117;

  color: #f2f2f4;
}

.discord-icon svg {
  width: 30px;
  height: 30px;
  display: block;
}

.auth-card h1 {
  margin: 0;
  font-size: 27px;
  line-height: 1.18;
  letter-spacing: -.045em;
}

.auth-card h1 strong {
  font-weight: 800;
}

.subtitle {
  color: #7c7d87;
  line-height: 1.6;
  margin: 13px 0 30px;
}

.primary-button {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 48px;
  padding: 0 20px;
  background: #f1f1f3;
  color: #121319;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}

.primary-button:hover {
  filter: brightness(.93);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

.divider {
  height: 1px;
  background: var(--line);
  margin: 32px 0 24px;
}

.legal {
  color: #64656f;
  font-size: 11px;
  line-height: 1.8;
  margin: 0;
}

.legal strong {
  color: #858690;
}

.secure-note {
  text-align: center;
  color: #4d4e58;
  font-size: 10px;
  letter-spacing: .26em;
  line-height: 1.8;
  margin-top: 25px;
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 55px 0 80px;
}

.app-shell.narrow {
  width: min(980px, calc(100% - 40px));
}

.hero-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 9px;
  color: #5d5e68;
  font-size: 10px;
  letter-spacing: .22em;
  font-weight: 800;
}

.hero-row h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -.05em;
}

.hero-row p:not(.eyebrow) {
  color: var(--muted);
  margin: 10px 0 0;
}

.score-card,
.leaderboard-badge {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 14px 18px;
  min-width: 120px;
}

.score-card span {
  display: block;
  color: #5e5f69;
  font-size: 9px;
  letter-spacing: .18em;
  font-weight: 800;
}

.score-card strong {
  display: block;
  margin-top: 5px;
  font-size: 25px;
}

.leaderboard-badge {
  color: #858690;
  font-size: 10px;
  letter-spacing: .18em;
  text-align: center;
}

.game-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, .85fr);
  gap: 18px;
}

.clip-card,
.rank-panel,
.table-card,
.profile-card,
.stat {
  border: 1px solid var(--line);
  background: rgba(13, 14, 20, .88);
}

.clip-card {
  overflow: hidden;
}

.clip-top {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.pill {
  border: 1px solid var(--line-strong);
  background: #111219;
  padding: 5px 8px;
  font-size: 9px;
  letter-spacing: .14em;
  color: #8b8c96;
  text-transform: uppercase;
}

.clip-number {
  color: #8c8d96;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-wrap {
  aspect-ratio: 16/9;
  background: #050608;
}

.video-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.video-placeholder {
  height: 100%;
  min-height: 260px;
  display: grid;
  place-items: center;
  color: #5f606a;
}

.clip-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 18px 20px;
  gap: 20px;
  border-top: 1px solid var(--line);
}

.clip-meta small,
.stat small,
.profile-points small {
  display: block;
  color: #565761;
  font-size: 9px;
  letter-spacing: .18em;
  font-weight: 800;
  margin-bottom: 6px;
}

.clip-meta strong {
  font-size: 13px;
}

.rank-panel {
  padding: 20px;
}

.panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.03em;
}

.tiny-help {
  color: #5c5d67;
  font-size: 9px;
  line-height: 1.5;
  text-align: right;
}

.rank-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 510px;
  overflow: auto;
  padding-right: 2px;
}

.rank-choice {
  min-width: 0;
  border: 1px solid var(--line);
  background: #0e0f15;
  padding: 9px 5px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #888993;
  transition: .15s ease;
  font-size: 10px;
  text-align: left;
}

.rank-choice img {
  width: 25px;
  height: 25px;
  object-fit: contain;
  flex: 0 0 25px;
}

.rank-choice .rank-fallback {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: none;
  place-items: center;
  border: 1px solid #34353e;
  font-size: 7px;
  color: #8b8c95;
}

.rank-choice:hover {
  border-color: #555661;
  background: #14151c;
  color: #dddde2;
}

.rank-choice.selected {
  border-color: #9999a2;
  background: #191a21;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .05);
}

.wide {
  width: 100%;
  margin-top: 14px;
}

.result {
  margin-top: 10px;
  border: 1px solid var(--line);
  padding: 12px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.result strong {
  font-size: 12px;
}

.result span {
  color: #777882;
  font-size: 11px;
}

.result.success {
  border-color: rgba(121, 214, 156, .22);
  background: rgba(121, 214, 156, .05);
}

.result.error {
  border-color: rgba(223, 126, 136, .22);
  background: rgba(223, 126, 136, .04);
}

.hidden {
  display: none;
}

.table-card {
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 55px 1fr 120px 100px 100px;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
}

.table-head {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  color: #555660;
  font-size: 9px;
  letter-spacing: .17em;
  font-weight: 800;
}

.table-row {
  min-height: 70px;
  border-bottom: 1px solid var(--line);
  color: #9a9ba4;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-row.me {
  background: rgba(255, 255, 255, .025);
}

.place {
  color: #60616b;
  font-weight: 700;
}

.top-place {
  color: #d1d1d7;
}

.player-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.player-cell img {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.player-cell strong,
.player-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-cell strong {
  color: #dedee3;
  font-size: 12px;
}

.player-cell small {
  color: #5e5f69;
  margin-top: 3px;
  font-size: 10px;
}

.points-value {
  color: #eeeef2;
}

.empty-state {
  padding: 50px 20px;
  text-align: center;
  color: #656670;
}

.profile-card {
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 15px;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
}

.profile-info {
  flex: 1;
}

.profile-info h1 {
  margin: 0;
  font-size: 23px;
  letter-spacing: -.04em;
}

.profile-info>span {
  color: #666771;
  font-size: 11px;
}

.profile-points {
  text-align: right;
}

.profile-points strong {
  font-size: 25px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}

.stat {
  padding: 18px;
}

.stat strong {
  font-size: 22px;
}

.section-title {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.section-title h2 {
  margin: 0;
  font-size: 15px;
}

.history-row {
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.history-row:last-child {
  border-bottom: 0;
}

.history-row strong,
.history-row small {
  display: block;
}

.history-row strong {
  font-size: 12px;
}

.history-row small {
  color: #666771;
  margin-top: 4px;
  font-size: 10px;
}

.positive {
  color: var(--success);
  font-weight: 800;
}

.negative {
  color: var(--danger);
  font-weight: 800;
}

@media (max-width: 900px) {
  .game-grid {
    grid-template-columns: 1fr;
  }

  .rank-grid {
    max-height: none;
  }
}

@media (max-width: 650px) {
  .topbar {
    padding: 0 16px;
  }

  .topbar nav a:nth-child(1) {
    display: none;
  }

  .app-shell,
  .app-shell.narrow {
    width: min(100% - 24px, 980px);
    padding-top: 30px;
  }

  .hero-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .score-card {
    width: 100%;
  }

  .auth-card {
    padding: 30px 22px;
  }

  .table-head,
  .table-row {
    grid-template-columns: 34px 1fr 65px;
  }

  .table-head span:nth-child(4),
  .table-head span:nth-child(5),
  .table-row>span:nth-child(4),
  .table-row>span:nth-child(5) {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .profile-card {
    align-items: flex-start;
  }

  .profile-points {
    margin-left: auto;
  }
}

/* ===== Veltrix homepage ===== */
.home-shell{width:min(1180px,calc(100% - 40px));margin:auto;padding:60px 0 45px}
.home-hero{min-height:500px;display:grid;grid-template-columns:1.05fr .95fr;gap:60px;align-items:center;padding:20px 0 65px}
.hero-copy h1{margin:0;font-size:clamp(42px,6vw,70px);line-height:.98;letter-spacing:-.065em}.hero-copy h1 span{color:#777882}
.hero-text{max-width:560px;color:#777882;line-height:1.75;margin:24px 0 28px}.hero-actions{display:flex;gap:9px;flex-wrap:wrap}
.hero-button{min-width:190px;gap:16px}.ghost-button{min-height:48px;display:flex;align-items:center;padding:0 18px;border:1px solid var(--line-strong);background:rgba(255,255,255,.02);color:#8c8d96;border-radius:8px}
.hero-stats{display:flex;gap:35px;margin-top:42px}.hero-stats div{display:flex;flex-direction:column;gap:5px}.hero-stats strong{font-size:16px}.hero-stats span{color:#50515b;font-size:8px;letter-spacing:.16em;font-weight:800}
.hero-preview{border:1px solid var(--line-strong);background:#0c0d12;box-shadow:0 30px 90px #0005;transform:perspective(1200px) rotateY(-3deg)}
.preview-top{height:45px;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid var(--line);color:#555660;font-size:8px;letter-spacing:.17em;font-weight:800}
.preview-live{display:flex;gap:7px;align-items:center}.preview-live i{width:5px;height:5px;border-radius:50%;background:#aaa}
.preview-screen{padding:13px}.preview-video{aspect-ratio:16/9;background:radial-gradient(circle,#202129,#08090d);display:grid;place-items:center}.preview-play{width:56px;height:56px;display:grid;place-items:center;border:1px solid #fff3;background:#fff1;border-radius:50%}
.preview-bottom{display:flex;align-items:center;justify-content:space-between;padding:16px 3px 4px}.preview-bottom small{display:block;color:#50515b;font-size:8px;letter-spacing:.16em;margin-bottom:5px}.preview-bottom strong{font-size:12px}.preview-rank{width:40px;height:40px;border:1px solid var(--line-strong);display:grid;place-items:center;color:#777882;font-weight:800}
.home-section{padding:45px 0;border-top:1px solid var(--line)}.section-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:20px}.section-heading h2{margin:0;font-size:23px;letter-spacing:-.04em}.section-muted{color:#45464f;font-size:9px;letter-spacing:.18em;font-weight:800}
.feature-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:9px}.feature-card{min-height:170px;padding:22px;position:relative;display:flex;flex-direction:column;justify-content:space-between;border:1px solid var(--line);background:#0d0e14cc;transition:.2s}.feature-card:hover{border-color:var(--line-strong);background:#111219;transform:translateY(-2px)}
.feature-icon{width:35px;height:35px;border:1px solid var(--line-strong);display:grid;place-items:center;color:#b7b7bd}.card-label{color:#565761;font-size:8px;letter-spacing:.18em;font-weight:800}.feature-card h3{margin:5px 0 6px;font-size:17px}.feature-card p{margin:0;color:#676872;line-height:1.55;font-size:11px;max-width:260px}.card-arrow{position:absolute;right:20px;top:20px;color:#5c5d67}
.news-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}.news-card{border:1px solid var(--line);background:#0d0e14cc;overflow:hidden}.news-image{height:145px;display:grid;place-items:center;background:linear-gradient(135deg,#15161d,#090a0e);border-bottom:1px solid var(--line)}.news-image span{color:#555660;font-size:20px;letter-spacing:.12em;font-weight:800}.news-content{padding:17px}.news-meta{display:flex;justify-content:space-between;color:#555660;font-size:8px;letter-spacing:.16em;font-weight:800}.news-content h3{margin:11px 0 7px;font-size:14px}.news-content p{margin:0;color:#676872;line-height:1.6;font-size:10px}
.bottom-cta{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:30px 0;display:flex;align-items:center;justify-content:space-between;gap:25px}.bottom-cta h2{margin:0;font-size:24px;letter-spacing:-.04em}.bottom-cta .primary-button{min-width:190px}
.site-footer{width:min(1180px,calc(100% - 40px));margin:auto;padding:25px 0 35px;display:flex;justify-content:space-between;color:#484952;font-size:9px;letter-spacing:.08em;text-transform:uppercase}
@media(max-width:900px){.home-hero{grid-template-columns:1fr;gap:35px}.hero-preview{transform:none}.feature-grid,.news-grid{grid-template-columns:1fr}}
@media(max-width:600px){.home-shell{width:calc(100% - 24px);padding-top:35px}.hero-copy h1{font-size:44px}.hero-stats{gap:17px;flex-wrap:wrap}.bottom-cta{align-items:flex-start;flex-direction:column}.site-footer{width:calc(100% - 24px)}}
