:root {
  --bg: #12030a;
  --panel: #210812;
  --line: #3d1622;
  --text: #fff3e6;
  --muted: #d6b8a6;
  --gold: #f5c242;
  --gold-2: #e09216;
  --accent: #ff7a3c;
  --radius: 14px;
  --te: "NTR", "Hind", "Poppins", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: radial-gradient(ellipse at top, #3a0a18 0%, var(--bg) 55%) fixed, var(--bg);
  color: var(--text);
  font: 400 16px/1.55 "Poppins", var(--te);
  -webkit-text-size-adjust: 100%;
}
button, input, textarea { font: inherit; color: inherit; }
a { color: var(--gold); }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; position: sticky; top: 0; z-index: 5;
  background: rgba(18, 3, 10, 0.88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { font-weight: 600; text-decoration: none; letter-spacing: 0.2px; }
.langs { display: flex; gap: 4px; background: var(--panel); border-radius: 999px; padding: 3px; }
.langs button {
  border: 0; background: transparent; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  font-size: 14px; color: var(--muted);
}
.langs button.on { background: var(--gold); color: #2a0a00; }

main { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; }
.hero { text-align: center; padding: 28px 0 8px; }
.hero h1 {
  font-family: "Ramabhadra", "Yatra One", serif; font-weight: 400;
  font-size: clamp(26px, 6.5vw, 40px); line-height: 1.3; margin: 0 0 8px;
  color: var(--gold); text-shadow: 0 0 24px rgba(255, 160, 40, 0.35);
}
.hero p { margin: 0; color: var(--muted); }

.step { margin-top: 28px; }
.step h2 {
  display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 500; margin: 0 0 12px;
}
.num {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--gold); color: #2a0a00; font-size: 15px; font-weight: 600; flex: none;
}

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile {
  border: 2px solid transparent; border-radius: 12px; padding: 0; background: var(--panel);
  cursor: pointer; overflow: hidden; text-align: center;
}
.tile canvas { display: block; width: 100%; aspect-ratio: 9 / 16; }
.tile span { display: block; font-size: 12.5px; padding: 6px 4px 8px; color: var(--muted); line-height: 1.3; }
.tile.on { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245, 194, 66, 0.25); }
.tile.on span { color: var(--gold); }

form { display: grid; gap: 14px; }
label { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
input, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 17px; outline: none; resize: vertical;
}
input:focus, textarea:focus { border-color: var(--gold); }

.stage { position: relative; width: min(100%, 360px); margin: 0 auto; }
.stage canvas {
  display: block; width: 100%; aspect-ratio: 9 / 16; border-radius: var(--radius);
  background: #000; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.progress {
  position: absolute; left: 12px; right: 12px; bottom: 12px; height: 34px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.7); overflow: hidden; display: grid; place-items: center;
}
.progress .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(90deg, var(--gold-2), var(--gold)); }
.progress span { position: relative; font-size: 14px; font-weight: 600; color: #fff; text-shadow: 0 1px 3px #000; }

.actions { display: grid; gap: 10px; margin-top: 16px; }
.actions button, .btn {
  display: block; width: 100%; border: 0; border-radius: 12px; padding: 15px 16px; font-size: 17px;
  font-weight: 600; cursor: pointer; text-align: center; text-decoration: none;
}
.primary { background: linear-gradient(180deg, #ff8a3c, #e2531a); color: #fff; }
.gold { background: linear-gradient(180deg, #ffe08a, #e0a52a); color: #3a1600; }
.btn { background: var(--panel); color: var(--text); border: 1px solid var(--line); }
button:disabled { opacity: 0.55; cursor: progress; }
.hint { text-align: center; color: var(--muted); font-size: 13.5px; margin: 10px 0 0; }

.result video { display: block; width: min(100%, 360px); margin: 0 auto; border-radius: var(--radius); background: #000; }

.follow { text-align: center; margin-top: 40px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.follow p { margin: 0 0 10px; color: var(--muted); }
.links { display: flex; justify-content: center; gap: 18px; flex-wrap: wrap; }

footer { text-align: center; padding: 20px 16px 40px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }
footer nav { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px);
  background: #fff3e0; color: #2a0a00; padding: 12px 18px; border-radius: 12px; font-size: 15px;
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.5); z-index: 20;
}

.page { max-width: 720px; margin: 0 auto; padding: 24px 16px 60px; }
.page h1 { color: var(--gold); font-weight: 600; font-size: 26px; }
.page h2 { font-size: 18px; margin-top: 24px; }

@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
  .actions { grid-template-columns: 1fr 1fr; }
}

.lang {
  background: var(--panel); color: var(--text); border: 1px solid var(--gold); border-radius: 999px;
  padding: 7px 12px; font-size: 15px; width: auto; cursor: pointer;
}

[hidden] { display: none !important; }

select#music {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; font-size: 17px; color: var(--text);
}
.pick { display: grid; gap: 6px; font-size: 15px; color: var(--muted); }
.pick-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.btn.small { display: inline-block; width: auto; padding: 10px 16px; font-size: 15px; cursor: pointer; }
.thumb { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
button.link { background: none; border: 0; color: var(--gold); text-decoration: underline; cursor: pointer; font-size: 15px; padding: 4px; }
.hint.left { text-align: left; margin: 0; }
