/* =========================================================
   MittiYulduz — kids music platform
   Color palette (mittiYulduz.png asosida):
     --navy-1: #0B1845  (deep night sky)
     --navy-2: #142555
     --navy-3: #1E2A78
     --gold:   #FFD93D  (yulduz)
     --gold-2: #FFC107
     --orange: #FFA726
     --glow:   #FFE680
   ========================================================= */
:root {
  --navy-1: #0B1845;
  --navy-2: #142555;
  --navy-3: #1E2A78;
  --gold:   #FFD93D;
  --gold-2: #FFC107;
  --orange: #FFA726;
  --glow:   #FFE680;
  --white:  #FFFFFF;
  --muted:  #B7C0E0;
  --danger: #FF4D6D;
  --success:#4ADE80;
  --shadow: 0 8px 30px rgba(0,0,0,.35);
  --radius: 18px;
  --radius-lg: 26px;
  --font-display: 'Baloo 2', system-ui, sans-serif;
  --font-body:    'Comfortaa', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--white);
  background:
    radial-gradient(ellipse at 20% 10%, #243089 0%, transparent 55%),
    radial-gradient(ellipse at 80% 90%, #2a1d6a 0%, transparent 55%),
    linear-gradient(180deg, var(--navy-1) 0%, var(--navy-2) 50%, var(--navy-3) 100%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* === Yulduzli fon === */
.mu-stars {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 20% 30%, var(--glow) 50%, transparent 60%),
    radial-gradient(1px 1px at 60% 80%, #fff 50%, transparent 60%),
    radial-gradient(2px 2px at 80% 10%, var(--gold) 50%, transparent 60%),
    radial-gradient(1px 1px at 30% 70%, #fff 50%, transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 50%, var(--glow) 50%, transparent 60%),
    radial-gradient(1px 1px at 10% 90%, #fff 50%, transparent 60%),
    radial-gradient(2px 2px at 50% 25%, var(--gold) 50%, transparent 60%);
  background-size: 600px 600px;
  animation: muStarsTwinkle 6s ease-in-out infinite alternate;
  opacity: .6;
}
@keyframes muStarsTwinkle {
  0%   { opacity: .35; }
  100% { opacity: .75; }
}

/* === Header === */
.mu-header {
  position: relative; z-index: 5;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(16px, 3vw, 36px);
}
.mu-logo {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--white); font-family: var(--font-display); font-weight: 800;
  font-size: 1.4rem;
}
.mu-logo__star {
  display: inline-block; color: var(--gold); font-size: 1.6rem;
  filter: drop-shadow(0 0 8px var(--gold));
  animation: muSpin 6s linear infinite;
}
@keyframes muSpin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
.mu-logo__text span { color: var(--gold); }
.mu-user__name {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: 8px 14px; border-radius: 999px;
  font-size: .9rem;
}

/* === Main / Card === */
.mu-main {
  position: relative; z-index: 2;
  padding: clamp(16px, 3vw, 36px);
  display: flex; justify-content: center;
  min-height: calc(100vh - 200px);
}
.mu-card {
  width: 100%; max-width: 560px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 36px);
  box-shadow: var(--shadow);
}
.mu-card--narrow { max-width: 460px; }
.mu-card--wide   { max-width: 760px; }

.mu-card__header { text-align: center; margin-bottom: 22px; }
.mu-mascot {
  font-size: 56px;
  display: inline-block; line-height: 1;
  filter: drop-shadow(0 0 18px var(--gold));
  animation: muFloat 3s ease-in-out infinite alternate;
}
@keyframes muFloat {
  from { transform: translateY(0) rotate(-3deg); }
  to   { transform: translateY(-8px) rotate(3deg); }
}
.mu-title {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.5rem, 4vw, 2rem); margin: 12px 0 6px;
}
.mu-sub { color: var(--muted); font-size: .98rem; margin: 0; }
.mu-fineprint { color: var(--muted); font-size: .8rem; text-align: center; margin-top: 14px; }
.mu-fineprint a { color: var(--gold); }

/* === Forms === */
.mu-form { display: flex; flex-direction: column; gap: 14px; }
.mu-field { display: flex; flex-direction: column; gap: 6px; }
.mu-field__label { font-size: .9rem; font-weight: 700; color: var(--glow); }
.mu-field__label em { color: var(--orange); font-style: normal; }
.mu-field input, .mu-field textarea, .mu-field select,
.adm-input {
  font: inherit; color: var(--white);
  background: rgba(11,24,69,.45);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.mu-field input:focus, .mu-field textarea:focus,
.adm-input:focus {
  border-color: var(--gold);
  background: rgba(11,24,69,.65);
  box-shadow: 0 0 0 4px rgba(255,217,61,.18);
}
.mu-field textarea { resize: vertical; min-height: 96px; }
.mu-hint { color: var(--muted); font-size: .78rem; }

/* Input + ichki tugma (parol ko'zchasi va boshqalar uchun) */
.mu-input-wrap { position: relative; display: block; }
.mu-input-wrap > input { width: 100%; padding-right: 52px; box-sizing: border-box; }
.mu-input-btn {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer; color: var(--glow);
  font-size: 1.1rem; line-height: 1; padding: 0;
  transition: background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
}
.mu-input-btn:hover, .mu-input-btn:focus-visible {
  background: rgba(255,217,61,.14); color: var(--gold); outline: none;
}
.mu-input-btn svg { width: 22px; height: 22px; display: block; }

/* === Buttons === */
.mu-btn {
  font: inherit; font-family: var(--font-display); font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: 14px; border: none;
  text-decoration: none;
  cursor: pointer; user-select: none;
  transition: transform .12s, box-shadow .2s, background .2s, opacity .2s;
}
.mu-btn:active { transform: translateY(1px) scale(.98); }
.mu-btn:disabled { opacity: .55; cursor: not-allowed; }
.mu-btn--xl { padding: 16px 26px; font-size: 1.05rem; width: 100%; }
.mu-btn--primary {
  color: var(--navy-1);
  background: linear-gradient(135deg, var(--gold) 0%, var(--orange) 100%);
  box-shadow: 0 6px 20px rgba(255,217,61,.35), inset 0 0 0 1px rgba(255,255,255,.4);
}
.mu-btn--primary:hover { box-shadow: 0 10px 28px rgba(255,217,61,.5); }
.mu-btn--ghost {
  color: var(--white); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.16);
}
.mu-btn--ghost:hover { background: rgba(255,255,255,.14); }
.mu-btn--pay {
  color: var(--white);
  background: linear-gradient(135deg, #00a4ff 0%, #0078d4 100%);
  box-shadow: 0 6px 20px rgba(0,164,255,.35);
}
.mu-btn.is-loading { position: relative; color: transparent !important; }
.mu-btn.is-loading::after {
  content: ''; position: absolute; left: 50%; top: 50%;
  width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(0,0,0,.25); border-top-color: var(--navy-1);
  border-radius: 50%; animation: muSpin .7s linear infinite;
}

/* === Pills (radio chips) === */
.mu-pillgroup { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-pill { cursor: pointer; }
.mu-pill input { position: absolute; opacity: 0; }
.mu-pill > span {
  display: inline-flex; padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.16);
  font-weight: 600; transition: all .15s;
}
.mu-pill input:checked + span {
  background: var(--gold); color: var(--navy-1); border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(255,217,61,.2);
}

/* === Tag cloud (multi checkboxes) === */
.mu-tagcloud { display: flex; flex-wrap: wrap; gap: 8px; }
.mu-tag { cursor: pointer; }
.mu-tag input { position: absolute; opacity: 0; }
.mu-tag > span {
  display: inline-flex; padding: 9px 14px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.14);
  font-size: .9rem; transition: all .15s;
}
.mu-tag input:checked + span {
  background: linear-gradient(135deg, var(--navy-3), var(--navy-2));
  border-color: var(--gold); color: var(--gold);
}

/* === Grid === */
.mu-grid { display: grid; gap: 14px; }
.mu-grid--2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 540px) { .mu-grid--2 { grid-template-columns: 1fr; } }

/* === Stepper === */
.mu-stepper { display: flex; align-items: center; gap: 4px; margin-bottom: 22px; }
.mu-stepper__item {
  display: flex; align-items: center; gap: 8px; flex: 0 1 auto;
  padding: 8px 12px; border-radius: 12px; opacity: .5; transition: all .25s;
}
.mu-stepper__item span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,.1); font-weight: 700;
}
.mu-stepper__item b { font-size: .85rem; }
.mu-stepper__item.is-active { opacity: 1; }
.mu-stepper__item.is-active span { background: var(--gold); color: var(--navy-1); }
.mu-stepper__item.is-done span { background: var(--success); color: var(--navy-1); }
.mu-stepper__sep { flex: 1 1 auto; height: 2px; background: rgba(255,255,255,.1); border-radius: 2px; }
@media (max-width: 540px) {
  .mu-stepper__item b { display: none; }
}

