*{
  box-sizing:border-box;
}

:root{
  --bg:#030812;
  --panel:rgba(9,18,34,.82);
  --line:rgba(255,255,255,.11);
  --text:#f7fbff;
  --muted:#8fa4bd;
  --blue:#1597ff;
  --cyan:#43d7ff;
  --green:#31e981;
}

html,body{
  margin:0;
  min-height:100%;
}

body{
  min-height:100vh;
  min-height:100dvh;
  font-family:Arial,Helvetica,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at 50% -10%,#15396c 0%,#071528 35%,var(--bg) 72%);
  overflow-x:hidden;
}

button,input{
  font:inherit;
}

.ambient{
  position:fixed;
  border-radius:50%;
  filter:blur(80px);
  opacity:.24;
  pointer-events:none;
}

.ambient-one{
  width:330px;
  height:330px;
  background:#0d83ff;
  top:-140px;
  left:-110px;
}

.ambient-two{
  width:300px;
  height:300px;
  background:#32d6ff;
  right:-150px;
  bottom:-100px;
  opacity:.13;
}

.page{
  position:relative;
  z-index:1;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px 18px;
}

.player-card{
  width:min(100%,480px);
  padding:22px 24px 24px;
  border:1px solid var(--line);
  border-radius:32px;
  background:
    linear-gradient(145deg,rgba(17,32,55,.91),rgba(5,11,22,.94));
  box-shadow:
    0 32px 80px rgba(0,0,0,.52),
    inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(22px);
  -webkit-backdrop-filter:blur(22px);
}

.topbar{
  min-height:36px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.brand-mini{
  display:flex;
  align-items:center;
  gap:8px;
  color:#dbeeff;
  font-size:12px;
  font-weight:800;
  letter-spacing:1.5px;
}

.live-dot{
  width:9px;
  height:9px;
  border-radius:50%;
  background:#ff3b4d;
  box-shadow:0 0 0 5px rgba(255,59,77,.12),0 0 18px #ff3b4d;
  animation:pulse 1.8s infinite;
}

.install-btn{
  border:1px solid rgba(77,191,255,.36);
  border-radius:999px;
  padding:8px 13px;
  background:rgba(21,151,255,.12);
  color:#dff5ff;
  font-size:12px;
  font-weight:700;
  cursor:pointer;
}

.cover-wrap{
  position:relative;
  width:min(78vw,300px);
  aspect-ratio:1;
  margin:24px auto 22px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.cover-glow{
  position:absolute;
  inset:8%;
  border-radius:50%;
  background:#168fff;
  filter:blur(44px);
  opacity:.27;
}

.cover{
  position:relative;
  z-index:1;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:27%;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:
    0 24px 55px rgba(0,0,0,.52),
    0 0 45px rgba(28,155,255,.15);
}

.station{
  text-align:center;
}

.eyebrow{
  margin-bottom:7px;
  color:var(--cyan);
  font-size:11px;
  font-weight:900;
  letter-spacing:2.4px;
}

.station h1{
  margin:0;
  font-size:clamp(30px,8vw,42px);
  line-height:1.05;
  letter-spacing:-1.2px;
}

.station p{
  margin:10px 0 0;
  color:var(--muted);
  font-size:14px;
}

.status{
  width:max-content;
  max-width:100%;
  margin:20px auto 0;
  padding:9px 13px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  background:rgba(0,0,0,.2);
  color:#c9d8e8;
  font-size:12px;
}

.status-dot{
  width:8px;
  height:8px;
  flex:none;
  border-radius:50%;
  background:#8392a5;
  transition:.25s;
}

.status-dot.connecting{
  background:#ffc14d;
  box-shadow:0 0 12px rgba(255,193,77,.7);
}

.status-dot.playing{
  background:var(--green);
  box-shadow:0 0 14px rgba(49,233,129,.75);
}

.status-dot.error{
  background:#ff5263;
  box-shadow:0 0 14px rgba(255,82,99,.7);
}

.controls{
  margin-top:22px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:20px;
}

.play-btn{
  width:82px;
  height:82px;
  display:grid;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:
    linear-gradient(145deg,#4bcfff,#087cf0);
  color:#fff;
  font-size:31px;
  cursor:pointer;
  box-shadow:
    0 16px 35px rgba(0,116,255,.35),
    inset 0 1px 1px rgba(255,255,255,.45);
  transition:transform .15s ease,filter .15s ease;
}

.play-btn:hover{
  filter:brightness(1.08);
}

.play-btn:active{
  transform:scale(.95);
}

#playIcon{
  display:block;
  line-height:1;
  transform:translateX(2px);
}

.play-btn.is-playing #playIcon{
  transform:none;
}

.volume-box{
  width:min(100%,300px);
  display:flex;
  align-items:center;
  gap:12px;
}

.volume-icon{
  width:25px;
  font-size:18px;
}

#volume{
  width:100%;
  accent-color:#24b8ff;
  cursor:pointer;
}

