:root {
  color-scheme: dark;
  --bg: #10071f;
  --panel: #1a102b;
  --panel-2: #25163d;
  --line: #4b3672;
  --text: #faf7ff;
  --muted: #b9a9d2;
  --purple: #8b5cf6;
  --violet: #a855f7;
  --lilac: #d8b4fe;
  --mint: #2dd4bf;
  --amber: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 18px 60px rgba(10, 2, 24, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 26% -12%, rgba(168, 85, 247, 0.24), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(139, 92, 246, 0.14), transparent 28rem),
    linear-gradient(145deg, #090414 0%, var(--bg) 48%, #180d2c 100%);
  color: var(--text);
}

html {
  -webkit-text-size-adjust: 100%;
}

button,
input,
select {
  font: inherit;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

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

.mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.52));
  animation: markPulse 3.6s ease-in-out infinite;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.brand h1 {
  font-size: 1.25rem;
  letter-spacing: 0;
}

.brand p,
.muted {
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(26, 16, 43, 0.78);
}

.nav button,
.ghost,
.primary,
.locked {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  color: var(--text);
}

.nav button {
  padding: 0 14px;
  background: transparent;
  color: var(--muted);
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.nav button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.nav button.active {
  background: #38225f;
  color: var(--text);
}

.primary {
  padding: 0 16px;
  background: linear-gradient(135deg, var(--violet), var(--purple));
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 10px 28px rgba(139, 92, 246, 0.22);
  transition:
    box-shadow 180ms ease,
    transform 180ms ease,
    filter 180ms ease;
}

.primary:hover {
  box-shadow: 0 16px 36px rgba(139, 92, 246, 0.34);
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.primary:active {
  transform: translateY(0) scale(0.98);
}

.locked {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(75, 54, 114, 0.42);
  color: var(--muted);
  cursor: not-allowed;
}

.ghost {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(26, 16, 43, 0.6);
  transition:
    border-color 180ms ease,
    background 180ms ease,
    transform 180ms ease;
}

.ghost:hover {
  border-color: rgba(216, 180, 254, 0.62);
  background: rgba(55, 34, 95, 0.72);
  transform: translateY(-1px);
}

.public-link {
  display: inline-flex;
  justify-content: center;
  margin-top: 14px;
  color: var(--lilac);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.login-panel .public-link {
  width: 100%;
}

.public-link:hover {
  color: var(--text);
}

.login {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: #090414;
  perspective: 1200px;
  isolation: isolate;
}

.public-register {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 24px;
}

.public-shell {
  width: min(820px, 100%);
}

.public-shell > .public-link {
  margin: 0 0 14px;
}

.back-public-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 14px;
  text-decoration: none;
}

.public-card {
  width: 100%;
}

.login::before {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 4, 20, 0.86), rgba(40, 6, 54, 0.42)),
    repeating-linear-gradient(90deg, rgba(216, 180, 254, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(216, 180, 254, 0.042) 0 1px, transparent 1px 72px),
    radial-gradient(circle at 22% 18%, rgba(216, 180, 254, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(16, 7, 31, 0.16), rgba(16, 7, 31, 0.58));
  content: "";
  pointer-events: none;
  animation: techGridDrift 18s linear infinite;
  z-index: 1;
}

.login::after {
  position: absolute;
  inset: -8%;
  background: url("/zubet-login-bg.png") center / cover no-repeat;
  content: "";
  filter: saturate(1.12) contrast(1.05);
  pointer-events: none;
  transform: translate3d(0, 0, -80px) rotateX(0deg) rotateY(0deg) scale(1.08);
  transform-origin: center;
  animation: loginBgDrift 14s ease-in-out infinite alternate;
  will-change: transform;
  z-index: 0;
}

.tech-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.tech-layer::before,
.tech-layer::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.tech-layer::before {
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(216, 180, 254, 0.18) 49%, transparent 52%);
  opacity: 0.22;
  transform: translateY(-100%);
  animation: scanLine 5.8s ease-in-out infinite;
}

.tech-layer::after {
  width: 44vmin;
  height: 44vmin;
  right: 8%;
  top: 12%;
  border: 1px solid rgba(216, 180, 254, 0.18);
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(216, 180, 254, 0.16), transparent 32%),
    conic-gradient(from 90deg, transparent, rgba(168, 85, 247, 0.18), transparent 34%, rgba(45, 212, 191, 0.16), transparent 68%);
  filter: blur(0.2px);
  opacity: 0.48;
  animation: orbitalSpin 18s linear infinite;
}

.tech-layer span {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lilac);
  box-shadow: 0 0 18px rgba(216, 180, 254, 0.72);
  opacity: 0.68;
  animation: particleFloat 8s ease-in-out infinite;
}

