﻿:root {
  --bg-black: #050505;
  --bg-charcoal: #111111;
  --panel-strong: rgba(8, 10, 9, 0.92);
  --panel-soft: rgba(12, 18, 14, 0.74);
  --border: rgba(0, 255, 136, 0.2);
  --border-strong: rgba(0, 255, 136, 0.46);
  --emerald: #00ff88;
  --emerald-soft: #00cc66;
  --text: #cfcfcf;
  --title: #ffffff;
  --shadow-deep: 0 30px 90px rgba(0, 0, 0, 0.54);
  --glow: 0 0 28px rgba(0, 255, 136, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 16%, rgba(0, 255, 136, 0.08), transparent 20%),
    radial-gradient(circle at 82% 4%, rgba(0, 255, 136, 0.08), transparent 22%),
    linear-gradient(180deg, #020202 0%, #050505 34%, #030403 100%);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
}

body::before {
  background:
    radial-gradient(circle at center, rgba(0, 255, 136, 0.06), transparent 24%),
    repeating-radial-gradient(circle at center, rgba(0, 255, 136, 0.06) 0 1px, transparent 1px 34px);
  opacity: 0.18;
  mix-blend-mode: screen;
}

body::after {
  background-image:
    linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
  background-size: 84px 84px;
  opacity: 0.12;
}

.ritual-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  filter: blur(14px);
  background:
    radial-gradient(circle at 50% 12%, rgba(0, 255, 136, 0.12), transparent 18%),
    radial-gradient(circle at 50% 40%, rgba(0, 255, 136, 0.07), transparent 28%);
}

.fog {
  position: fixed;
  inset: auto -10vw;
  height: 34vh;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 255, 186, 0.1), transparent 62%);
  filter: blur(42px);
  pointer-events: none;
  z-index: -1;
  animation: drift 18s ease-in-out infinite alternate;
}

.fog-one {
  bottom: 2vh;
}

.fog-two {
  top: 16vh;
  animation-duration: 24s;
  animation-direction: alternate-reverse;
}

.particle-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.9);
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.72);
  opacity: 0.4;
  animation: particleFloat linear infinite;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1460px, calc(100% - 34px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 17, 17, 0.88), rgba(5, 8, 6, 0.92));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-deep), inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 0 0 1px rgba(0, 255, 136, 0.04);
  backdrop-filter: blur(24px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 90deg, transparent 0deg, rgba(0, 255, 136, 0.08) 120deg, transparent 230deg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.panel:hover::before {
  opacity: 1;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  padding: 42px;
  min-height: auto;
  border-radius: 34px;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(0, 255, 136, 0.13), transparent 26%),
    radial-gradient(circle at 78% 24%, rgba(0, 255, 136, 0.11), transparent 20%);
  pointer-events: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.eyebrow {
  margin: 0;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
}

h1,
h2,
h3,
.group-letter,
.stage-title,
.champion-card .stage-team {
  margin: 0;
  color: var(--title);
  font-family: "Cinzel", serif;
}

h1 {
  font-size: clamp(3rem, 4.8vw, 5.2rem);
  line-height: 0.96;
  text-shadow: 0 0 18px rgba(0, 255, 136, 0.2);
}

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

.hero-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  width: fit-content;
}

.hero-brand::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 8px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.34) 0%, rgba(0, 255, 136, 0.14) 45%, transparent 72%);
  filter: blur(18px);
  opacity: 0.98;
  pointer-events: none;
}

.hero-brand__logo {
  position: relative;
  z-index: 1;
  width: clamp(104px, 8vw, 132px);
  height: auto;
  display: block;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(78%) sepia(95%) saturate(2527%) hue-rotate(90deg) brightness(103%) contrast(106%) drop-shadow(0 0 10px rgba(217, 255, 240, 0.48)) drop-shadow(0 0 22px rgba(0, 255, 136, 0.42)) drop-shadow(0 0 44px rgba(0, 255, 136, 0.24));
}

