/* STELLINA BMS — colori in hex (compatibilità Hostinger / browser senza rgb(var) moderno) */
/* Tema STELLINA — ispirato a PerediOn (esports/sports prediction) */
:root {
  --bms-bg: #0c1226;
  --bms-bg-elevated: #161d35;
  --bms-surface: #1e2843;
  --bms-card: #161d35;
  --bms-card-2: #1b2440;
  --bms-border: #2c3661;
  --bms-border-soft: rgba(92, 109, 168, 0.30);
  --bms-text: #ffffff;
  --bms-text-muted: #97a0c2;
  --bms-positive: #5bd17e;
  --bms-negative: #fb355e;
  --bms-accent: #4d8e53;
  --bms-accent-strong: #62b569;
  --bms-cta-from: #fb355e;
  --bms-cta-to: #e11d48;
  --bms-blue: #29589a;
  --bms-gold: #ffc165;
  /* "Chrome" = cornice app (topbar, sidebar, footer): tono distinto dal contenuto */
  --bms-chrome: #1c2750;
  --bms-chrome-2: #121a39;
  --bms-chrome-border: #38457d;
  --bms-topbar-from: var(--bms-chrome);
  --bms-topbar-to: var(--bms-chrome-2);
  --bms-topbar-border: var(--bms-chrome-border);
  --bms-topbar-text: #ffffff;
  --bms-topbar-text-muted: #97a0c2;
  --bms-topbar-active: #2a3563;
  --bms-overlay: rgba(10, 15, 30, 0.90);
  --bms-card-soft: rgba(30, 40, 75, 0.55);
  --bms-font: "Asap", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bms-radius: 0.85rem;
  --bms-drawer-width-rem: 43.7;
  --bms-drawer-width: min(98vw, 43.7rem);
}

[data-theme="light"] {
  --bms-bg: #f4f6fb;
  --bms-bg-elevated: #ffffff;
  --bms-surface: #ffffff;
  --bms-card: #ffffff;
  --bms-card-2: #f1f5f9;
  --bms-border: #d6dcea;
  --bms-border-soft: rgba(91, 108, 168, 0.22);
  --bms-text: #161d35;
  --bms-text-muted: #5c6172;
  --bms-positive: #2f9e52;
  --bms-negative: #e11d48;
  --bms-accent: #4d8e53;
  --bms-accent-strong: #3f7a45;
  --bms-cta-from: #fb355e;
  --bms-cta-to: #e11d48;
  --bms-blue: #29589a;
  --bms-gold: #d99a35;
  --bms-chrome: #e7edf8;
  --bms-chrome-2: #f1f5fc;
  --bms-chrome-border: #cbd4e8;
  --bms-topbar-from: var(--bms-chrome);
  --bms-topbar-to: var(--bms-chrome-2);
  --bms-topbar-border: var(--bms-chrome-border);
  --bms-topbar-text: #161d35;
  --bms-topbar-text-muted: #5c6172;
  --bms-topbar-active: #dde5f4;
  --bms-overlay: rgba(244, 246, 251, 0.92);
  --bms-card-soft: rgba(241, 245, 249, 0.9);
}

*, *::before, *::after { box-sizing: border-box; }

html, body { min-height: 100%; margin: 0; }