/* === Steps === */
.mu-step { animation: muFadeIn .3s ease-out; display: flex; flex-direction: column; gap: 18px; }
.mu-step[hidden] { display: none !important; }
@keyframes muFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mu-step__title { font-family: var(--font-display); font-size: 1.4rem; margin: 0; }
.mu-step__sub   { color: var(--muted); margin: -10px 0 4px; }
.mu-actions { margin-top: 10px; }
.mu-actions--split { display: flex; gap: 10px; }
.mu-actions--split .mu-btn { flex: 1; }
.mu-actions--split .mu-btn--ghost { flex: 0 1 30%; }
@media (max-width: 540px) {
  .mu-actions--split .mu-btn--ghost { flex: 0 0 40%; }
}

/* === Theme grid (presets) === */
.mu-themegrid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  margin-bottom: 16px;
}
.mu-theme {
  position: relative; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  padding: 14px 14px 14px 14px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.14);
  border-radius: 14px;
  transition: all .15s;
}
.mu-theme input { position: absolute; opacity: 0; pointer-events: none; }
.mu-theme:hover { background: rgba(255,255,255,.09); }
.mu-theme__emoji { font-size: 1.4rem; }
.mu-theme__title { font-weight: 600; font-size: .92rem; }
.mu-theme__check {
  margin-left: auto; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center;
  opacity: 0; transition: all .15s; color: var(--navy-1);
}
.mu-theme:has(input:checked) {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255,217,61,.15), rgba(255,167,38,.1));
}
.mu-theme:has(input:checked) .mu-theme__check {
  opacity: 1; background: var(--gold);
}