.footer-line{
  margin-top:24px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,.07);
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  color:#647b94;
  font-size:11px;
  letter-spacing:.6px;
  text-transform:uppercase;
}

.separator{
  color:#1aaeff;
}

@keyframes pulse{
  0%,100%{
    box-shadow:0 0 0 4px rgba(255,59,77,.1),0 0 14px #ff3b4d;
  }
  50%{
    box-shadow:0 0 0 8px rgba(255,59,77,0),0 0 22px #ff3b4d;
  }
}

@media(max-width:520px){
  .page{
    align-items:flex-start;
    padding:
      max(18px,env(safe-area-inset-top))
      12px
      max(18px,env(safe-area-inset-bottom));
  }

  .player-card{
    padding:18px 18px 20px;
    border-radius:26px;
  }

  .cover-wrap{
    width:min(72vw,270px);
    margin-top:18px;
    margin-bottom:18px;
  }

  .play-btn{
    width:76px;
    height:76px;
  }

  .footer-line{
    margin-top:20px;
  }
}

@media(max-height:720px) and (orientation:landscape){
  .page{
    padding:12px;
  }

  .player-card{
    max-width:700px;
    padding:14px 22px;
  }

  .cover-wrap{
    width:180px;
    margin:8px auto;
  }

  .station h1{
    font-size:28px;
  }

  .station p{
    margin-top:5px;
  }

  .status{
    margin-top:10px;
  }

  .controls{
    margin-top:10px;
    gap:10px;
  }

  .play-btn{
    width:62px;
    height:62px;
    font-size:24px;
  }

  .footer-line{
    margin-top:10px;
    padding-top:10px;
  }
}

/* ===== NOW PLAYING ===== */

.now-playing{
  margin:18px auto 0;
  padding:14px 16px;
  width:min(100%,360px);
  text-align:center;
  border-top:1px solid rgba(255,255,255,.07);
  border-bottom:1px solid rgba(255,255,255,.07);
}

.now-label{
  margin-bottom:7px;
  color:#43d7ff;
  font-size:9px;
  font-weight:900;
  letter-spacing:2px;
}

.track-title{
  color:#fff;
  font-size:18px;
  line-height:1.25;
  font-weight:800;
}

.track-artist{
  margin-top:4px;
  color:#b9cce0;
  font-size:14px;
  line-height:1.3;
}

.track-extra{
  min-height:14px;
  margin-top:5px;
  color:#6f879f;
  font-size:11px;
}

/* ===== MATCH MUSIC BRAND LOGO ===== */

.station-logo{
  display:flex;
  justify-content:center;
  align-items:center;
  margin:4px auto 14px;
}

.station-logo img{
  width:64px;
  height:64px;
  display:block;
  object-fit:cover;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:
    0 8px 24px rgba(0,0,0,.30),
    0 0 18px rgba(45,190,255,.12);
}

@media (max-width:600px){
  .station-logo img{
    width:56px;
    height:56px;
    border-radius:14px;
  }
}

/* RADIO-APP-08M - logo sotto LIVE RADIO */
.topbar + .station-logo{
  margin-top:8px;
  margin-bottom:14px;
}

/* RADIO-APP-08N - logo sotto LIVE RADIO a sinistra */
.topbar + .station-logo{
  justify-content:flex-start;
  width:100%;
  margin:8px 0 14px;
  padding-left:0;
}

.topbar + .station-logo img{
  width:64px;
  height:64px;
  margin:0;
}
