/* ==========================================================================
   ELISEE SCOUT — SEASON WRAPPED (CSS)
   Recap virale di fine stagione in stile Spotify Wrapped & Card OVR FIFA
   Supporto 21 Profili Ecosistema Club · Formato Story 9:16 (1080x1920)
   ========================================================================== */

:root {
  --sw-bg-dark: #050810;
  --sw-card-glass: rgba(15, 23, 42, 0.72);
  --sw-card-border: rgba(255, 255, 255, 0.12);
  --sw-text-main: #f8fafc;
  --sw-text-muted: #94a3b8;
  --sw-accent: #38bdf8;
  --sw-gold: #f59e0b;
}

/* --------------------------------------------------------------------------
   Banner Entry Point (Home & Dashboard)
   -------------------------------------------------------------------------- */
.sw-launch-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.22) 0%, rgba(139, 92, 246, 0.25) 50%, rgba(236, 72, 153, 0.22) 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.45);
  border-radius: 16px;
  padding: 1.2rem 1.5rem;
  margin: 1.25rem 0 2rem 0;
  box-shadow: 0 10px 30px -10px rgba(2, 132, 199, 0.35);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  animation: swGlowPulse 4s ease-in-out infinite alternate;
}

.sw-launch-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

@keyframes swGlowPulse {
  0% { border-color: rgba(56, 189, 248, 0.35); box-shadow: 0 8px 25px -10px rgba(2, 132, 199, 0.25); }
  100% { border-color: rgba(168, 85, 247, 0.6); box-shadow: 0 12px 35px -8px rgba(168, 85, 247, 0.4); }
}

.sw-banner-content {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  z-index: 1;
}

.sw-banner-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0284c7, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
  flex-shrink: 0;
}

.sw-banner-texts h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', 'Inter', sans-serif;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sw-banner-tag {
  font-size: 0.65rem;
  background: rgba(56, 189, 248, 0.25);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.5);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  text-transform: uppercase;
  font-weight: 700;
}

.sw-banner-texts p {
  margin: 0;
  font-size: 0.85rem;
  color: #cbd5e1;
}

.sw-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  z-index: 1;
  flex-shrink: 0;
}

.sw-btn-launch {
  background: linear-gradient(135deg, #0284c7, #38bdf8);
  color: #030712;
  font-weight: 800;
  border: none;
  border-radius: 999px;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.35);
}

.sw-btn-launch:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.55);
}

.sw-btn-countdown {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sw-btn-countdown:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
}

/* --------------------------------------------------------------------------
   Modal Overlay Fullscreen Story Viewer
   -------------------------------------------------------------------------- */
.sw-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(4, 7, 16, 0.94);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  overflow: hidden;
  -webkit-user-select: none;
  user-select: none;
}

.sw-modal-overlay.is-active {
  display: flex;
  opacity: 1;
}

/* Controls Bar (Desktop & Floating on Mobile) */
.sw-modal-top-controls {
  position: absolute;
  top: 1rem;
  left: 1.5rem;
  right: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
  pointer-events: auto;
}

.sw-role-selector-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  color: #e2e8f0;
  font-size: 0.8rem;
  font-weight: 600;
}

.sw-role-selector-pill select {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  font-size: 0.82rem;
}

.sw-top-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.sw-icon-btn {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1.1rem;
}

.sw-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

#elisee-wrapped-modal.is-coverflow .sw-story-viewport {
  max-width: min(1100px, 96vw);
  height: min(78vh, 640px);
  max-height: none;
  aspect-ratio: auto;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