.hero-brand--compact {
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.hero-brand--compact::before {
  top: 50%;
  left: 6px;
  width: 72px;
  height: 72px;
  transform: translateY(-50%);
}

.hero-brand--compact .hero-brand__logo {
  width: 58px;
}

.hero-text,
.section-copy {
  max-width: 60ch;
  line-height: 1.7;
  color: rgba(207, 207, 207, 0.84);
}

.hero-actions,
.hero-tools {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-button,
.utility-button,
.control-button,
.lock-button {
  border: 1px solid var(--border-strong);
  color: var(--title);
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease, background 220ms ease;
}

.hero-button,
.utility-button,
.lock-button {
  position: relative;
  border-radius: 999px;
  padding: 14px 22px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: transparent;
}

.hero-button:hover,
.utility-button:hover,
.control-button:hover:not(:disabled),
.lock-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow);
  border-color: rgba(0, 255, 136, 0.88);
}

.hero-button.primary,
.lock-button.is-active {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.18), rgba(0, 204, 102, 0.05));
}

.hero-button.ghost,
.utility-button,
.lock-button {
  background: rgba(255, 255, 255, 0.02);
}

.wallet-panel {
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 18, 15, 0.9), rgba(4, 7, 5, 0.86));
}

.wallet-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.wallet-panel-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(207, 207, 207, 0.62);
}

#walletStatusText,
#twitterStatusText {
  display: block;
  color: var(--title);
  font-size: 1rem;
}

.wallet-badge {
  min-width: 118px;
  text-align: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--title);
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.wallet-badge.connected,
.wallet-badge.ready {
  background: rgba(0, 255, 136, 0.12);
  border-color: rgba(0, 255, 136, 0.62);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.14);
}

.wallet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.024);
  border: 1px solid rgba(0, 255, 136, 0.14);
  color: rgba(237, 255, 247, 0.92);
  font-size: 0.9rem;
}

.wallet-chip a {
  color: inherit;
  text-decoration: none;
}

.wallet-chip a:hover {
  text-decoration: underline;
}

.twitter-panel {
  padding: 18px 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(13, 18, 15, 0.9), rgba(4, 7, 5, 0.86));
}

.twitter-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.twitter-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.twitter-field {
  display: grid;
  gap: 10px;
}

.twitter-field-label {
  font-size: 0.8rem;
  color: rgba(207, 207, 207, 0.82);
}

.twitter-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  outline: none;
  background: rgba(255, 255, 255, 0.03);
  color: var(--title);
  font-size: 1rem;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.twitter-input::placeholder {
  color: rgba(207, 207, 207, 0.4);
}

.twitter-input:focus {
  border-color: rgba(0, 255, 136, 0.62);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.1), 0 0 18px rgba(0, 255, 136, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.twitter-confirm-button {
  min-width: 130px;
  min-height: 54px;
}

.twitter-confirm-button:disabled {
  cursor: wait;
  opacity: 0.7;
  transform: none;
}

.twitter-avatar-shell {
  position: relative;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 136, 0.3);
  background: radial-gradient(circle at 30% 30%, rgba(0, 255, 136, 0.24), rgba(255, 255, 255, 0.03) 64%);
  box-shadow: 0 0 22px rgba(0, 255, 136, 0.1);
  overflow: hidden;
}

.twitter-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.twitter-avatar-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--title);
}

.twitter-avatar-placeholder svg {
  width: 28px;
  height: 28px;
  fill: #eafff4;
  filter: drop-shadow(0 0 8px rgba(0, 255, 136, 0.34)) drop-shadow(0 0 18px rgba(0, 255, 136, 0.2));
}

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

.stat-card {
  padding: 16px 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 136, 0.12);
}

.stat-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(207, 207, 207, 0.64);
}

.stat-card strong {
  display: block;
  margin-top: 10px;
  color: var(--title);
  font-size: 1.12rem;
}

.hero-trophy {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 620px;
}

