:root{
  --bg1:#ffdee9;
  --bg2:#fff4f7;
  --accent:#ff9eb5;
  --accent-2:#ffd89a;
  --card-bg: rgba(255,255,255,0.8);
  --glass: rgba(255,255,255,0.6);
  --muted:#7b6f79;
  --radius:18px;
}

/* Reset-ish */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  background: linear-gradient(180deg,var(--bg1), var(--bg2));
  color:#3b2a32;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Hearts background container fits screen and contains spawned hearts */
#hearts-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden;
  background-image: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.06), transparent 10%),
                    radial-gradient(circle at 80% 80%, rgba(255,250,240,0.04), transparent 12%);
}

/* Layout */
.container{position:relative; z-index:10; max-width:1000px; margin:32px auto; padding:20px}
.header{text-align:center; margin-bottom:18px}
.site-title{font-family: 'Great Vibes', cursive; font-size:40px; margin:0; color:#ff3a84}
.subtitle{margin:6px 0 0; color:var(--muted)}

/* card */
.card{
  background:var(--card-bg);
  border-radius:var(--radius);
  padding:18px;
  margin:12px 0;
  box-shadow: 0 8px 30px rgba(255,150,180,0.08);
  backdrop-filter: blur(6px);
}

/* Player */
.player-section{display:flex; gap:18px; align-items:center; flex-wrap:wrap}
.player-left{display:flex; gap:12px; align-items:center}
.cover{
  width:96px; height:96px; display:flex; align-items:center; justify-content:center;
  border-radius:14px; background:linear-gradient(135deg,#fff,#ffeef6); font-size:28px;
  box-shadow:0 6px 20px rgba(255,140,170,0.12);
}
.track-info{min-width:160px}
.track-title{font-weight:700; font-size:18px}
.track-meta{font-size:13px; color:var(--muted)}

/* controls */
.controls-row{display:flex; gap:10px; align-items:center; justify-content:center; margin-bottom:10px}
.btn{border:none; cursor:pointer; border-radius:10px; padding:8px 12px; background:white; color:#ff3a84; box-shadow:0 6px 18px rgba(255,140,170,0.06)}
.btn:hover{transform:translateY(-3px); transition:all .18s ease}
.play{width:64px; height:64px; border-radius:999px; background:linear-gradient(180deg,#ff8fb0,#ff5a8f); color:white; font-size:20px; box-shadow:0 12px 30px rgba(255,90,120,0.18)}
.small{padding:6px 10px}

/* progress */
.progress-row{display:flex; gap:10px; align-items:center}
.progress-bar{flex:1; height:10px; background:rgba(255,255,255,0.6); border-radius:999px; position:relative; cursor:pointer}
.progress-fill{position:absolute; left:0; top:0; bottom:0; width:0%; background:linear-gradient(90deg,var(--accent), var(--accent-2)); border-radius:999px}

/* playlist */
.cards-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px}
.card-item{background:#fff8fb; padding:12px; border-radius:14px; cursor:pointer; border:2px solid transparent; transition:transform .18s ease, box-shadow .18s ease}
.card-item:hover{transform:translateY(-6px); box-shadow:0 18px 40px rgba(255,140,170,0.07)}
.card-item.active{border-color:var(--accent); box-shadow:0 20px 60px rgba(255,140,170,0.08)}

/* Postcard / letter */
.postcard{display:flex; gap:12px; align-items:center; justify-content:space-between}
.letter{margin-top:12px; background:linear-gradient(180deg,#fff,#fff6f8); border-radius:12px; padding:14px; box-shadow:0 14px 30px rgba(255,120,160,0.06)}
.hidden{display:none}
.letter-content{white-space:pre-wrap; color:#5a3a45}

/* gallery */
.gallery-grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:8px}
.gallery-grid img{width:100%; height:140px; object-fit:cover; border-radius:12px; cursor:pointer; transition:transform .18s}
.gallery-grid img:hover{transform:scale(1.03)}

/* timeline */
.timeline{padding-left:18px}
.timeline li{margin:8px 0; background:rgba(255,255,255,0.6); padding:10px; border-radius:10px}

/* extras */
.extras{display:flex; gap:16px; flex-wrap:wrap; align-items:flex-start}
.quotes{flex:1}
.surprise{width:260px}
.surprise-content{margin-top:8px; padding:12px; border-radius:10px; background:#fff4f7; color:#b44a6a}

/* footer */
.footer{text-align:center; margin:20px 0; color:var(--muted)}

/* modal — по умолчанию скрыта, показывается через .open */
.modal{position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(12,8,10,0.6); z-index:50}
.modal.open{display:flex}
.modal img{max-width:90%; max-height:80%; border-radius:10px}
.modal-close{position:absolute; top:20px; right:24px; background:transparent; border:none; color:white; font-size:22px}

/* switch */
.switch{display:inline-flex; align-items:center; gap:8px}
.switch .slider{width:44px; height:24px; background:#fff; border-radius:999px; position:relative; box-shadow:inset 0 0 0 2px rgba(255,150,180,0.12)}
.switch .slider::after{content:''; position:absolute; top:3px; left:3px; width:18px; height:18px; background:var(--accent); border-radius:50%; transition:all .18s}
.switch input{display:none}
.switch input:checked + .slider{background:#fff}
.switch input:checked + .slider::after{transform:translateX(20px)}
.switch-label{font-size:13px; color:var(--muted); margin-left:6px}

/* lightbox */
.lightbox{position:fixed;inset:0;display:none;align-items:center;justify-content:center;z-index:120;pointer-events:none}
.lightbox.open{display:flex;pointer-events:auto}
.lightbox-backdrop{position:absolute;inset:0;background:rgba(12,8,10,0.48);backdrop-filter:blur(6px);transition:opacity .25s}
.lightbox-inner{position:relative;max-width:92%;max-height:92%;padding:18px;border-radius:14px;background:linear-gradient(180deg,rgba(255,255,255,0.92),rgba(255,250,248,0.85));box-shadow:0 30px 80px rgba(25,10,20,0.45);z-index:2;display:flex;flex-direction:column;align-items:center;gap:10px}
.lightbox img{max-width:100%;max-height:72vh;border-radius:10px;object-fit:contain;box-shadow:0 18px 40px rgba(0,0,0,0.12)}
.lightbox-close{position:absolute;top:10px;right:10px;background:rgba(255,255,255,0.6);border:none;padding:8px 10px;border-radius:10px;cursor:pointer;font-size:1.05rem;z-index:3}
.lightbox-caption{color:#5a3f3f;font-size:0.95rem;padding:6px 8px;border-radius:8px;background:linear-gradient(180deg,rgba(255,242,245,0.8),rgba(255,250,248,0.7))}
@media (max-width:600px){ .lightbox-inner{padding:12px} .lightbox img{max-height:60vh} }

/* responsive */
@media (max-width:720px){
  .player-section{flex-direction:column; align-items:stretch}
  .player-left{justify-content:center}
  .cover{width:84px;height:84px}
  .gallery-grid img{height:110px}
}
