/* styles.css */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background-color: #1a7c22;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  background-image: url('grass-bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  overflow-x: hidden;
  padding: calc(0.75rem + env(safe-area-inset-top))
           calc(0.75rem + env(safe-area-inset-right))
           calc(0.75rem + env(safe-area-inset-bottom))
           calc(0.75rem + env(safe-area-inset-left));
}

/* ── Overlay + canvas ────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
  z-index: 0;
}

#particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Page container ──────────────────────────────────────── */
.container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

/* ── "YOU'RE INVITED" tag ────────────────────────────────── */
.invite-tag {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.65rem, 3.2vw, 0.85rem);
  font-weight: 700;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffe066, #ffb300, #fff9c4, #ffb300, #ffe066);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2.2s linear infinite;
  text-shadow: none;
}

/* ── The invite card ─────────────────────────────────────── */
.match-card {
  width: 100%;
  background: rgba(0, 10, 0, 0.58);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 22px;
  border: 1px solid rgba(255, 210, 0, 0.45);
  padding: 1.4rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  box-shadow:
    0 0 0 1px rgba(255, 210, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 0 60px rgba(255, 200, 0, 0.15),
    0 16px 48px rgba(0, 0, 0, 0.65);
}

/* ── Teams row ───────────────────────────────────────────── */
.teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.5rem;
}

.team-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.flag {
  width: clamp(2.8rem, 13vw, 3.8rem);
  height: auto;
  border-radius: 5px;
  display: block;
  box-shadow: 0 2px 10px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.15);
}

.team {
  font-family: 'Cinzel', serif;
  font-size: clamp(1rem, 5.2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.1em;
  color: #fff;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

.vs-badge {
  flex-shrink: 0;
  width: clamp(46px, 12vw, 58px);
  height: clamp(46px, 12vw, 58px);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #e8102a, #8b0000);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel', serif;
  font-size: clamp(0.7rem, 3.2vw, 0.9rem);
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #fff;
  box-shadow:
    0 0 0 3px rgba(207, 8, 31, 0.3),
    0 4px 18px rgba(207, 8, 31, 0.55),
    inset 0 1px 0 rgba(255,255,255,0.2);
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ── Gold divider ────────────────────────────────────────── */
.card-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 210, 0, 0.75);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: 'Cinzel', serif;
}

.card-divider::before,
.card-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 210, 0, 0.55), transparent);
}

.card-divider span {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── Countdown tiles ─────────────────────────────────────── */
.countdown {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
}

.countdown.countdown-complete {
  opacity: 0.35;
}

.unit {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 210, 0, 0.08);
  border: 1px solid rgba(255, 210, 0, 0.35);
  border-radius: 13px;
  padding: 0.7rem 0 0.6rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.value {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 8.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 20px rgba(255, 210, 0, 0.4), 0 2px 8px rgba(0,0,0,0.6);
}

.label {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 210, 0, 0.75);
  margin-top: 0.28rem;
}

/* ── Date line ───────────────────────────────────────────── */
.match-date {
  font-size: clamp(0.68rem, 3.2vw, 0.82rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
  text-shadow: 0 1px 6px rgba(0,0,0,0.6);
}

/* ── Location ────────────────────────────────────────────── */
.location {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.78rem, 3.8vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.6);
  line-height: 1.4;
}

.location-highlight {
  background: linear-gradient(90deg, #ffe066, #ffb300, #fff9c4, #ffb300, #ffe066);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2.2s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

.sparkle {
  display: inline-block;
  -webkit-text-fill-color: #ffe066;
  color: #ffe066;
  animation: sparkle-pulse 1.4s ease-in-out infinite alternate;
  text-shadow:
    0 0 6px #ffe066,
    0 0 14px #ffb300,
    0 0 28px #ff8c00;
}

@keyframes sparkle-pulse {
  from {
    opacity: 0.8;
    transform: scale(0.9);
    text-shadow: 0 0 4px #ffe066, 0 0 10px #ffb300;
  }
  to {
    opacity: 1;
    transform: scale(1.2);
    text-shadow: 0 0 8px #fff9c4, 0 0 20px #ffe066, 0 0 45px #ffb300, 0 0 70px #ff6f00;
  }
}

/* ── Kick off message ────────────────────────────────────── */
.return-message {
  display: none;
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 9vw, 3.2rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow:
    0 2px 16px rgba(0, 0, 0, 0.8),
    0 0 40px rgba(255, 255, 255, 0.25);
}

.return-message.return-message-visible {
  display: block;
}
