:root {
  --bg: #f6efe4;
  --panel: rgba(255, 253, 248, 0.94);
  --text: #2f251b;
  --muted: #6f5d4c;
  --stroke: #e8d8c2;
  --accent-start: #ff7a18;
  --accent-end: #ffb347;
  --shadow-soft: 0 16px 38px rgba(82, 51, 22, 0.16);
  --shadow-card-strong: 0 24px 56px rgba(72, 47, 20, 0.22);
  --shadow-inner-soft: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  --shadow-edge: 0 0 0 1px rgba(255, 255, 255, 0.45) inset;
  --ring-size: 280px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background-image: linear-gradient(
      140deg,
      rgba(247, 237, 224, 0.9) 0%,
      rgba(247, 237, 224, 0.78) 35%,
      rgba(250, 244, 236, 0.82) 100%
    ),
    url("Kanha desktop aesthetic wallpaper.jpg");
  background-size: 100% 100%, contain;
  background-position: center center, center top;
  background-repeat: no-repeat, repeat-y;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Mukta", "Nirmala UI", "Segoe UI", sans-serif;
  line-height: 1.45;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(50px);
  opacity: 0.38;
  pointer-events: none;
}

.orb-1 {
  width: 260px;
  height: 260px;
  top: -70px;
  right: -50px;
  background: linear-gradient(135deg, #ffb347, #ffd9a4);
}

.orb-2 {
  width: 220px;
  height: 220px;
  bottom: -70px;
  left: -60px;
  background: linear-gradient(180deg, #ffc98a, #ff7a18);
}

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 24px;
}

.header {
  text-align: center;
  margin-bottom: 20px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  padding: 14px 20px;
  border-radius: 18px;
  background: rgba(255, 250, 242, 0.56);
  border: 1px solid rgba(233, 214, 189, 0.7);
  box-shadow: 0 12px 30px rgba(73, 46, 19, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px) saturate(110%);
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: #7a624d;
  font-family: "Marcellus", serif;
}

.main-title {
  margin: 9px 0 7px;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-family: "Yatra One", "Tiro Devanagari Hindi", serif;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: #2f2116;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  line-height: 1.15;
}

.main-title span {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.52em;
  font-family: "Mukta", "Nirmala UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #79563b;
}

.subtext {
  margin: 0;
  color: #6f5a46;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.42;
}

.stat-card h2,
.quote,
.info-card h2,
.info-card h3 {
  font-family: "Marcellus", serif;
}

.counter-card,
.controls-card,
.quote-card,
.stat-card {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow-soft), var(--shadow-inner-soft), var(--shadow-edge);
  backdrop-filter: blur(6px) saturate(115%);
}

.counter-card {
  padding: 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  box-shadow: var(--shadow-card-strong), var(--shadow-inner-soft), var(--shadow-edge);
}

.counter-card,
.counter-card * {
  user-select: none;
  -webkit-user-select: none;
}

.progress-wrap {
  width: var(--ring-size);
  height: var(--ring-size);
  margin: 6px auto 12px;
  position: relative;
  display: grid;
  place-items: center;
}

.progress-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.progress-track,
.progress-arc {
  fill: none;
  stroke-width: 14;
}

.progress-track {
  stroke: #ffe8cd;
}

.progress-arc {
  stroke: url(#ringGradient);
  stroke-linecap: round;
  transition: stroke-dashoffset 240ms ease;
}

.tap-button {
  position: absolute;
  width: 184px;
  height: 184px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  gap: 2px;
  color: white;
  background: linear-gradient(145deg, var(--accent-start), var(--accent-end));
  box-shadow: 0 22px 36px rgba(255, 122, 24, 0.42),
    0 8px 16px rgba(100, 58, 14, 0.2),
    inset 0 3px 14px rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: transform 130ms ease, box-shadow 160ms ease;
  user-select: none;
}

.tap-button:hover {
  box-shadow: 0 28px 42px rgba(255, 122, 24, 0.46),
    0 10px 20px rgba(100, 58, 14, 0.22),
    inset 0 3px 14px rgba(255, 255, 255, 0.3);
}

.tap-button:active,
.tap-button.tapped {
  transform: scale(0.95);
  box-shadow: 0 0 0 14px rgba(255, 122, 24, 0.13),
    0 15px 24px rgba(255, 122, 24, 0.34),
    inset 0 2px 12px rgba(255, 255, 255, 0.2);
}

.tap-label {
  font-size: 0.85rem;
  opacity: 0.9;
  font-family: "Tiro Devanagari Hindi", serif;
}

.tap-word {
  font-size: 1.72rem;
  font-family: "Tiro Devanagari Hindi", "Yatra One", serif;
  font-weight: 700;
  letter-spacing: 0;
}

.radhe-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.radhe-pop {
  position: absolute;
  transform: translate(-50%, -50%);
  color: var(--accent-start);
  font-weight: 700;
  font-size: 1.06rem;
  opacity: 0;
  animation: popFade 650ms ease forwards;
}

@keyframes popFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
  }

  25% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -130%) scale(1.12);
  }
}