body {
  background-color: var(--bms-bg);
  color: var(--bms-text);
  font-family: var(--bms-font);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.bms-stat__value, .bms-pred__title {
  font-family: var(--bms-font);
  letter-spacing: 0.01em;
}
h1, h2, h3 { font-weight: 700; }

/* Sottofondo "esports" globale per le pagine dell'app */
.bms-app-body {
  background-color: var(--bms-bg);
  background-image:
    radial-gradient(ellipse 90% 60% at 100% -10%, rgba(251, 53, 94, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 0% 0%, rgba(77, 142, 83, 0.12) 0%, transparent 55%);
  background-attachment: fixed;
}

.bms-card-bg { background-color: var(--bms-card); }
.bms-card-border { border-color: var(--bms-border); }
.bms-text-primary { color: var(--bms-text); }
.bms-text-muted { color: var(--bms-text-muted); }
.bms-surface-bg { background-color: var(--bms-surface); }
.bms-border-color { border-color: var(--bms-border); }
.text-positive { color: var(--bms-positive); }
.text-negative { color: var(--bms-negative); }

.topbar-animated-bg {
  background: linear-gradient(180deg, var(--bms-topbar-from) 0%, var(--bms-topbar-to) 100%);
  border-bottom: 1px solid var(--bms-topbar-border);
}
/* Fallback visibilità nav topbar se il modulo chrome non carica */
.bms-topbar__nav { display: flex; align-items: center; flex: 1; min-width: 0; gap: 0.25rem; }
.bms-topnav__link { color: var(--bms-topbar-text-muted); text-decoration: none; font-weight: 600; font-size: 0.8rem; }
.bms-topnav__link:hover, .bms-topnav__link.is-active { color: var(--bms-topbar-text); }
@media (max-width: 1023px) {
  .bms-topbar__nav:not(.is-open) { display: none; }
}
.topbar-nav-link { color: var(--bms-topbar-text-muted); }
.topbar-nav-link:hover, .topbar-nav-link-active {
  background-color: var(--bms-topbar-active);
  color: var(--bms-topbar-text);
}
.topbar-btn {
  border: 1px solid var(--bms-border);
  background-color: var(--bms-surface);
  color: var(--bms-topbar-text);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.topbar-btn:hover { border-color: var(--bms-accent-strong); background-color: var(--bms-topbar-active); }
.topbar-nav-link { transition: background-color 0.15s ease, color 0.15s ease; font-weight: 600; }
.topbar-nav-link-active { box-shadow: inset 0 -2px 0 0 var(--bms-accent-strong); }
.topbar-email { color: var(--bms-topbar-text-muted); }

.stellina-name {
  color: var(--bms-accent-strong);
  font-weight: 800;
  letter-spacing: 0.02em;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .stellina-name {
    background: linear-gradient(110deg, #4d8e53, #72ff7f, #ffffff, #fb355e, #72ff7f, #4d8e53);
    background-size: 300% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

.landing-page { background-color: var(--bms-bg); }
.landing-bg {
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(251, 53, 94, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 80% 60% at 100% 30%, rgba(77, 142, 83, 0.16) 0%, transparent 50%);
}

.hex-tile { cursor: pointer; transition: transform 0.15s ease; }
.hex-tile:hover { transform: scale(1.05); }
.hex-tile.selected { filter: drop-shadow(0 0 6px var(--bms-accent-strong)); }
.hex-label-fo,
.hex-label-card {
  pointer-events: none;
  user-select: none;
}
.hex-label-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  height: 100%;
  padding: 2px 3px;
  box-sizing: border-box;
  background: transparent;
  border: none;
  border-radius: 0;
  color: #fff;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
  line-height: 1.1;
  overflow: hidden;
}
.hex-label__event,
.hex-label__date,
.hex-label__market,
.hex-label__bet {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.hex-label__event {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: nowrap;
  max-width: 100%;
}
.hex-label__event--text {
  font-size: 8px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hex-label__flag {
  width: 11px;
  height: auto;
  aspect-ratio: 3 / 2;
  max-height: 8px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 1px;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
}
.hex-label__team {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hex-label__sep {
  font-size: 6.5px;
  font-weight: 500;
  opacity: 0.75;
  margin: 0 1px;
}
.hex-label__date {
  font-size: 6.5px;
  font-weight: 500;
  opacity: 0.92;
  white-space: nowrap;
}
.hex-label__market {
  font-size: 7.5px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: calc(100% - 14px);
}
.hex-label__market-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  max-width: 100%;
  margin-top: 1px;
}
.hex-label__info-btn {
  pointer-events: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.hex-label__info-btn:hover,
.hex-label__info-btn:focus-visible {
  background: rgba(98, 181, 105, 0.55);
  border-color: rgba(255, 255, 255, 0.65);
  outline: none;
}
.hex-label__bet {
  font-size: 7.5px;
  font-weight: 800;
  white-space: nowrap;
}
.hex-pending { fill: #5c6172; }
.hex-win { fill: #15803d; }
.hex-loss { fill: #b91c1c; }

.btn-primary,
a.btn-primary {
  display: inline-block;
  background: linear-gradient(135deg, var(--bms-cta-from), var(--bms-cta-to));
  color: #ffffff !important;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px -8px rgba(251, 53, 94, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.btn-primary:hover {
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -8px rgba(251, 53, 94, 0.7);
}

/* Bottone secondario "ghost" in stile Peredion (navy + bordo) */
.btn-ghost,
a.btn-ghost {
  display: inline-block;
  background: var(--bms-surface);
  color: var(--bms-text) !important;
  padding: 0.6rem 1.15rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--bms-border);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-ghost:hover { border-color: var(--bms-accent-strong); color: #fff !important; }

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bms-border);
  background: var(--bms-surface);
  color: var(--bms-text);
  font-family: var(--bms-font);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--bms-accent-strong);
  box-shadow: 0 0 0 3px rgba(98, 181, 105, 0.22);
}
.form-input::placeholder { color: var(--bms-text-muted); }

.form-input[type="date"],
.form-input[type="datetime-local"] {
  color-scheme: dark;
  padding-right: 2.1rem;
}

.form-input[type="date"]::-webkit-calendar-picker-indicator,
.form-input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  appearance: none;
  -webkit-appearance: none;
  width: 1rem;
  height: 1rem;
  margin: 0;
  padding: 0;
  cursor: pointer;
  opacity: 1;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: none;
}

.form-input[type="date"]::-moz-calendar-picker-indicator,
.form-input[type="datetime-local"]::-moz-calendar-picker-indicator {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  opacity: 0.95;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: none;
}

.alert-error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: var(--bms-negative);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: var(--bms-positive);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
}

.w-full { width: 100%; }
.hidden { display: none !important; }
.mb-4 { margin-bottom: 1rem; }

/* â€”â€” Guest layout (landing / login) â€”â€” */
.bms-guest-body {
  font-family: var(--bms-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bms-bg);
  color: var(--bms-text);
}

.bms-guest-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--bms-border-soft);
  background-color: var(--bms-overlay);
  position: sticky;
  top: 0;
  z-index: 20;
}

.bms-guest-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--bms-text);
  text-decoration: none;
}

/* Logo BMS STELLINA (PNG trasparente) */
.bms-brand-logo {
  display: block;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}
.bms-brand-logo--simple {
  height: 2.25rem;
  aspect-ratio: 640 / 180;
}
.bms-brand-logo--footer {
  height: 2.85rem;
  aspect-ratio: 640 / 180;
  max-width: 11.5rem;
}
.bms-brand-logo--slogan {
  width: 100%;
  max-width: 520px;
  height: auto;
  aspect-ratio: 16 / 9;
}
.bms-guest-brand .bms-brand-logo--simple { height: 2.5rem; }
.bms-auth__brand {
  display: flex;
  justify-content: center;
  margin: 0 0 1.25rem;
}
.bms-auth__brand .bms-brand-logo--simple { height: 2.75rem; }
.bms-footer__brand-link {
  display: inline-block;
  text-decoration: none;
  margin-bottom: 0.65rem;
  line-height: 0;
  background: transparent;
}
.bms-footer__brand-link .bms-brand-logo--simple,
.bms-footer__brand-link .bms-brand-logo--footer {
  height: 2.85rem;
  max-width: 11.5rem;
  filter:
    drop-shadow(0 2px 5px rgba(0, 0, 0, 0.45))
    drop-shadow(0 0 14px rgba(114, 255, 127, 0.16));
}
@media (min-width: 768px) {
  .bms-footer__brand-link .bms-brand-logo--simple,
  .bms-footer__brand-link .bms-brand-logo--footer {
    height: 3.1rem;
    max-width: 12.5rem;
  }
}

.bms-guest-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.bms-guest-nav a {
  color: var(--bms-text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.bms-guest-nav a:hover { color: var(--bms-text); }
.bms-guest-nav-cta {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--bms-cta-from), var(--bms-cta-to));
  color: #ffffff !important;
}

.bms-guest-main { flex: 1; width: 100%; }

/* Hero landing */
.bms-hero {
  position: relative;
  overflow: hidden;
  padding: 3.5rem 1.25rem 4rem;
  width: 100%;
}
.bms-hero__bg { position: absolute; inset: 0; pointer-events: none; }
.bms-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
}
.bms-hero__glow--1 {
  width: 420px;
  height: 280px;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(77, 142, 83, 0.28);
}
.bms-hero__glow--2 {
  width: 300px;
  height: 300px;
  right: -60px;
  top: 20%;
  background: rgba(251, 53, 94, 0.18);
}
.bms-hero__hex {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath fill='none' stroke='%23334155' stroke-width='0.5' d='M28 0 L56 16 L56 50 L28 66 L0 50 L0 16 Z'/%3E%3C/svg%3E");
  background-size: 56px 100px;
}
.bms-hero__inner {
  position: relative;
  max-width: 42rem;
  margin: 0 auto;
  text-align: center;
}
.bms-hero__eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bms-accent);
  margin: 0 0 0.75rem;
}
.bms-hero__title {
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  margin: 0 0 0.5rem;
  color: var(--bms-text);
}
.bms-hero__lead {
  font-size: 1.15rem;
  color: var(--bms-text);
  margin: 0 0 0.5rem;
}
.bms-hero__sub {
  font-size: 1rem;
  color: var(--bms-text-muted);
  line-height: 1.6;
  margin: 0 auto 1.75rem;
  max-width: 36rem;
}
.bms-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-bottom: 2.5rem;
}
.bms-hero__btn { text-decoration: none; display: inline-block; }
.bms-hero__btn--ghost,
a.bms-hero__btn--ghost {
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--bms-border);
  color: var(--bms-text) !important;
  font-weight: 600;
  background-color: rgba(30, 41, 59, 0.65);
  text-decoration: none;
}
.bms-hero__stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  text-align: center;
}
.bms-hero__stats li {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--bms-border-soft);
  background-color: var(--bms-card-soft);
}
.bms-hero__stats strong {
  display: block;
  font-size: 1rem;
  color: var(--bms-text);
  margin-bottom: 0.25rem;
}
.bms-hero__stats span {
  display: block;
  font-size: 0.8rem;
  color: var(--bms-text-muted);
}

.bms-features {
  padding: 0 1.25rem 4rem;
  max-width: 72rem;
  margin: 0 auto;
  width: 100%;
}
.bms-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.bms-feature-card {
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--bms-border-soft);
  background: linear-gradient(165deg, var(--bms-card) 0%, var(--bms-bg-elevated) 100%);
}
.bms-feature-card__icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.bms-feature-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--bms-text);
}
.bms-feature-card p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--bms-text-muted);
}