.energy-core {
  position: absolute;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.28) 0%, rgba(0, 255, 136, 0.08) 42%, transparent 74%);
  filter: blur(18px);
  animation: pulse 5.4s ease-in-out infinite;
}

.aura-ring,
.ritual-sigil {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 136, 0.16);
}

.ring-outer {
  width: 520px;
  height: 520px;
  box-shadow: inset 0 0 40px rgba(0, 255, 136, 0.12), 0 0 34px rgba(0, 255, 136, 0.12);
  animation: rotateSlow 18s linear infinite;
}

.ring-middle {
  width: 420px;
  height: 420px;
  border-style: dashed;
  animation: rotateReverse 14s linear infinite;
}

.ring-inner {
  width: 320px;
  height: 320px;
  animation: rotateSlow 12s linear infinite;
}

.ritual-sigil {
  width: 620px;
  height: 620px;
  border-color: rgba(0, 255, 136, 0.08);
}

.sigil-one {
  animation: rotateSlow 28s linear infinite;
}

.sigil-two {
  width: 720px;
  height: 720px;
  border-style: dashed;
  animation: rotateReverse 36s linear infinite;
}

.trophy-svg {
  width: min(100%, 430px);
  max-height: 520px;
  z-index: 2;
  filter: drop-shadow(0 0 36px rgba(0, 255, 136, 0.42));
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  margin: 58px 0 22px;
}

.section-title-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-subtitle {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(0, 255, 136, 0.92);
}

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

.bracket-gate[hidden] {
  display: none !important;
}

.bracket-gate {
  margin-top: 24px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.bracket-generate-button {
  min-width: 220px;
}

.bracket-generate-button.is-generated {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.26), rgba(0, 204, 102, 0.08));
  border-color: rgba(0, 255, 136, 0.96);
  box-shadow: 0 0 28px rgba(0, 255, 136, 0.28);
}

.group-card {
  padding: 18px;
  border-radius: 26px;
  transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.group-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 136, 0.58);
  box-shadow: var(--shadow-deep), 0 0 26px rgba(0, 255, 136, 0.12);
}

.group-card.is-locked {
  border-color: rgba(0, 255, 136, 0.46);
  box-shadow: var(--shadow-deep), 0 0 26px rgba(0, 255, 136, 0.1);
}

.group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.group-letter {
  font-size: 1.46rem;
}

.group-status {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.18);
}

.team-list {
  display: grid;
  gap: 10px;
}

.team-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(0, 255, 136, 0.08);
}

.team-rank {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.16);
  color: var(--title);
  font-weight: 700;
}

.team-main {
  min-width: 0;
}

.team-name {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--title);
  font-weight: 600;
}

.flag-shell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 255, 136, 0.16);
  box-shadow: 0 0 14px rgba(0, 255, 136, 0.08);
}

.flag-shell--group {
  width: 34px;
  height: 34px;
}

.flag-shell--bracket,
.flag-shell--chip {
  width: 28px;
  height: 28px;
}

.flag-shell--champion {
  width: 56px;
  height: 56px;
}

.flag-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flag-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--title);
}

.team-power {
  margin-top: 6px;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(207, 207, 207, 0.52);
}

.team-controls {
  display: flex;
  gap: 8px;
}

.control-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.control-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.control-button--up {
  color: #00ff88;
  border-color: rgba(0, 255, 136, 0.55);
  box-shadow: inset 0 0 18px rgba(0, 255, 136, 0.08);
}

.control-button--up:hover:not(:disabled) {
  background: rgba(0, 255, 136, 0.14);
  border-color: rgba(0, 255, 136, 0.92);
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.32), inset 0 0 18px rgba(0, 255, 136, 0.12);
}

.control-button--down {
  color: #ff4d5e;
  border-color: rgba(255, 77, 94, 0.5);
  box-shadow: inset 0 0 18px rgba(255, 77, 94, 0.08);
}

