@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;700;900&display=swap");

:root{
  --ink: rgba(18, 24, 36, 0.92);
  --muted: rgba(18, 24, 36, 0.65);

  --card: rgba(255,255,255,0.70);
  --card2: rgba(255,255,255,0.52);

  --shadow: 0 18px 50px rgba(0,0,0,0.18);
  --radius: 22px;
}

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

body{
  font-family: "Nunito", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  display:grid;
  place-items:center;
  padding: 26px 14px;
  color: var(--ink);
  background:#000;
  overflow-x:hidden;
}

/* ===== Background Video ===== */
.bg{
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  background:#000;
}

.bg-video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  transform: scale(1.02);
  filter: saturate(112%) contrast(103%);

  /* ✅ crossfade */
  opacity: 0;
  transition: opacity 1.2s ease;
}

.bg-video.active{
  opacity: 1;
}

/* make video feel “soft” */
.bg-overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background:
    radial-gradient(900px 520px at 20% 18%, rgba(255,255,255,0.28), transparent 60%),
    radial-gradient(900px 520px at 82% 32%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.12), rgba(0,0,0,0.10));
  mix-blend-mode: screen;
  opacity: 0.55;
}

.bg-vignette{
  position:absolute;
  inset:0;
  z-index:2;
  background: radial-gradient(circle at center, transparent 52%, rgba(0,0,0,0.28));
  opacity: 0.60;
}

body.calm .bg-overlay{ opacity: 0.68; }
body.calm .bg-vignette{ opacity: 0.72; }

/* ===== UI ===== */
.app{
  width: min(880px, 100%);
  display:grid;
  gap: 14px;
}

.top{
  display:flex;
  gap: 12px;
  align-items:flex-end;
  justify-content:space-between;
  flex-wrap: wrap;
}

.title{
  color: rgba(255,255,255,0.96);

  text-shadow:
    0 0 12px rgba(255,255,255,0.35),
    0 10px 30px rgba(0,0,0,0.45);
}

.title h1{
  margin:0;
  font-size: 26px;
  letter-spacing:-0.02em;
}

.title p{
  margin:6px 0 0;
  font-weight:800;
  opacity:0.95;
  font-size:13px;

  text-shadow:
    0 0 8px rgba(255,255,255,0.3);
}

.modes{
  display:flex;
  gap: 10px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.26);
  border: none;
  backdrop-filter: blur(10px);
}

.chip{
  border: 1px solid rgba(18,24,36,0.12);
  background: rgba(255,255,255,0.78);
  padding: 9px 12px;
  border-radius: 999px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .08s ease, opacity .2s ease, box-shadow .2s ease;
}

.chip:hover{ transform: translateY(-1px); }

.chip.active{
  background: rgba(255,255,255,0.96);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
}


.card{
  background: radial-gradient(
    circle at 50% 45%,
    rgba(255,255,255,0.95) 0%,
    rgba(255,255,255,0.85) 35%,
    rgba(255,255,255,0.55) 70%,
    rgba(255,255,255,0.15) 100%
  );
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(14px);
}

.breath{
  display:grid;
  place-items:center;
  gap: 10px;
  padding: 14px 10px 6px;
}

.breath-core{
  width: 120px; height: 120px;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,0.95), rgba(255,255,255,0.38) 40%, rgba(255,255,255,0.08) 70%, transparent 100%),
    radial-gradient(circle at 60% 70%, rgba(45,212,191,0.20), transparent 62%),
    radial-gradient(circle at 30% 70%, rgba(96,165,250,0.16), transparent 62%);
  border: 1px solid rgba(18,24,36,0.10);
  box-shadow: 0 18px 45px rgba(0,0,0,0.14);
  transform: scale(0.92);
  transition: transform 1s ease;
}

.breath-text{
  font-weight: 800;
  color: rgba(18,24,36,0.70);
  margin-top: 8px;   
}

.message{
  text-align:center;
  font-size: 18px;
  font-weight: 900;
  line-height: 4;
}

.actions{
  margin-top: px;
  display:flex;
  gap: 10px;
  justify-content:center;
  flex-wrap: wrap;
}

.btn{
  border: 1px solid rgba(18,24,36,0.12);
  background: rgba(255,255,255,0.72);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .08s ease, opacity .2s ease, box-shadow .2s ease;
}

.btn:hover{ transform: translateY(-1px); }
.btn:active{ transform: translateY(0px); opacity:.95; }

.btn.primary{
  background: rgba(255,255,255,0.92);
  box-shadow: 0 14px 28px rgba(0,0,0,0.10);
}

.footer{
  margin-top: 14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 10px;
  flex-wrap: wrap;
}

.status{
  color: rgba(18,24,36,0.70);
  font-weight: 900;
}

.tiny{
  border: 1px solid rgba(18,24,36,0.12);
  background: rgba(255,255,255,0.60);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 900;
  cursor:pointer;
}

.music-btn{
  position: fixed;
  bottom: 24px;
  right: 24px;

  background: transparent;
  border: none;

  color: rgba(255,255,255,0.95);

  text-shadow:
    0 0 10px rgba(255,255,255,0.6),
    0 0 20px rgba(255,255,255,0.3);

  font-weight: 600;
  font-size: 14px;
  letter-spacing: 1px;

  cursor: pointer;
  padding: 6px 10px;

  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.music-btn:hover{
  opacity: 1;
  transform: scale(1.05);
}

@keyframes glowBreath{
  0%, 100%{
    opacity: 0.82;
    text-shadow:
      0 0 6px rgba(255,255,255,0.65),
      0 0 20px rgba(255,255,255,0.18);
    transform: scale(1);
  }
  50%{
    opacity: 1;
    text-shadow:
      0 0 10px rgba(255,255,255,0.60),
      0 0 26px rgba(255,255,255,0.30);
    transform: scale(1.03);
  }
}

.music-btn.is-on{
  animation: glowBreath 2.8s ease-in-out infinite;
}