.tech-layer span:nth-child(1) {
  left: 18%;
  top: 28%;
}

.tech-layer span:nth-child(2) {
  left: 76%;
  top: 62%;
  animation-delay: -2.4s;
}

.tech-layer span:nth-child(3) {
  left: 58%;
  top: 22%;
  animation-delay: -4.6s;
}

.login-panel {
  width: min(560px, 100%);
  padding: 42px 40px;
  border: 1px solid rgba(216, 84, 255, 0.78);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 0%, rgba(154, 44, 255, 0.22), transparent 22rem),
    linear-gradient(180deg, rgba(16, 7, 28, 0.92), rgba(8, 5, 17, 0.9));
  backdrop-filter: blur(18px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 0 32px rgba(192, 38, 255, 0.36),
    0 30px 80px rgba(4, 0, 10, 0.62);
  animation: cardEnter 420ms ease both;
  position: relative;
  z-index: 1;
}

.login-logo {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.login-logo strong {
  color: #ffffff;
  font-size: clamp(2.6rem, 8vw, 4.1rem);
  font-weight: 950;
  font-style: italic;
  letter-spacing: 0;
  line-height: 0.88;
  text-shadow: 0 0 26px rgba(168, 85, 247, 0.42);
}

.login-logo strong span {
  color: #8b1fff;
}

.login-logo small {
  color: rgba(250, 247, 255, 0.62);
  font-size: 0.82rem;
  letter-spacing: 0.42em;
}

.crown {
  position: relative;
  width: 38px;
  height: 20px;
  border-bottom: 6px solid var(--purple);
  filter: drop-shadow(0 0 12px rgba(168, 85, 247, 0.58));
}

.crown::before {
  position: absolute;
  inset: 0;
  content: "";
  clip-path: polygon(0 92%, 14% 24%, 38% 62%, 50% 0, 62% 62%, 86% 24%, 100% 92%);
  background: linear-gradient(135deg, #6d18ff, #c026ff);
}

.login-copy {
  margin-bottom: 28px;
  text-align: center;
}

.login-panel h1 {
  font-size: 1.72rem;
  text-align: center;
}

.login-panel p {
  margin: 8px 0 0;
  color: rgba(250, 247, 255, 0.66);
  line-height: 1.5;
  text-align: center;
}

.login-field {
  position: relative;
}

.login-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.login-field input {
  height: 70px;
  padding: 0 18px 0 66px;
  border-color: rgba(185, 169, 210, 0.34);
  border-radius: 10px;
  background: rgba(10, 5, 23, 0.66);
  color: var(--text);
  font-size: 1.08rem;
  text-align: left;
}

.login-field.has-pin input {
  padding: 0 66px;
  text-align: center;
}

.login-field input::placeholder {
  color: rgba(250, 247, 255, 0.48);
}

.login-svg-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  width: 26px;
  height: 26px;
  color: #a855f7;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
  transform: translateY(-50%);
}

.login-icon {
  position: absolute;
  left: 28px;
  top: 50%;
  width: 16px;
  height: 16px;
  border: 2px solid #a855f7;
  border-radius: 50%;
  pointer-events: none;
  transform: translateY(-82%);
}

.login-icon::after {
  position: absolute;
  left: 50%;
  bottom: -16px;
  width: 30px;
  height: 16px;
  border: 2px solid #a855f7;
  border-radius: 16px 16px 0 0;
  border-bottom: 0;
  content: "";
  transform: translateX(-50%);
}

.login-icon.pin-icon {
  left: 28px;
  width: 25px;
  height: 25px;
  border: 0;
  border-radius: 0;
  background: #a855f7;
  transform: translateY(-50%);
  mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='3' y='11' width='18' height='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.login-icon.pin-icon::after {
  display: none;
}

.back-login {
  width: 100%;
  margin-top: 12px;
  color: rgba(250, 247, 255, 0.7);
}

.login-panel .primary {
  width: 100%;
  min-height: 70px;
  margin-top: 28px;
  border: 1px solid rgba(246, 214, 255, 0.38);
  border-radius: 10px;
  font-size: 1.22rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow:
    0 0 22px rgba(216, 84, 255, 0.48),
    0 16px 34px rgba(139, 92, 246, 0.28);
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: rgba(250, 247, 255, 0.58);
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  height: 1px;
  background: rgba(185, 169, 210, 0.22);
  content: "";
}

.register-cta {
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 0;
  border: 1px solid rgba(185, 169, 210, 0.3);
  border-radius: 10px;
  background: rgba(10, 5, 23, 0.5);
  color: rgba(250, 247, 255, 0.78);
  font-size: 1rem;
}

.register-cta strong {
  display: inline-block;
  margin-left: 8px;
  color: #bd5cff;
}

.field {
  display: grid;
  gap: 8px;
}

.field label,
.field span {
  color: var(--muted);
  font-size: 0.9rem;
}

.field input,
.field select,
.score input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #140b24;
  color: var(--text);
  outline: 0;
  text-align: center;
}