.control-button--down:hover:not(:disabled) {
  background: rgba(255, 77, 94, 0.12);
  border-color: rgba(255, 99, 114, 0.88);
  box-shadow: 0 0 24px rgba(255, 77, 94, 0.24), inset 0 0 18px rgba(255, 77, 94, 0.1);
}

.control-button:disabled {
  opacity: 0.26;
  cursor: not-allowed;
  box-shadow: none;
}

.group-footer {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.lock-button {
  min-width: 144px;
}

.knockout-heading {
  align-items: stretch;
}

.third-place-panel {
  width: min(420px, 100%);
  padding: 18px;
  border-radius: 24px;
}

.third-place-panel span {
  display: block;
  margin-bottom: 12px;
  color: rgba(207, 207, 207, 0.66);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.third-place-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.third-place-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 255, 136, 0.18);
  background: rgba(0, 255, 136, 0.06);
  color: var(--title);
  font-size: 0.9rem;
}

.bracket-panel {
  padding: 24px;
  border-radius: 32px;
}

.bracket-energy {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 50%, rgba(0, 255, 136, 0.08), transparent 24%),
    radial-gradient(circle at 82% 50%, rgba(0, 255, 136, 0.08), transparent 24%);
  pointer-events: none;
}

.bracket-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(220px, 1fr));
  gap: 18px;
  align-items: start;
}

.stage-column {
  position: relative;
  display: grid;
  gap: 12px;
}

.stage-column::after {
  content: "";
  position: absolute;
  top: 78px;
  right: -9px;
  width: 18px;
  bottom: 24px;
  background: linear-gradient(180deg, transparent, rgba(0, 255, 136, 0.2), transparent);
  opacity: 0.56;
}

.stage-column:last-child::after {
  display: none;
}

.stage-title {
  display: flex;
  align-items: center;
  min-height: 52px;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stage-match,
.champion-card {
  position: relative;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(0, 255, 136, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.stage-match::before,
.champion-card::before {
  content: "";
  position: absolute;
  inset: auto 16px 0 16px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.34), transparent);
}

.stage-label {
  margin-bottom: 12px;
  color: rgba(207, 207, 207, 0.54);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.stage-team {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--title);
  font-weight: 600;
}

.stage-team + .stage-team {
  margin-top: 10px;
}

.stage-team.winner {
  color: #e6fff4;
  text-shadow: 0 0 14px rgba(0, 255, 136, 0.2);
}

.match-divider {
  margin: 10px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 255, 136, 0.18), transparent);
}

.champion-card {
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  text-align: center;
  border-color: rgba(0, 255, 136, 0.24);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.14), inset 0 0 24px rgba(0, 255, 136, 0.05);
}

.champion-sigil {
  width: 92px;
  height: 92px;
  margin: 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(0, 255, 136, 0.32);
  display: grid;
  place-items: center;
  box-shadow: 0 0 24px rgba(0, 255, 136, 0.2), inset 0 0 18px rgba(0, 255, 136, 0.08);
  animation: rotateSlow 16s linear infinite;
}

.site-footer {
  width: min(1460px, calc(100% - 34px));
  margin: 0 auto 28px;
  text-align: center;
  color: rgba(207, 207, 207, 0.7);
  font-size: 0.82rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes rotateReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.08); opacity: 1; }
}

@keyframes particleFloat {
  from {
    transform: translate3d(0, 0, 0) scale(0.6);
    opacity: 0;
  }
  15% {
    opacity: 0.6;
  }
  85% {
    opacity: 0.4;
  }
  to {
    transform: translate3d(var(--drift-x), calc(-1 * var(--travel-y)), 0) scale(1.2);
    opacity: 0;
  }
}

@keyframes drift {
  from { transform: translateX(-4%) translateY(0); }
  to { transform: translateX(4%) translateY(2%); }
}

