:root {
  --deep-navy-blue: #0a1a3a;
  --royal-blue: #1e4d8f;
  --electric-blue-glow: #2f80ed;
  --gold-primary: #d4af37;
  --gold-bright: #f2c94c;
  --gold-dark: #8c6b1f;
  --white: #ffffff;
  --light-gray: #d9d9d9;
  --dark-overlay: #050b1a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--white);
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 128, 237, 0.2), transparent 34%),
    radial-gradient(circle at 80% 0%, rgba(212, 175, 55, 0.2), transparent 38%),
    linear-gradient(180deg, var(--deep-navy-blue) 0%, var(--dark-overlay) 100%);
}

.page-shell {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

main {
  width: min(1240px, 92vw);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  display: grid;
  gap: 1.1rem;
}

.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 100vh;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  background:
    linear-gradient(90deg, rgba(5, 11, 26, 0.84) 0%, rgba(5, 11, 26, 0.62) 45%, rgba(5, 11, 26, 0.24) 100%),
    url("assets/Hero.webp") center/cover no-repeat;
  border-top: 1px solid rgba(212, 175, 55, 0.45);
  border-bottom: 1px solid rgba(212, 175, 55, 0.45);
  padding: 2rem 2.2rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.hero-content {
  max-width: 520px;
  color: var(--white);
  z-index: 1;
}

.hero-content h4 {
  color: #f2c14e;
  font-size: 16px;
  letter-spacing: 2px;
  margin: 0 0 12px;
}

.hero-content h1 {
  font-size: clamp(2.3rem, 6vw, 64px);
  font-weight: 900;
  line-height: 1;
  margin: 0 0 20px;
}

.hero-content h1 span {
  display: block;
  color: #f2c14e;
}

.hero-content p {
  font-size: 18px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 30px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
}

.hero-buttons .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 26px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 1px;
  transition: 0.3s ease;
}

.hero-buttons .btn-primary {
  background: #f2c14e;
  color: #000000;
  box-shadow: none;
}

.hero-buttons .btn-primary:hover {
  background: #e0ae3c;
  box-shadow: none;
}

.hero-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  box-shadow: none;
}

.hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

.draw-panel {
  border-radius: 1.1rem;
  border: 1px solid rgba(47, 128, 237, 0.45);
  background: rgba(10, 26, 58, 0.72);
  padding: 1rem 1.1rem;
}

.lc-pool-panel {
  border-radius: 1.1rem;
  border: 1px solid rgba(242, 201, 76, 0.4);
  background: rgba(5, 11, 26, 0.68);
  padding: 0.95rem 1.05rem;
}

.section-title {
  margin: 0 0 0.75rem;
  color: var(--gold-bright);
  font-size: 1.05rem;
  letter-spacing: 0.03em;
}

.lc-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.lc-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(47, 128, 237, 0.55);
  background: rgba(30, 77, 143, 0.42);
  color: var(--white);
  font-size: 0.78rem;
  padding: 0.26rem 0.58rem;
  transition: opacity 220ms ease, filter 220ms ease, transform 220ms ease;
}

.lc-chip.is-drawn {
  opacity: 0.26;
  filter: grayscale(0.2);
  transform: scale(0.96);
}

.lc-fly-chip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  border-radius: 999px;
  border: 1px solid rgba(242, 201, 76, 0.75);
  background: rgba(10, 26, 58, 0.95);
  color: var(--gold-bright);
  padding: 0.28rem 0.62rem;
  font-size: 0.78rem;
  box-shadow: 0 0 16px rgba(242, 201, 76, 0.45);
  transition: transform 620ms cubic-bezier(0.2, 0.84, 0.22, 1), opacity 620ms ease;
}

.draw-status {
  color: var(--white);
  margin-bottom: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn {
  border: 0;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.6rem 1.2rem;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

.btn-primary {
  color: var(--white);
  background: linear-gradient(90deg, var(--royal-blue), var(--electric-blue-glow));
  box-shadow: 0 0 16px rgba(47, 128, 237, 0.35);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(47, 128, 237, 0.6);
}

.btn-secondary {
  color: var(--deep-navy-blue);
  background: linear-gradient(90deg, var(--gold-primary), var(--gold-bright));
  box-shadow: 0 0 16px rgba(242, 201, 76, 0.35);
}

.groups-area {
  margin-top: 0.1rem;
}

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

.group-card {
  background: linear-gradient(155deg, rgba(30, 77, 143, 0.82), rgba(5, 11, 26, 0.95));
  border: 1px solid rgba(212, 175, 55, 0.45);
  border-radius: 1rem;
  padding: 0.85rem;
  min-height: 205px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  animation: cardReveal 780ms cubic-bezier(0.18, 0.82, 0.24, 1) forwards, cardPulse 1400ms ease 820ms 1;
}

.group-card.pending-group {
  display: flex;
  flex-direction: column;
}

.group-title {
  margin: 0 0 0.5rem;
  color: var(--gold-bright);
  font-weight: 800;
  letter-spacing: 0.05em;
}

.group-draw-button {
  width: fit-content;
  margin-top: 0.45rem;
}

.team-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.4rem;
}

.team-item {
  color: var(--white);
  background: rgba(5, 11, 26, 0.65);
  border: 1px solid rgba(140, 107, 31, 0.55);
  border-radius: 0.65rem;
  padding: 0.38rem 0.55rem;
  font-size: 0.93rem;
  opacity: 0;
  transform: translateX(-8px) scale(0.98);
  animation: teamReveal 480ms ease forwards;
}

.team-item.is-shuffling {
  opacity: 1;
  color: var(--light-gray);
  border-color: rgba(47, 128, 237, 0.8);
  text-shadow: 0 0 6px rgba(47, 128, 237, 0.6);
  animation: shuffleGlitch 260ms linear infinite;
}

.team-item.is-active {
  box-shadow: 0 0 0 1px rgba(47, 128, 237, 0.28), 0 0 14px rgba(47, 128, 237, 0.45);
}

.team-item.is-locked {
  opacity: 1;
  color: var(--white);
  border-color: rgba(140, 107, 31, 0.55);
  text-shadow: none;
  animation: lockIn 360ms ease;
}

.hidden {
  display: none;
}

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

@keyframes cardPulse {
  0% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.35);
  }
  45% {
    box-shadow: inset 0 0 0 1px rgba(242, 201, 76, 0.18), 0 0 24px rgba(47, 128, 237, 0.42);
  }
  100% {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 18px rgba(0, 0, 0, 0.35);
  }
}

@keyframes teamReveal {
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes shuffleGlitch {
  0% {
    transform: translateX(-2px) translateY(0) scale(0.985);
    filter: blur(0);
  }
  50% {
    transform: translateX(2px) translateY(-1px) scale(1.01);
    filter: blur(0.4px);
  }
  100% {
    transform: translateX(-1px) translateY(1px) scale(0.992);
    filter: blur(0);
  }
}

@keyframes lockIn {
  0% {
    transform: translateX(0) scale(0.98);
    box-shadow: 0 0 18px rgba(242, 201, 76, 0.55);
  }
  100% {
    transform: translateX(0) scale(1);
    box-shadow: none;
  }
}

@media (max-width: 700px) {
  main {
    width: min(1240px, 95vw);
    padding-top: 1.1rem;
  }

  .hero {
    min-height: 100vh;
    padding: 1.5rem 1.2rem;
    background-position: right center;
  }

  .hero-buttons {
    flex-wrap: wrap;
  }
}

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

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

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