.sc-overlay {
  --sc-accent: 156, 93, 255;
  --sc-accent-2: 69, 194, 255;
  position: fixed;
  inset: 0;
  z-index: 112;
  display: grid;
  place-items: center;
  box-sizing: border-box;
  overflow: hidden;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
  background: rgba(1, 4, 12, 0.85);
  backdrop-filter: blur(9px) saturate(0.8);
  -webkit-backdrop-filter: blur(9px) saturate(0.8);
  font-family: 'Inter', sans-serif;
  contain: strict;
  transform: translateZ(0);
}

.sc-overlay--referee { --sc-accent: 255, 197, 52; --sc-accent-2: 255, 74, 72; }
.sc-overlay--fans { --sc-accent: 60, 234, 151; --sc-accent-2: 255, 204, 56; }
.sc-overlay--pitch { --sc-accent: 69, 185, 135; --sc-accent-2: 112, 168, 255; }
.sc-overlay--var { --sc-accent: 95, 202, 255; --sc-accent-2: 166, 95, 255; }
.sc-overlay--supporters { --sc-accent: 255, 197, 52; --sc-accent-2: 60, 234, 195; }
.sc-overlay--storm { --sc-accent: 84, 166, 255; --sc-accent-2: 169, 220, 255; }
.sc-overlay--tactical_break { --sc-accent: 80, 214, 129; --sc-accent-2: 255, 185, 64; }
.sc-overlay--pitch_invader { --sc-accent: 255, 91, 64; --sc-accent-2: 255, 197, 52; }
.sc-overlay--reset { --sc-accent: 69, 223, 255; --sc-accent-2: 95, 133, 255; }
.sc-overlay--bus { --sc-accent: 74, 148, 255; --sc-accent-2: 255, 197, 52; }

.sc-atmosphere {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 18%, rgba(var(--sc-accent), 0.2), transparent 30%),
    linear-gradient(180deg, rgba(2, 9, 20, 0.12), rgba(1, 5, 12, 0.78));
}

.sc-atmosphere::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, 0.62) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(var(--sc-accent-2), 0.52) 0 1px, transparent 1.5px);
  background-position: 8% 16%, 5% 28%;
  background-size: 33px 29px, 47px 41px;
  opacity: 0.17;
  mask-image: linear-gradient(#000, transparent 66%);
}

.sc-atmosphere__beam {
  position: absolute;
  top: -17%;
  width: 28%;
  height: 85%;
  background: linear-gradient(180deg, rgba(var(--sc-accent), 0.24), transparent 77%);
  filter: blur(8px);
}

.sc-atmosphere__beam--left { left: -3%; transform: rotate(-19deg); }
.sc-atmosphere__beam--right { right: -3%; transform: rotate(19deg); }

.sc-atmosphere__field {
  position: absolute;
  left: -18%;
  right: -18%;
  bottom: -12%;
  height: 42%;
  border-top: 1px solid rgba(102, 255, 177, 0.15);
  background:
    linear-gradient(rgba(32, 145, 93, 0.15), rgba(2, 31, 24, 0.24)),
    repeating-linear-gradient(90deg, transparent 0 12%, rgba(255, 255, 255, 0.022) 12.3% 12.7%);
  transform: perspective(310px) rotateX(56deg);
  transform-origin: bottom;
}

.sc-stage {
  position: relative;
  width: min(390px, 100%);
  max-height: calc(100dvh - max(24px, env(safe-area-inset-top)) - max(24px, env(safe-area-inset-bottom)));
  box-sizing: border-box;
  overflow: hidden auto;
  scrollbar-width: none;
  padding: 16px 18px 18px;
  border: 1px solid rgba(var(--sc-accent), 0.65);
  border-radius: 25px;
  background:
    radial-gradient(circle at 50% 22%, rgba(var(--sc-accent), 0.13), transparent 31%),
    linear-gradient(155deg, rgba(11, 22, 42, 0.98), rgba(2, 7, 17, 0.99) 75%);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.055) inset,
    0 0 38px rgba(var(--sc-accent), 0.22),
    0 24px 76px rgba(0, 0, 0, 0.84);
  text-align: center;
  animation: scStageIn 0.46s cubic-bezier(0.16, 1, 0.3, 1) both;
  isolation: isolate;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.sc-stage::-webkit-scrollbar { display: none; }