@media (max-width: 1280px) {
  .groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bracket-grid {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero-trophy {
    min-height: 500px;
  }

  .section-heading,
  .knockout-heading,
  .wallet-panel-head,
  .twitter-panel-head {
    flex-direction: column;
    align-items: start;
  }

  .twitter-panel-body {
    grid-template-columns: 1fr;
  }

  .ritual-stats,
  .groups-grid,
  .bracket-grid {
    grid-template-columns: 1fr;
  }

  .stage-column::after {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .site-footer {
    width: min(100% - 18px, 100%);
  }

  h1 {
    font-size: 2.6rem;
  }

  .hero,
  .group-card,
  .third-place-panel,
  .bracket-panel,
  .wallet-panel,
  .twitter-panel {
    border-radius: 24px;
  }

  .hero-actions,
  .hero-tools,
  .group-footer {
    flex-direction: column;
  }

  .twitter-confirm-button {
    width: 100%;
  }

  .team-row {
    grid-template-columns: 42px 1fr;
  }

  .team-controls {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .lock-button {
    width: 100%;
  }
}


.hero-button.is-connected {
  background: linear-gradient(135deg, rgba(0, 255, 136, 0.2), rgba(0, 204, 102, 0.07));
  box-shadow: 0 0 26px rgba(0, 255, 136, 0.22);
}

@media (max-width: 900px) {
  .bracket-gate {
    flex-direction: column;
    align-items: stretch;
  }

  .bracket-generate-button {
    width: 100%;
  }
}
/* Mobile phone tuning */
@media (max-width: 768px) {
  .page-shell,
  .site-footer {
    width: min(100% - 18px, 100%);
  }

  .page-shell {
    padding: 18px 0 40px;
  }

  .hero {
    padding: 22px 18px;
    gap: 24px;
    border-radius: 26px;
  }

  .hero-copy {
    gap: 16px;
  }

  .hero-brand {
    gap: 14px;
  }

  .hero-brand::before {
    top: 6px;
    left: 4px;
    width: 84px;
    height: 84px;
    filter: blur(14px);
  }

  .hero-brand__logo {
    width: 84px;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3.5rem);
    line-height: 1;
  }

  .wallet-panel,
  .twitter-panel,
  .group-card,
  .stat-card,
  .bracket-gate,
  .hero {
    border-radius: 22px;
  }

  .wallet-panel-head,
  .twitter-panel-head,
  .section-heading,
  .group-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .section-heading {
    margin: 34px 0 18px;
  }

  .section-copy {
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .twitter-panel-body,
  .ritual-stats,
  .groups-grid,
  .bracket-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .hero-tools,
  .wallet-chips,
  .group-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-button,
  .twitter-confirm-button,
  .lock-button,
  .bracket-generate-button {
    width: 100%;
    justify-content: center;
  }

  .twitter-panel {
    padding: 18px;
  }

  .twitter-avatar-shell {
    width: 78px;
    height: 78px;
  }

  .group-card {
    padding: 16px;
  }

  .group-status {
    align-self: flex-start;
  }

  .team-row {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px 12px;
  }

  .team-rank {
    width: 38px;
    height: 38px;
  }

  .team-name {
    gap: 10px;
    font-size: 0.98rem;
  }

  .flag-shell--group {
    width: 32px;
    height: 32px;
  }

  .team-power {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
  }

  .team-controls {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .control-button {
    width: 100%;
  }

  .bracket-gate {
    padding: 18px;
  }
}

@media (max-width: 480px) {
  .eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.18em;
  }

  h1 {
    font-size: clamp(1.9rem, 12vw, 2.7rem);
  }

  .hero,
  .wallet-panel,
  .twitter-panel,
  .group-card,
  .bracket-gate {
    border-radius: 20px;
  }

  .wallet-chip {
    width: 100%;
    justify-content: center;
  }

  .twitter-avatar-shell {
    width: 70px;
    height: 70px;
  }

  .twitter-field-label,
  .section-copy,
  .wallet-panel-label {
    font-size: 0.88rem;
  }

  .team-name {
    font-size: 0.92rem;
  }

  .team-power {
    margin-top: 4px;
    font-size: 0.68rem;
  }
}