.field select {
  padding: 0 12px;
  text-align: left;
}

.field input:focus,
.field select:focus,
.score input:focus {
  border-color: var(--lilac);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.18);
}

.error {
  margin-top: 12px;
  color: var(--danger);
  min-height: 22px;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.stat,
.group,
.general-card,
.rule-card,
.ranking {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(26, 16, 43, 0.86);
  box-shadow: var(--shadow);
  animation: cardEnter 460ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: calc(var(--enter-index, 0) * 55ms);
  transition:
    border-color 180ms ease,
    box-shadow 220ms ease,
    transform 220ms ease,
    background 220ms ease;
  will-change: transform;
}

.stat:hover,
.group:hover,
.general-card:hover,
.rule-card:hover,
.ranking:hover {
  border-color: rgba(216, 180, 254, 0.58);
  background: rgba(34, 20, 57, 0.9);
  box-shadow: 0 22px 68px rgba(10, 2, 24, 0.48);
  transform: translateY(-3px);
}

.stat {
  padding: 16px;
}

.stat:nth-child(1) {
  --enter-index: 0;
}

.stat:nth-child(2) {
  --enter-index: 1;
}

.stat:nth-child(3) {
  --enter-index: 2;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.6rem;
}

.groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.phase-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(26, 16, 43, 0.78);
}

.phase-tabs button {
  min-width: 72px;
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.phase-tabs button:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.phase-tabs button.active {
  background: #38225f;
  color: var(--text);
}

.group {
  overflow: hidden;
}

.general-card {
  overflow: hidden;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.general-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px 18px;
}

.general-actions .save-state {
  width: auto;
}

.admin-users {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.admin-user-list table {
  min-width: 1420px;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.86rem;
}

.crud-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 14px;
}

.crud-actions a {
  text-decoration: none;
}

.danger-action {
  color: var(--danger);
}

.form-note {
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.45;
}

.pin-admin {
  display: grid;
  grid-template-columns: auto 72px auto auto;
  align-items: center;
  gap: 8px;
  min-width: 360px;
}

.pin-admin input {
  width: 72px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #140b24;
  color: var(--text);
  text-align: center;
}

.pin-admin small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.admin-picks {
  margin-bottom: 18px;
}

.admin-pick-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(75, 54, 114, 0.72);
}

.admin-pick-summary div {
  display: grid;
  gap: 6px;
}

.admin-pick-summary span {
  color: var(--muted);
  line-height: 1.45;
}

.admin-pick-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
}

.admin-pick-list {
  border-width: 1px 0 0;
  border-radius: 0;
  box-shadow: none;
}

.admin-pick-list table {
  min-width: 760px;
}

.logs-card {
  overflow: hidden;
}

.log-view {
  min-height: 440px;
  max-height: 68vh;
  margin: 0;
  padding: 18px;
  overflow: auto;
  background: rgba(5, 2, 12, 0.76);
  color: #e9ddff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

button:disabled:hover {
  transform: none;
}

.rules {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.rule-card {
  padding: 18px;
}

.rule-card h2 {
  margin-bottom: 12px;
}

.rule-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.45;
}

.rule-card strong {
  color: var(--text);
}

.other-scorer {
  display: none;
}

.other-scorer.visible {
  display: grid;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(37, 22, 61, 0.88);
  position: relative;
  overflow: hidden;
}

.group-head::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(216, 180, 254, 0.08), transparent);
  content: "";
  opacity: 0;
  transform: translateX(-30%);
  transition:
    opacity 220ms ease,
    transform 520ms ease;
}

.group:hover .group-head::after {
  opacity: 1;
  transform: translateX(30%);
}

.badge {
  color: var(--lilac);
  font-weight: 800;
}

.pending-badge {
  color: var(--amber);
}

.match {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 92px 92px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(75, 54, 114, 0.72);
  animation: rowEnter 360ms ease both;
  animation-delay: calc(var(--enter-index, 0) * 35ms + 120ms);
  transition:
    background 160ms ease,
    transform 180ms ease;
}

.match:hover {
  background: rgba(216, 180, 254, 0.045);
  transform: translateX(3px);
}

.match:last-child {
  border-bottom: 0;
}

.teams {
  display: grid;
  gap: 4px;
}

.teams strong {
  font-size: 0.98rem;
}

.meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.score {
  display: grid;
  grid-template-columns: 48px 12px 48px;
  align-items: center;
  gap: 8px;
}