.sc-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(116deg, transparent 34%, rgba(255, 255, 255, 0.045) 34.3% 35%, transparent 35.3%),
    repeating-linear-gradient(135deg, transparent 0 34px, rgba(var(--sc-accent), 0.03) 35px 36px);
  pointer-events: none;
}

.sc-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sc-header strong {
  flex: 0 0 auto;
  color: #ffd65d;
  font-family: 'Bangers', cursive;
  font-size: 17px;
  font-weight: 400;
  letter-spacing: 2.3px;
  line-height: 1;
  text-transform: uppercase;
  text-shadow: 0 0 15px rgba(255, 202, 55, 0.44);
}

.sc-header__line {
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, transparent, rgba(var(--sc-accent), 0.76));
}

.sc-header__line--right {
  background: linear-gradient(90deg, rgba(var(--sc-accent), 0.76), transparent);
}

.sc-card-scene {
  position: relative;
  display: grid;
  place-items: center;
  height: 267px;
  margin-top: 2px;
  perspective: 900px;
}

.sc-card-scene__halo {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--sc-accent), 0.32), rgba(var(--sc-accent-2), 0.08) 48%, transparent 69%);
  filter: blur(5px);
  animation: scHalo 2.4s ease-in-out infinite;
}

.sc-card-scene__ring {
  position: absolute;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(var(--sc-accent), 0.34);
  border-radius: 50%;
  box-shadow: 0 0 29px rgba(var(--sc-accent), 0.13) inset;
  animation: scRing 7s linear infinite;
}

.sc-card-scene__ring::before,
.sc-card-scene__ring::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  border-radius: inherit;
}

.sc-card-scene__ring::after {
  inset: 28px;
  border-color: rgba(var(--sc-accent-2), 0.26);
}

.sc-event-card {
  position: relative;
  z-index: 2;
  width: 142px;
  height: 202px;
  transform-style: preserve-3d;
  animation: scCardReveal 0.9s cubic-bezier(0.12, 0.76, 0.2, 1.2) both, scCardFloat 3.4s ease-in-out 0.9s infinite;
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.58)) drop-shadow(0 0 19px rgba(var(--sc-accent), 0.5));
  will-change: transform;
  backface-visibility: hidden;
}

html.is-native-android .sc-overlay {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

html.is-native-android .sc-event-card {
  filter: none;
  border-radius: 16px;
  box-shadow:
    0 18px 20px rgba(0, 0, 0, 0.58),
    0 0 20px rgba(var(--sc-accent), 0.5);
}

.sc-event-card__frame {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  border: 2px solid rgba(228, 241, 255, 0.75);
  border-radius: 16px;
  padding: 14px 11px 13px;
  background:
    linear-gradient(145deg, rgba(var(--sc-accent), 0.28), transparent 38%),
    linear-gradient(155deg, #102746, #071221 63%, #030913);
  box-shadow:
    0 0 0 3px rgba(var(--sc-accent), 0.22) inset,
    0 0 18px rgba(var(--sc-accent), 0.35) inset;
}

.sc-event-card__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.sc-event-card__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(1, 7, 17, 0.56), transparent 28%),
    linear-gradient(0deg, rgba(1, 7, 17, 0.92), transparent 44%),
    linear-gradient(145deg, rgba(var(--sc-accent), 0.18), transparent 42%);
  pointer-events: none;
}

.sc-event-card__frame::before {
  animation: scArtPulse 2.8s ease-in-out infinite;
}

.sc-event-card__frame::after {
  content: '';
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 11px;
  pointer-events: none;
}

