/* MATCHCUP 26 — Motion & modern UI layer (ui-ux-pro-max guidelines) */

:root {
  --motion-fast: 180ms;
  --motion-base: 260ms;
  --motion-slow: 480ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══ Animated ambient background ═══ */
body.matchcup26 {
  position: relative;
  isolation: isolate;
}

body.matchcup26::before,
body.matchcup26::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
  z-index: -1;
  animation: wc26-orb-drift 18s ease-in-out infinite alternate;
}

body.matchcup26::before {
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(0, 70, 173, 0.35) 0%, transparent 70%);
}

body.matchcup26::after {
  width: min(440px, 60vw);
  height: min(440px, 60vw);
  bottom: -100px;
  left: -60px;
  background: radial-gradient(circle, rgba(0, 166, 81, 0.28) 0%, transparent 70%);
  animation-delay: -6s;
  animation-duration: 22s;
}

@keyframes wc26-orb-drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(24px, 18px) scale(1.08); }
}

/* ═══ Header polish ═══ */
body.matchcup26 .site-header {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.matchcup26 .wc26-host-strip {
  background-size: 200% 100%;
  animation: wc26-strip-flow 6s linear infinite;
}

@keyframes wc26-strip-flow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

body.matchcup26 .nav-mark {
  transition: transform var(--motion-base) var(--ease-spring);
}

body.matchcup26 .nav-brand:hover .nav-mark {
  transform: rotate(-6deg) scale(1.06);
}

body.matchcup26 .nav-links {
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.matchcup26 .nav-item {
  position: relative;
  transition:
    color var(--motion-fast) ease,
    background var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-out);
}

body.matchcup26 .nav-item:active {
  transform: scale(0.96);
}

body.matchcup26 .nav-item.active {
  animation: wc26-nav-pop var(--motion-base) var(--ease-spring);
}

@keyframes wc26-nav-pop {
  0% { transform: scale(0.92); }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

body.matchcup26 .wc-matchday-bar {
  position: relative;
  overflow: hidden;
}

body.matchcup26 .wc-banner-flags img {
  transition: transform var(--motion-base) var(--ease-spring), box-shadow var(--motion-fast);
}

body.matchcup26 .wc-banner-flags img:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

/* ═══ Page enter ═══ */
body.matchcup26 .app-content {
  animation: wc26-page-in var(--motion-slow) var(--ease-out) both;
}

@keyframes wc26-page-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ Cards & surfaces ═══ */
body.matchcup26 .card,
body.matchcup26 .metric,
body.matchcup26 .auth-card,
body.matchcup26 .match-card,
body.matchcup26 .schedule-item,
body.matchcup26 .group-scan-panel {
  transition:
    transform var(--motion-base) var(--ease-out),
    box-shadow var(--motion-base) var(--ease-out),
    border-color var(--motion-fast) ease;
}

body.matchcup26 .card:hover,
body.matchcup26 .metric:hover,
body.matchcup26 .auth-card:hover,
body.matchcup26 .match-card:hover,
body.matchcup26 .schedule-item:hover {
  transform: translateY(-3px);
}

body.matchcup26 .reveal-on-scroll {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--motion-slow) var(--ease-out),
    transform var(--motion-slow) var(--ease-out);
}

body.matchcup26 .reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

body.matchcup26 .reveal-stagger > * {
  opacity: 0;
  transform: translateY(14px);
  animation: wc26-stagger-in var(--motion-slow) var(--ease-out) forwards;
}

body.matchcup26 .reveal-stagger > *:nth-child(1) { animation-delay: 0.05s; }
body.matchcup26 .reveal-stagger > *:nth-child(2) { animation-delay: 0.1s; }
body.matchcup26 .reveal-stagger > *:nth-child(3) { animation-delay: 0.15s; }
body.matchcup26 .reveal-stagger > *:nth-child(4) { animation-delay: 0.2s; }
body.matchcup26 .reveal-stagger > *:nth-child(5) { animation-delay: 0.25s; }
body.matchcup26 .reveal-stagger > *:nth-child(6) { animation-delay: 0.3s; }

@keyframes wc26-stagger-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth glow */
body.matchcup26 .auth-page {
  position: relative;
}

body.matchcup26 .auth-card {
  animation: wc26-auth-in 0.65s var(--ease-out) both;
  box-shadow:
    var(--wc26-shadow-lg),
    0 0 0 1px rgba(0, 70, 173, 0.06),
    0 24px 60px rgba(0, 70, 173, 0.12);
}

@keyframes wc26-auth-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* ═══ Buttons ═══ */
body.matchcup26 .btn {
  position: relative;
  overflow: hidden;
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) ease,
    background var(--motion-fast) ease;
  min-height: 44px;
  touch-action: manipulation;
}

