/* Match mobile AppDarkBackground + dark UI surfaces (theme.ts, settings screens). */
:root {
  --bg: #020305;
  --surface: #1e1e24;
  --surface-elevated: #25252d;
  --text: #ecedee;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --border: #3f3d4d;
  --max: 44rem;
  --legal-max: 48rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.site-header-inner {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-link:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-link img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.9375rem;
}

.site-nav a {
  color: var(--muted);
}

.site-nav a:hover {
  color: var(--text);
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3rem;
}

main.legal {
  max-width: var(--legal-max);
}

.hero {
  text-align: center;
  padding: 1rem 0 2rem;
  overflow: visible;
}

.hero img {
  width: 112px;
  height: 112px;
  border-radius: 24px;
  margin-bottom: 1.25rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
}

.hero .lead {
  margin: 1.5rem auto 0;
  max-width: 28rem;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* Full-bleed demo match ticker + activity pings (landing page only) */
.match-marquee-stage {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  margin: 1.25rem calc(50% - 50vw) 0;
  min-height: 7rem;
  overflow: visible;
}

.match-activity-layer {
  position: absolute;
  top: -0.65rem;
  right: -1.5rem;
  bottom: -0.65rem;
  left: -1.5rem;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.match-activity-ping {
  position: absolute;
  left: 50%;
  top: 50%;
  --ping-rotate: 0deg;
  transform: translate(-50%, 10px) scale(0.92) rotate(var(--ping-rotate));
  opacity: 0;
  padding: 0.55rem 1rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(30, 30, 36, 0.94);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  max-width: min(20rem, 92vw);
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.match-activity-ping--comment {
  border-color: rgba(59, 130, 246, 0.45);
}

.match-activity-ping--photo {
  border-color: rgba(168, 85, 247, 0.4);
}

.match-activity-ping--score {
  border-color: rgba(74, 222, 128, 0.45);
}

.match-activity-ping.is-active {
  animation: match-activity-ping 2.75s ease-out forwards;
}

@keyframes match-activity-ping {
  0% {
    opacity: 0;
    transform: translate(-50%, 14px) scale(0.88) rotate(var(--ping-rotate));
  }
  14% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1) rotate(var(--ping-rotate));
  }
  62% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1) rotate(var(--ping-rotate));
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -18px) scale(0.94) rotate(var(--ping-rotate));
  }
}

.match-marquee {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow: hidden;
}

.match-marquee-viewport {
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 8%,
    #000 92%,
    transparent 100%
  );
}

.match-marquee-track {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  padding: 0.25rem 0.5rem 0.5rem;
  /* Animation starts in JS after cards mount (.is-ready) */
  animation: none;
  transform: translateX(0);
}

.match-marquee-track.is-ready {
  animation: match-marquee-scroll 45s linear infinite;
  -webkit-animation: match-marquee-scroll 45s linear infinite;
  will-change: transform;
}

@keyframes match-marquee-scroll {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(var(--marquee-end, -50%), 0, 0);
  }
}

@-webkit-keyframes match-marquee-scroll {
  from {
    -webkit-transform: translate3d(0, 0, 0);
  }
  to {
    -webkit-transform: translate3d(var(--marquee-end, -50%), 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .match-marquee-track,
  .match-marquee-track.is-ready {
    animation: none;
    -webkit-animation: none;
    will-change: auto;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    max-width: 42rem;
    margin: 0 auto;
  }

  .match-marquee-viewport {
    mask-image: none;
    -webkit-mask-image: none;
  }

  .match-activity-ping.is-active {
    animation-duration: 4.5s;
  }
}

.demo-match-card {
  flex: 0 0 auto;
  width: 17.5rem;
  padding: 0.875rem 1rem;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-align: left;
  line-height: 1.35;
}

.demo-match-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.demo-match-sport {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.demo-match-badge {
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
}

.demo-match-badge--live {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.12);
}

.demo-match-badge--final {
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
}

.demo-match-badge--upcoming {
  color: var(--accent-hover);
  background: rgba(59, 130, 246, 0.15);
}

.demo-match-title {
  margin: 0 0 0.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
}

.demo-match-teams {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.demo-match-meta {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.features {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.875rem;
  text-align: left;
}

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

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.125rem 0;
}

.feature-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-top: 0.1rem;
  color: var(--accent);
}

.feature-icon svg {
  width: 1.5rem;
  height: 1.5rem;
}

.feature-copy {
  flex: 1;
  min-width: 0;
  font-size: 0.9375rem;
  color: var(--muted);
  line-height: 1.5;
}

.features strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
  color: var(--text);
}

.cta-note {
  margin-top: 2rem;
  padding: 1rem 1.125rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 0.9375rem;
  text-align: center;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 0.75rem;
}

.legal h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.legal .effective {
  color: var(--muted);
  font-size: 0.9375rem;
  margin: 0 0 2rem;
}

.legal h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.125rem;
}

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

.legal ul {
  padding-left: 1.25rem;
}

.legal li {
  margin-bottom: 0.5rem;
}