.count-readout {
  font-size: 1.02rem;
}

.count-title {
  margin: 0;
  color: var(--muted);
}

.count-readout p {
  margin: 4px 0 0;
  font-weight: 700;
  font-size: 1.4rem;
  font-family: "Yatra One", "Mukta", sans-serif;
}

.celebration {
  min-height: 1.5rem;
  margin-top: 10px;
  color: var(--accent-start);
  font-weight: 600;
}

.celebration.show {
  animation: softPulse 900ms ease;
}

@keyframes softPulse {
  0% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(255, 122, 24, 0);
  }

  50% {
    transform: scale(1.03);
    text-shadow: 0 0 22px rgba(255, 122, 24, 0.52);
  }

  100% {
    transform: scale(1);
    text-shadow: 0 0 0 rgba(255, 122, 24, 0);
  }
}

.stats-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stat-card {
  padding: 16px;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(82, 51, 22, 0.2), var(--shadow-inner-soft), var(--shadow-edge);
}

.stat-card h2 {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.stat-value {
  margin: 8px 0 0;
  font-size: 1.75rem;
  font-weight: 800;
}

.controls-card {
  margin-top: 16px;
  padding: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.chant-player-wrap {
  width: 100%;
  border: 1px solid #f7d5ad;
  border-radius: 16px;
  overflow: hidden;
  background: #fff7ec;
}

.chant-player-wrap iframe {
  display: block;
}

.chant-player-wrap.audio-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.toggle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
}

.toggle input[type="checkbox"] {
  accent-color: #ff932f;
  width: 17px;
  height: 17px;
}

.reminder-time-toggle {
  gap: 10px;
}

.reminder-time-toggle input[type="time"] {
  border: 1px solid #f4c38f;
  border-radius: 10px;
  min-width: 116px;
  height: 34px;
  padding: 6px 10px;
  font-family: "Mukta", "Nirmala UI", sans-serif;
  color: #6a421d;
  background: #fff7ec;
}

.ghost-btn {
  border: 1px solid #f4c38f;
  background: rgba(255, 248, 239, 0.96);
  color: #a95208;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(133, 76, 20, 0.16);
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.ghost-btn:hover {
  background: #fff1df;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(133, 76, 20, 0.2);
}

.install-btn {
  border-color: #f2a253;
  color: #7b3f06;
  background: linear-gradient(145deg, #fff4e5, #ffe7c9);
}

.quote-card {
  margin-top: 16px;
  padding: 16px;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%) translateY(18px);
  background: rgba(50, 33, 20, 0.9);
  color: #fff8ef;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.92rem;
  box-shadow: 0 16px 30px rgba(35, 22, 12, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 30;
}

.app-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.info-card {
  margin-top: 16px;
  padding: 20px;
  background: rgba(255, 252, 246, 0.92);
  border: 1px solid var(--stroke);
  border-radius: 24px;
  box-shadow: var(--shadow-soft), var(--shadow-inner-soft), var(--shadow-edge);
  backdrop-filter: blur(6px) saturate(115%);
}

.info-card h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.info-card h3 {
  margin: 16px 0 8px;
  font-size: 1.02rem;
}

.info-card p {
  margin: 0;
  color: #3c3732;
  line-height: 1.65;
}

.info-card ul {
  margin: 0;
  padding-left: 20px;
  color: #3c3732;
  line-height: 1.65;
}

.info-card li + li {
  margin-top: 4px;
}

.quote {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.quote-source {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px 14px 16px;
  }

  .header {
    padding: 12px 12px;
    border-radius: 14px;
  }

  .main-title {
    font-size: clamp(1.75rem, 8vw, 2.35rem);
  }

  .main-title span {
    display: block;
    margin-left: 0;
    margin-top: 4px;
    font-size: 0.42em;
  }

  .subtext {
    font-size: 1.02rem;
  }

  :root {
    --ring-size: 246px;
  }

  .tap-button {
    width: 162px;
    height: 162px;
  }

  .tap-word {
    font-size: 1.45rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .controls-card {
    flex-direction: column;
    align-items: stretch;
  }

  .control-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .reminder-time-toggle {
    justify-content: space-between;
    width: 100%;
  }
}