body.matchcup26 .btn:active {
  transform: scale(0.97);
}

body.matchcup26 .btn-primary::after,
body.matchcup26 .btn-green::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 40%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 60%
  );
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}

body.matchcup26 .btn-primary:hover::after,
body.matchcup26 .btn-green:hover::after {
  transform: translateX(120%);
}

body.matchcup26 .form-input,
body.matchcup26 select.form-input {
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-fast) var(--ease-out);
}

body.matchcup26 .form-input:focus {
  transform: translateY(-1px);
}

body.matchcup26 .auth-hint.is-ok {
  color: #047857;
  transition: color var(--motion-fast) ease;
}

/* ═══ Metrics pulse ═══ */
body.matchcup26 .metric-val {
  display: inline-block;
  animation: wc26-metric-in 0.7s var(--ease-out) both;
}

@keyframes wc26-metric-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ═══ Schedule upcoming glow ═══ */
body.matchcup26 .schedule-upcoming {
  box-shadow: 0 4px 20px rgba(0, 166, 81, 0.12);
}

body.matchcup26 .schedule-upcoming:hover {
  box-shadow: 0 8px 28px rgba(0, 166, 81, 0.2);
}

/* ═══ Tables ═══ */
body.matchcup26 .card table tbody tr {
  transition: background var(--motion-fast) ease, transform var(--motion-fast) ease;
}

body.matchcup26 .card table tbody tr:hover {
  transform: scale(1.005);
}

/* ═══ Badges ═══ */
body.matchcup26 .badge-green,
body.matchcup26 .badge-amber,
body.matchcup26 .badge-red {
  transition: transform var(--motion-fast) var(--ease-spring);
}

body.matchcup26 tr:hover .badge-green,
body.matchcup26 tr:hover .badge-amber,
body.matchcup26 tr:hover .badge-red {
  transform: scale(1.04);
}

/* ═══ Footer ═══ */
body.matchcup26 .site-footer {
  position: relative;
}

body.matchcup26 .site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(201, 162, 39, 0.5),
    transparent
  );
}

body.matchcup26 .footer-logo {
  animation: wc26-logo-pulse 4s ease-in-out infinite;
}

@keyframes wc26-logo-pulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* ═══ Focus (a11y) ═══ */
body.matchcup26 a:focus-visible,
body.matchcup26 button:focus-visible,
body.matchcup26 .form-input:focus-visible {
  outline: 2px solid var(--wc26-blue);
  outline-offset: 2px;
}

/* ═══ Reduced motion ═══ */
@media (prefers-reduced-motion: reduce) {
  body.matchcup26::before,
  body.matchcup26::after,
  body.matchcup26 .wc26-host-strip,
  body.matchcup26 .footer-logo {
    animation: none;
  }

  body.matchcup26 .app-content,
  body.matchcup26 .auth-card,
  body.matchcup26 .reveal-stagger > *,
  body.matchcup26 .metric-val,
  body.matchcup26 .nav-item.active {
    animation: none;
    opacity: 1;
    transform: none;
  }

  body.matchcup26 .reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body.matchcup26 .card:hover,
  body.matchcup26 .metric:hover,
  body.matchcup26 .schedule-item:hover {
    transform: none;
  }
}
