:root{
  --bg1:#070A13;
  --bg2:#0B1025;
  --text:#EAF0FF;
  --muted:#A9B4D6;
  --stroke:rgba(255,255,255,.07);
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --radius: 22px;
}

*{ box-sizing:border-box; }
html, body { height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 12% 12%, rgba(128, 179, 255, .25), transparent 60%),
    radial-gradient(900px 500px at 88% 20%, rgba(255, 122, 236, .18), transparent 60%),
    radial-gradient(700px 500px at 40% 85%, rgba(96, 255, 220, .14), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  display:grid;
  place-items:center;
  padding: 26px;
  transition: filter 240ms ease;
}

body.night{
  filter: saturate(.95) brightness(.92);
}

body:before{
  content:"";
  position: fixed;
  inset: 0;
  pointer-events:none;
  opacity: .08;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.wrap{
  width: min(900px, 100%);
  display:grid;
  gap: 18px;
}

.card{
  position: relative;
  padding: 28px 26px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: background 240ms ease, border-color 240ms ease;
}

.card:after{
  content:"";
  position:absolute;
  inset:-120px -140px auto auto;
  width: 320px;
  height: 320px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), transparent 65%);
  transform: rotate(22deg);
  opacity: .35;
}

/* Top bar */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.20);
  font-size: 13px;
  letter-spacing: .2px;
  color: var(--muted);
  user-select:none;
  transition: background 240ms ease, border-color 240ms ease;
}

.badgeClock{
  padding: 9px 13px;
}

.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  box-shadow: 0 0 0 4px rgba(255,255,255,.08);
}

/* Typography */
.heroTitle{
  margin: 8px 0 0;
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  position: relative;
  z-index: 1;
}

.lead{
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  position: relative;
  z-index: 1;
  max-width: 72ch;
}

.title{
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: .25px;
  position: relative;
  z-index: 1;
}

/* "Fascia attuale" row */
.nowHeader{
  margin-top: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 14px;
  position: relative;
  z-index: 1;
}

/* Poster result */
.out{
  margin: 10px 0 0;
  display: grid;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.outLead{
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  opacity: .95;
}

.outCode{
  font-size: clamp(56px, 9vw, 86px);
  font-weight: 950;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.f1 .outCode{ text-shadow: 0 0 30px rgba(110,231,255,.18); }
.f2 .outCode{ text-shadow: 0 0 30px rgba(255,214,110,.18); }
.f3 .outCode{ text-shadow: 0 0 40px rgba(178,140,255,.16); }

/* Fascia pill */
.fascia{
  display:inline-flex;
  align-items:baseline;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.25);
  margin-top: 0;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  max-width: 60%;
}

.fascia strong{
  font-size: 20px;
  letter-spacing: .02em;
}

.fascia span{
  font-size: 13px;
  color: var(--muted);
}

/* Holiday note */
.note{
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Panels */
.panel{
  margin: 14px 0 0;
  padding: 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
  position: relative;
  z-index: 1;
  transition: background 240ms ease, border-color 240ms ease;
}

.panel h2{
  margin: 0 0 10px;
  font-size: 13px;
  letter-spacing: .2px;
  color: var(--text);
  opacity: .92;
}

.panel ul{
  margin:0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.panel p{
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
}

/* Fascia colors */
.f1 .dot{ background: #6EE7FF; box-shadow: 0 0 0 4px rgba(110,231,255,.12); }
.f2 .dot{ background: #FFD66E; box-shadow: 0 0 0 4px rgba(255,214,110,.12); }
.f3 .dot{ background: #B28CFF; box-shadow: 0 0 0 4px rgba(178,140,255,.12); }

/* Night mode in F3 */
.f3.card{
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,.25));
  border-color: rgba(255,255,255,.06);
}
.f3 .badge{
  background: rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.08);
}
.f3 .panel{
  background: rgba(0,0,0,.30);
  border-color: rgba(255,255,255,.06);
}

@media (max-width: 520px){
  .nowHeader{
    flex-direction: column;
    align-items: flex-start;
  }
  .fascia{
    max-width: 100%;
  }
}