.sc-event-card__kicker,
.sc-event-card strong,
.sc-event-card__number {
  position: relative;
  z-index: 2;
}

.sc-event-card__kicker {
  color: rgba(255, 255, 255, 0.72);
  font-size: 7px;
  font-weight: 1000;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.sc-event-card strong {
  grid-row: 3;
  align-self: end;
  padding: 0 3px;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 1.2px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.72), 0 0 12px rgba(var(--sc-accent), 0.62);
  text-transform: uppercase;
}

.sc-event-card__number {
  position: absolute;
  z-index: 2;
  right: 12px;
  top: 29px;
  color: rgba(255, 255, 255, 0.19);
  font-family: 'Bangers', cursive;
  font-size: 25px;
  letter-spacing: 1px;
}

.sc-copy {
  position: relative;
  display: grid;
  justify-items: center;
  margin-top: -3px;
}

.sc-copy__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgb(var(--sc-accent));
  font-size: 8px;
  font-weight: 1000;
  letter-spacing: 2px;
}

.sc-copy h2 {
  margin: 4px 0 7px;
  color: #fff;
  font-family: 'Bangers', cursive;
  font-size: clamp(31px, 10vw, 43px);
  font-weight: 400;
  letter-spacing: 1.5px;
  line-height: 0.96;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.7), 0 0 22px rgba(var(--sc-accent), 0.48);
  text-transform: uppercase;
}

.sc-copy p {
  max-width: 325px;
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.42;
}

.sc-btn {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 49px;
  box-sizing: border-box;
  margin-top: 16px;
  border: 1px solid rgba(255, 234, 158, 0.9);
  border-radius: 12px;
  padding: 9px 15px;
  color: #211400;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.42), transparent 20% 76%, rgba(255, 255, 255, 0.2)),
    linear-gradient(180deg, #ffdd69, #eea600);
  box-shadow: 0 0 23px rgba(255, 188, 31, 0.31), inset 0 1px 0 rgba(255, 255, 255, 0.74);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sc-btn span {
  font-family: 'Bangers', cursive;
  font-size: 20px;
  letter-spacing: 1.4px;
  text-align: center;
  text-transform: uppercase;
}

.sc-btn i {
  font-family: Arial, sans-serif;
  font-size: 28px;
  font-style: normal;
  line-height: 0.5;
}

.sc-btn:active { transform: scale(0.98); filter: brightness(0.92); }

@keyframes scStageIn {
  from { opacity: 0; transform: translateY(25px) scale(0.91); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes scCardReveal {
  0% { opacity: 0; transform: translateY(40px) rotateY(-110deg) rotateZ(-8deg) scale(0.58); }
  58% { opacity: 1; transform: translateY(-5px) rotateY(8deg) rotateZ(2deg) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) rotateY(0) rotateZ(-2deg) scale(1); }
}

@keyframes scCardFloat {
  0%, 100% { transform: translateY(0) rotateZ(-2deg); }
  50% { transform: translateY(-7px) rotateZ(1deg); }
}

@keyframes scHalo {
  0%, 100% { opacity: 0.65; transform: scale(0.93); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes scRing { to { transform: rotate(360deg); } }
@keyframes scArtPulse {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 1; }
}

@media (max-height: 700px) {
  .sc-stage { padding-block: 12px 14px; }
  .sc-card-scene { height: 212px; }
  .sc-card-scene__halo { width: 190px; height: 190px; }
  .sc-card-scene__ring { width: 158px; height: 158px; }
  .sc-event-card { width: 112px; height: 160px; }
  .sc-event-card strong { font-size: 15px; }
  .sc-event-card__number { font-size: 20px; }
  .sc-copy h2 { font-size: 31px; }
  .sc-copy p { font-size: 10px; line-height: 1.32; }
  .sc-btn { min-height: 44px; margin-top: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-stage,
  .sc-event-card,
  .sc-card-scene__halo,
  .sc-card-scene__ring,
  .sc-event-card__frame::before {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
}