.score input {
  height: 38px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.score input:hover:not(:disabled) {
  border-color: rgba(216, 180, 254, 0.62);
  transform: translateY(-1px);
}

.score input:disabled {
  border-color: rgba(45, 212, 191, 0.3);
  background: rgba(18, 32, 41, 0.82);
  color: var(--mint);
}

.save-state {
  width: 92px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.ranking {
  overflow: hidden;
}

.ranking {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

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

th {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

td.points {
  color: var(--mint);
  font-weight: 900;
}

tbody tr {
  animation: rowEnter 360ms ease both;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

tbody tr:hover {
  background: rgba(216, 180, 254, 0.045);
}

.empty {
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .shell {
    width: min(100% - 24px, 720px);
    padding: 18px 0 34px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
  }

  .brand {
    align-items: center;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .nav button {
    min-width: 0;
    padding: 0 10px;
    white-space: nowrap;
  }

  .summary,
  .groups,
  .general-grid,
  .rules {
    grid-template-columns: 1fr;
  }

  .summary {
    gap: 10px;
  }

  .match {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .match .teams {
    grid-column: 1 / -1;
  }

  .score {
    width: 132px;
  }

  .match .primary,
  .match .locked {
    width: 100%;
    min-width: 92px;
  }

  .save-state {
    grid-column: 1 / -1;
    width: auto;
    text-align: left;
  }

  .general-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .crud-actions {
    flex-direction: column;
  }

  .general-actions .primary,
  .general-actions .locked,
  .crud-actions .primary,
  .crud-actions .ghost {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 18px, 430px);
    padding-top: 12px;
  }

  .login {
    align-items: center;
    padding: 18px;
    background-position: center top;
  }

  .login-panel {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .login-panel h1 {
    font-size: 1.42rem;
  }

  .login-panel p {
    font-size: 0.94rem;
  }

  .login-logo {
    margin-bottom: 22px;
  }

  .login-logo small {
    font-size: 0.68rem;
    letter-spacing: 0.24em;
  }

  .login-field input,
  .login-panel .primary {
    min-height: 56px;
    height: 56px;
  }

  .register-cta {
    min-height: 56px;
    padding: 0 12px;
    text-align: center;
  }

  .mark {
    width: 40px;
    height: 40px;
  }

  .brand h1 {
    font-size: 1.12rem;
  }

  .brand p {
    font-size: 0.86rem;
  }

  .nav {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }

  .nav button,
  .ghost,
  .primary,
  .locked {
    min-height: 42px;
    font-size: 0.92rem;
  }

  .stat {
    padding: 14px;
  }

  .stat strong {
    font-size: 1.42rem;
  }

  .group-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    padding: 14px;
  }

  .group-head h2 {
    font-size: 1.05rem;
  }

  .match {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .match:hover {
    transform: none;
  }

  .teams strong {
    font-size: 0.96rem;
    line-height: 1.35;
  }

  .meta {
    font-size: 0.8rem;
    line-height: 1.35;
  }

  .score {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr);
  }

  .score input {
    min-width: 0;
    height: 44px;
  }

  .match .primary,
  .match .locked {
    width: 100%;
  }

  .ranking {
    border-radius: 8px;
  }

  th,
  td {
    padding: 12px;
    font-size: 0.9rem;
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rowEnter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

@keyframes markPulse {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(168, 85, 247, 0);
  }

  50% {
    box-shadow: 0 0 28px rgba(168, 85, 247, 0.28);
  }
}

@keyframes loginBgDrift {
  0% {
    transform: translate3d(-2.2%, -1.4%, -90px) rotateX(1.6deg) rotateY(-3deg) scale(1.1);
  }

  50% {
    transform: translate3d(1.2%, 1%, -55px) rotateX(-1deg) rotateY(2.4deg) scale(1.15);
  }

  100% {
    transform: translate3d(2.4%, -0.8%, -80px) rotateX(1.1deg) rotateY(3.2deg) scale(1.11);
  }
}

@keyframes techGridDrift {
  from {
    background-position:
      0 0,
      0 0,
      0 0,
      0 0,
      0 0;
  }

  to {
    background-position:
      0 0,
      72px 0,
      0 72px,
      0 0,
      0 0;
  }
}

@keyframes scanLine {
  0%,
  12% {
    transform: translateY(-110%);
  }

  55%,
  100% {
    transform: translateY(110%);
  }
}

@keyframes orbitalSpin {
  from {
    transform: rotate(0deg) scale(1);
  }

  to {
    transform: rotate(360deg) scale(1.04);
  }
}

@keyframes particleFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  50% {
    transform: translate3d(24px, -18px, 0) scale(1.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }

  .login::after {
    transform: scale(1.08) !important;
  }
}