/* === Melody list === */
.mu-melodylist { display: flex; flex-direction: column; gap: 10px; }
.mu-melody {
  display: flex; align-items: center; gap: 14px;
  padding: 14px; border-radius: 16px;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.14);
  cursor: pointer; transition: all .15s;
}
.mu-melody input { position: absolute; opacity: 0; pointer-events: none; }
.mu-melody:has(input:checked) {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255,217,61,.15), rgba(255,167,38,.08));
  box-shadow: 0 0 0 3px rgba(255,217,61,.15);
}
.mu-melody__play {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  background: var(--gold); color: var(--navy-1); border: none;
  font-size: 1.1rem; cursor: pointer; transition: all .15s;
  display: inline-flex; align-items: center; justify-content: center;
}
.mu-melody__play:hover { transform: scale(1.06); }
.mu-melody__play.is-playing { background: var(--success); }
.mu-melody__info { flex: 1; }
.mu-melody__info b { display: block; font-family: var(--font-display); font-size: 1rem; }
.mu-melody__info small { color: var(--muted); font-size: .82rem; }
.mu-melody__check {
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.08); display: inline-flex; align-items: center; justify-content: center;
  color: var(--navy-1); opacity: 0; transition: all .15s;
}
.mu-melody:has(input:checked) .mu-melody__check { opacity: 1; background: var(--gold); }

/* === Payment === */
.mu-payment {
  background: rgba(255,255,255,.05);
  border-radius: 16px; padding: 18px; margin-bottom: 18px;
  border: 1.5px solid rgba(255,255,255,.12);
}
.mu-payment__row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; color: var(--muted);
}
.mu-payment__row + .mu-payment__row { border-top: 1px dashed rgba(255,255,255,.12); }
.mu-payment__row b { color: var(--white); font-family: var(--font-display); }
.mu-payment__row--total b { color: var(--gold); font-size: 1.5rem; }
.mu-pay-benefits {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}
.mu-pay-benefits__item {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--white);
  font-size: .9rem;
}
.mu-fineprint--pay {
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
}

/* === Success === */
.mu-success { text-align: center; }
.mu-success__back { margin-top: 16px; }
.mu-success__icon {
  font-size: 80px; line-height: 1;
  filter: drop-shadow(0 0 30px var(--gold));
  animation: muPop .5s ease-out;
}
.mu-success__icon--warn { filter: drop-shadow(0 0 30px var(--orange)); }
@keyframes muPop {
  0% { transform: scale(.4); opacity: 0; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* === Toast === */
.mu-toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(120%);
  background: var(--navy-2); color: var(--white);
  padding: 14px 22px; border-radius: 14px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  z-index: 9999; transition: transform .3s; max-width: 90vw;
}
.mu-toast.is-show { transform: translateX(-50%) translateY(0); }
.mu-toast.is-error { border-left-color: var(--danger); }
.mu-toast.is-success { border-left-color: var(--success); }

/* === Footer === */
.mu-footer {
  position: relative; z-index: 2;
  padding: 24px clamp(16px, 3vw, 36px);
  text-align: center; color: var(--muted); font-size: .85rem;
}
.mu-dot { margin: 0 8px; }
.mu-footer b { color: var(--gold); }
