:root {
  --bg-1: #0b1020;
  --bg-2: #131a36;
  --bg-3: #1d2552;
  --ink: #f3eedf;
  --ink-dim: #c9c0a5;
  --gold: #e9c97a;
  --gold-soft: #f4dfa6;
  --accent: #8bb8ff;
  --card-bg: rgba(255, 255, 255, 0.06);
  --card-border: rgba(233, 201, 122, 0.28);
  --chip-bg: rgba(255, 255, 255, 0.05);
  --chip-active: rgba(233, 201, 122, 0.18);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(139, 184, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(233, 201, 122, 0.14), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2) 40%, var(--bg-3));
  background-attachment: fixed;
  overflow-x: hidden;
}

.stars, .glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.stars {
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.7) 50%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.6) 50%, transparent 100%),
    radial-gradient(1.2px 1.2px at 40% 70%, rgba(255,255,255,0.55) 50%, transparent 100%),
    radial-gradient(1px 1px at 85% 20%, rgba(255,255,255,0.6) 50%, transparent 100%),
    radial-gradient(1px 1px at 10% 80%, rgba(255,255,255,0.45) 50%, transparent 100%),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(255,255,255,0.5) 50%, transparent 100%),
    radial-gradient(1px 1px at 30% 90%, rgba(255,255,255,0.4) 50%, transparent 100%);
  opacity: 0.55;
  animation: twinkle 8s ease-in-out infinite alternate;
}
.glow {
  background: radial-gradient(700px 360px at 50% 35%, rgba(244, 223, 166, 0.18), transparent 70%);
  filter: blur(20px);
}
@keyframes twinkle {
  from { opacity: 0.35; }
  to   { opacity: 0.7; }
}

.site-header {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand-mark {
  font-size: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #2a2410;
  box-shadow: 0 8px 26px rgba(233, 201, 122, 0.35);
}
.brand-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  font-size: 28px;
  margin: 0;
  letter-spacing: 0.5px;
}
.brand-tag {
  margin: 2px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  background: var(--chip-bg);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
  font-family: inherit;
}
.chip:hover { background: rgba(255,255,255,0.09); }
.chip.active {
  background: var(--chip-active);
  border-color: var(--gold);
  color: var(--gold-soft);
}

.stage {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 40px auto 0;
  padding: 0 24px;
}

.verse-card {
  position: relative;
  padding: 56px 40px 36px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.verse-card::before {
  content: '\201C';
  position: absolute;
  top: -30px;
  left: 14px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 220px;
  line-height: 1;
  color: rgba(233, 201, 122, 0.15);
  pointer-events: none;
}
.verse-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(244, 223, 166, 0.04), transparent 40%);
  pointer-events: none;
}

.badge {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-soft);
  background: rgba(233, 201, 122, 0.13);
  border: 1px solid rgba(233, 201, 122, 0.35);
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}

.verse-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.5;
  margin: 0 0 22px;
  position: relative;
  z-index: 1;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.verse-text.fade {
  opacity: 0;
  transform: translateY(8px);
}

.verse-ref {
  font-style: normal;
  color: var(--gold-soft);
  font-weight: 500;
  letter-spacing: 0.4px;
  position: relative;
  z-index: 1;
  font-size: 15px;
}

.card-actions {
  margin-top: 28px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--ink);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.1s ease;
}
.icon-btn:hover {
  background: rgba(233, 201, 122, 0.15);
  color: var(--gold-soft);
  transform: translateY(-1px);
}
.icon-btn.play {
  background: linear-gradient(160deg, var(--gold-soft), var(--gold));
  color: #2a2410;
  border-color: transparent;
}
.icon-btn.play:hover {
  filter: brightness(1.05);
}
.icon-btn.saved {
  color: var(--gold);
  background: rgba(233, 201, 122, 0.16);
  border-color: rgba(233, 201, 122, 0.4);
}
.icon-btn.saved svg path { fill: currentColor; }

.progress {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.05);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-soft), var(--gold));
  transition: width 0.2s linear;
}

.meta {
  text-align: center;
  margin: 18px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  letter-spacing: 0.6px;
}

.favorites {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 40px auto 0;
  padding: 0 24px;
}
.favorites-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.favorites h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 22px;
  margin: 0;
  color: var(--gold-soft);
}
.link-btn {
  background: none;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-family: inherit;
}
.link-btn:hover { color: var(--gold-soft); }
.favorites-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.favorites-list li {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.fav-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  line-height: 1.45;
  margin: 0 0 4px;
}
.fav-ref {
  color: var(--gold-soft);
  font-size: 12px;
  letter-spacing: 0.5px;
}
.fav-remove {
  background: none;
  border: none;
  color: var(--ink-dim);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.fav-remove:hover { color: #ffb4b4; }

.site-footer {
  position: relative;
  z-index: 2;
  max-width: 880px;
  margin: 50px auto 40px;
  padding: 0 24px;
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.6;
}
.site-footer .small {
  margin-top: 6px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  color: var(--gold-soft);
}
kbd {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: inherit;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 25, 50, 0.95);
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .verse-card { padding: 44px 24px 30px; }
  .verse-card::before { font-size: 160px; top: -20px; }
  .site-header { padding-top: 20px; }
  .filters { width: 100%; justify-content: flex-start; }
}