#elisee-wrapped-modal.is-coverflow .sw-progress-bar-container,
#elisee-wrapped-modal.is-coverflow .sw-touch-prev,
#elisee-wrapped-modal.is-coverflow .sw-touch-next,
#elisee-wrapped-modal.is-coverflow .sw-slide-layer,
#elisee-wrapped-modal.is-coverflow .sw-story-header { display: none; }
.es-wcf { display: none; width: 92%; height: 100%; margin: 0 auto; }
#elisee-wrapped-modal.is-coverflow .es-wcf { display: block; }
.es-wcf-card {
  height: 370px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  padding: 0 18px 78px;
  filter: grayscale(0.6);
  box-sizing: border-box;
  text-align: center;
}
.swiper-slide-active .es-wcf-card { filter: none; }
.es-wcf-card h2,
.es-wcf-card p,
.es-wcf-card button { opacity: 0; transition: opacity 0.25s ease; margin: 0; }
.swiper-slide-active .es-wcf-card h2,
.swiper-slide-active .es-wcf-card p,
.swiper-slide-active .es-wcf-card button { opacity: 1; }
.es-wcf-card h2 {
  color: #fff;
  font-size: 1.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.es-wcf-card p { color: rgba(255,255,255,0.82); font-size: 0.9rem; margin: 8px 0 14px; }
.es-wcf-card button {
  border: 0;
  background: #38bdf8;
  color: #041018;
  border-radius: 32px;
  padding: 8px 26px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}
.es-wcf-card button:hover { filter: brightness(1.08); }
.es-wcf .swiper-pagination { bottom: 34px !important; transform: scale(1.3); }
.es-wcf .swiper-pagination-bullet { background: rgba(255,255,255,0.45); opacity: 1; }
.es-wcf .swiper-pagination-bullet-active { background: #38bdf8; }

/* Story Canvas / Shell 9:16 */
.sw-story-viewport {
  position: relative;
  width: 100%;
  max-width: 420px;
  height: 88vh;
  max-height: 820px;
  aspect-ratio: 9 / 16;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.12);
  background: #000000;
  display: flex;
  flex-direction: column;
}

@media (max-width: 480px) {
  .sw-story-viewport {
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
  .sw-modal-top-controls {
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   Story Header & Progress Bars
   -------------------------------------------------------------------------- */
.sw-progress-bar-container {
  display: flex;
  gap: 5px;
  padding: 14px 16px 8px 16px;
  z-index: 10;
  position: relative;
}

.sw-progress-segment {
  flex: 1;
  height: 3.5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.sw-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0%;
  background: #ffffff;
  border-radius: 4px;
  transition: width 0.08s linear;
}

.sw-progress-segment.is-completed .sw-progress-fill {
  width: 100% !important;
}

.sw-story-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 18px 12px 18px;
  z-index: 10;
  position: relative;
}

.sw-brand-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sw-brand-logo-img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  border-radius: 6px;
}

.sw-brand-wordmark {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-transform: uppercase;
}

.sw-season-badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Story Slide Content Layer
   -------------------------------------------------------------------------- */
.sw-slide-layer {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease;
  justify-content: space-between;
}

/* Palette gradient themes for each ecosystem group */
.sw-theme-player {
  background: linear-gradient(160deg, #062b1b 0%, #0d4a2f 50%, #04170e 100%);
}
.sw-theme-scout {
  background: linear-gradient(160deg, #1e113a 0%, #3b1d75 50%, #110922 100%);
}
.sw-theme-coach {
  background: linear-gradient(160deg, #3d0e1e 0%, #781d32 50%, #1f050e 100%);
}
.sw-theme-president {
  background: linear-gradient(160deg, #1a160d 0%, #2f2510 50%, #0c0a06 100%);
}
.sw-theme-medical {
  background: linear-gradient(160deg, #04252f 0%, #084c61 50%, #031419 100%);
}
.sw-theme-fan {
  background: linear-gradient(160deg, #1c0f38 0%, #581c87 50%, #100624 100%);
}
.sw-theme-press {
  background: linear-gradient(160deg, #06182a 0%, #0c3358 50%, #030d17 100%);
}

.sw-eyebrow {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.6rem;
}

.sw-headline-group {
  margin-top: 0.5rem;
}

.sw-headline-sub {
  font-size: 1.15rem;
  color: #e2e8f0;
  font-weight: 600;
  margin: 0 0 0.35rem 0;
}

.sw-hero-stat-num {
  font-family: 'Outfit', 'Oswald', sans-serif;
  font-size: 3.8rem;
  line-height: 1;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.sw-comparison-text {
  font-size: 0.92rem;
  line-height: 1.45;
  color: #cbd5e1;
  margin-bottom: 1.5rem;
}

/* Secondary Stat Cards */
.sw-stat-card {
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  margin-bottom: 0.75rem;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.sw-stat-card-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #38bdf8;
  margin-bottom: 0.25rem;
}

.sw-stat-card-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}

.sw-stat-card-sub {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

/* Pill / Badges row */
.sw-pills-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.sw-pill-item {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #f1f5f9;
}

/* --------------------------------------------------------------------------
   Card OVR FIFA Style (Slide Finale Calciatore & Reparto)
   -------------------------------------------------------------------------- */
.sw-fifa-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0.5rem 0;
  position: relative;
}

.sw-fifa-card {
  width: 250px;
  background: linear-gradient(145deg, #182030, #0a0f1d);
  border: 2px solid #eab308;
  border-radius: 20px;
  padding: 1.25rem 1rem 1rem 1rem;
  box-shadow: 0 16px 40px -10px rgba(234, 179, 8, 0.35), inset 0 0 25px rgba(234, 179, 8, 0.12);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sw-fifa-card::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 60%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  transform: rotate(-15deg);
  pointer-events: none;
}

.sw-card-ribbon-ovr {
  font-family: 'Outfit', sans-serif;
  font-size: 3.5rem;
  font-weight: 900;
  color: #fef08a;
  line-height: 0.95;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
}

.sw-card-role-title {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0.25rem 0;
}

.sw-card-meta-line {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.sw-gps-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #4ade80;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
}

.sw-gps-badge.is-manual {
  background: rgba(234, 179, 8, 0.15);
  border-color: rgba(234, 179, 8, 0.4);
  color: #fde047;
}

/* 6 Attributi FIFA Bars */
.sw-card-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.75rem;
  text-align: left;
  font-size: 0.78rem;
  margin-top: 0.4rem;
}

.sw-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Outfit', monospace;
}

.sw-stat-row span:first-child {
  color: #cbd5e1;
  font-weight: 700;
}

.sw-stat-row span:last-child {
  color: #fef08a;
  font-weight: 900;
}

/* --------------------------------------------------------------------------
   Curva di Crescita Stagionale (Multi-Anno Bar Chart)
   -------------------------------------------------------------------------- */
.sw-growth-chart-wrap {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 1.25rem 1.25rem 1rem 1.25rem;
  margin: 1rem 0;
}

.sw-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 180px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sw-chart-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  width: 55px;
}

.sw-chart-bar-val {
  font-size: 0.85rem;
  font-weight: 800;
  color: #ffffff;
  font-family: 'Outfit', sans-serif;
}

.sw-chart-bar-pillar {
  width: 100%;
  background: linear-gradient(180deg, #38bdf8 0%, #0369a1 100%);
  border-radius: 6px 6px 2px 2px;
  transition: height 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.sw-chart-col:last-child .sw-chart-bar-pillar {
  background: linear-gradient(180deg, #f59e0b 0%, #b45309 100%);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.4);
}

.sw-chart-season-lbl {
  font-size: 0.68rem;
  color: #94a3b8;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Story Footer & Touch Tap Areas
   -------------------------------------------------------------------------- */
.sw-story-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: auto;
  z-index: 10;
}

.sw-user-handle {
  font-size: 0.75rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
}

.sw-btn-share-pill {
  background: #ffffff;
  color: #050810;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.sw-btn-share-pill:hover {
  transform: scale(1.04);
  background: #f1f5f9;
}

.sw-watermark-tag {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Clickable touch navigation zones */
.sw-touch-prev,
.sw-touch-next {
  position: absolute;
  top: 60px;
  bottom: 70px;
  width: 35%;
  z-index: 5;
  cursor: pointer;
}
.sw-touch-prev { left: 0; }
.sw-touch-next { right: 0; }

/* --------------------------------------------------------------------------
   Countdown Modal
   -------------------------------------------------------------------------- */
.sw-countdown-card {
  max-width: 440px;
  background: linear-gradient(160deg, #091326 0%, #030712 100%);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  padding: 2rem 1.75rem;
  text-align: center;
  color: #fff;
  box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9);
}

.sw-timer-blocks {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.75rem 0;
}

.sw-timer-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 14px;
  padding: 0.85rem 0.65rem;
  min-width: 75px;
}

.sw-timer-box-num {
  font-family: 'Outfit', sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
}

.sw-timer-box-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-top: 0.35rem;
}

.sw-social-counter-box {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.sw-social-counter-box strong {
  color: #38bdf8;
  font-size: 1.15rem;
}
