/* ── Google Fonts ──────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=EB+Garamond:ital,wght@0,400;0,500;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Gold palette */
  --gold:      #c9a84c;
  --gold-lt:   #f0d080;
  --gold-deep: #a07830;
  --gold-dim:  rgba(201,168,76,.18);
  --gold-glow: rgba(201,168,76,.06);

  /* Sacred dark surfaces */
  --surface:   #0d1520;
  --surface-2: #111928;
  --card:      #141e35;
  --blue:      #1a2a4a;
  --blue-lt:   #243659;

  /* Text */
  --text:      #ede8e0;   /* warm parchment — not cold white */
  --muted:     #8090b0;

  /* Status */
  --success:   #4caf88;
  --error:     #e05252;

  /* Shape */
  --radius:    14px;
  --shadow:    0 8px 40px rgba(0,0,0,.55);
}

html { font-size: 18px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--surface);
  background-image:
    radial-gradient(ellipse 100% 35% at 50% 0%, rgba(201,168,76,.06) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(13,21,32,.8) 0%, transparent 80%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
header {
  text-align: center;
  padding: 3.5rem 1rem 2.2rem;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

header h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.3;
  background: linear-gradient(160deg, var(--gold-lt) 0%, var(--gold) 60%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--muted);
  margin-top: .6rem;
  font-size: 1.1rem;
  letter-spacing: .01em;
}

/* Ornamental gold rule under header */
header::after {
  content: '';
  display: block;
  width: 64px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 1.8rem auto 0;
  opacity: .7;
}

/* ── Main ────────────────────────────────────────────────────────────────── */
main {
  width: 100%;
  max-width: 680px;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--gold-dim);
  border-top: 2px solid rgba(201,168,76,.38);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .07em;
  color: var(--gold-lt);
  margin-bottom: 1.4rem;
}

.hidden { display: none !important; }

/* ── Form ────────────────────────────────────────────────────────────────── */
.field { margin-bottom: 1.2rem; }

.field label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: .73rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: .5rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.field input {
  width: 100%;
  padding: .78rem 1rem;
  background: var(--blue);
  border: 1px solid rgba(201,168,76,.18);
  border-radius: 8px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}

.field input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,.08);
}

.field input::placeholder { color: #3a4a6a; }

#submit-btn {
  width: 100%;
  padding: .95rem;
  background: linear-gradient(135deg, #b8902a, var(--gold), #d4a840);
  border: none;
  border-radius: 10px;
  color: #180e00;
  font-family: 'Cinzel', serif;
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: opacity .2s, transform .1s, box-shadow .2s;
  margin-top: .4rem;
  box-shadow: 0 4px 16px rgba(180,140,40,.25);
}

#submit-btn:hover {
  opacity: .92;
  box-shadow: 0 6px 22px rgba(180,140,40,.38);
}

#submit-btn:active  { transform: scale(.98); }
#submit-btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ── Progress ─────────────────────────────────────────────────────────────── */
.progress-wrap {
  background: var(--blue);
  border-radius: 99px;
  height: 6px;
  overflow: hidden;
  margin-bottom: .9rem;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold-lt));
  border-radius: 99px;
  transition: width .4s ease;
  box-shadow: 0 0 8px rgba(201,168,76,.5);
}

.progress-label {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: .95rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
  text-align: center;
}

.steps { display: flex; flex-direction: column; gap: .5rem; }

.step {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: var(--muted);
  padding: .5rem .9rem;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: all .3s;
}

.step.active {
  color: var(--gold-lt);
  border-left-color: var(--gold);
  background: rgba(201,168,76,.06);
}

.step.done {
  color: var(--success);
  border-left-color: var(--success);
}

/* ── Result ──────────────────────────────────────────────────────────────── */
.prayer-text-box {
  background: rgba(10,15,28,.6);
  border-radius: 10px;
  border-left: 3px solid rgba(201,168,76,.45);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.4rem;
}

.prayer-text-box h3 {
  font-family: 'Cinzel', serif;
  font-size: .7rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: .14em;
  margin-bottom: .8rem;
}

.prayer-text-box p {
  font-family: 'EB Garamond', serif;
  font-size: 1.18rem;
  line-height: 1.95;
  color: var(--text);
  font-style: italic;
}

.video-wrap {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1.4rem;
  display: flex;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(0,0,0,.6);
}

video {
  max-width: 100%;
  max-height: 500px;
  display: block;
}

.actions { display: flex; gap: .85rem; flex-wrap: wrap; }

.btn-primary {
  flex: 1;
  padding: .75rem 1.2rem;
  background: linear-gradient(135deg, #b8902a, var(--gold));
  color: #180e00;
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .04em;
  border-radius: 9px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: opacity .2s, box-shadow .2s;
  box-shadow: 0 3px 12px rgba(180,140,40,.22);
}

.btn-primary:hover {
  opacity: .9;
  box-shadow: 0 5px 18px rgba(180,140,40,.36);
}

.btn-secondary {
  flex: 1;
  padding: .75rem 1.2rem;
  background: transparent;
  border: 1px solid rgba(201,168,76,.3);
  color: var(--gold-lt);
  font-family: 'Inter', sans-serif;
  font-size: .9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}

.btn-secondary:hover {
  background: rgba(201,168,76,.07);
  border-color: rgba(201,168,76,.5);
}

/* ── WhatsApp button ─────────────────────────────────────────────────────── */
.btn-whatsapp {
  flex: 1;
  padding: .75rem 1.2rem;
  background: #25D366;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .9rem;
  border-radius: 9px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  transition: opacity .2s, transform .1s;
}

.btn-whatsapp:hover  { opacity: .9; }
.btn-whatsapp:active { transform: scale(.98); }

/* ── My Videos section ───────────────────────────────────────────────────── */
.empty-state {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
  padding: 1rem 0;
}

.mv-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .65rem 0;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.mv-item:last-child { border-bottom: none; }

.mv-body {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.mv-for  { font-family: 'Inter', sans-serif; font-size: .85rem; color: var(--gold-lt); font-weight: 600; }
.mv-date { font-family: 'Inter', sans-serif; font-size: .78rem; color: var(--muted); white-space: nowrap; }

.mv-actions {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.mv-btn {
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  padding: .3rem .7rem;
  border-radius: 7px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.mv-btn:hover  { opacity: .85; }
.mv-btn:active { transform: scale(.96); }

.mv-watch    { background: rgba(201,168,76,.15); color: var(--gold-lt); }
.mv-whatsapp { background: rgba(37,211,102,.15); color: #4ade80; }
.mv-download { background: rgba(138,154,184,.12); color: var(--muted); }
.mv-delete   { background: rgba(224,82,82,.1); color: var(--error); }

/* ── Error ───────────────────────────────────────────────────────────────── */
#error-section h2  { color: var(--error); font-family: 'Cinzel', serif; }
#error-message     { color: var(--muted); margin-bottom: 1.2rem; font-family: 'EB Garamond', serif; font-style: italic; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  color: var(--muted);
  font-family: 'Inter', sans-serif;
  font-size: .75rem;
  letter-spacing: .04em;
  opacity: .7;
}

footer::before {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,168,76,.4), transparent);
  margin: 0 auto 1.2rem;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  header h1  { font-size: 1.5rem; }
  .card      { padding: 1.4rem; }
  .actions   { flex-direction: column; }
}
