/* ═══════════════ AI STUDIO — VYLUX TECH ═══════════════ */
:root {
  --bg: #050507;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-solid: #0b0b10;
  --line: rgba(255, 255, 255, 0.09);
  --text: #f2f3f7;
  --muted: #8b8d9b;
  --pink: #ff5ad0;
  --mint: #6ee7b7;
  --cyan: #22d3ee;
  --blue: #3b82f6;
  --r: 22px;
  --font: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ambient gradient glows */
.glow { position: fixed; border-radius: 50%; filter: blur(120px); opacity: .20; pointer-events: none; z-index: 0; }
.glow-a { width: 620px; height: 620px; top: -280px; left: -180px; background: radial-gradient(circle, var(--pink), transparent 65%); }
.glow-b { width: 700px; height: 700px; bottom: -340px; right: -220px; background: radial-gradient(circle, var(--cyan), transparent 65%); }

/* ══ top bar ══ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 5vw, 56px);
  backdrop-filter: blur(14px);
  background: rgba(5, 5, 7, .72);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.mark { width: 38px; height: 38px; flex: none; }
.brand-text { font-size: 17px; font-weight: 600; letter-spacing: .16em; }
.brand-text em { font-style: normal; font-weight: 400; color: var(--muted); letter-spacing: .22em; }
.topnav { display: flex; align-items: center; gap: 18px; }
.pill {
  font-size: 10.5px; letter-spacing: .18em; font-weight: 600;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted);
}
.ghost-link { font-size: 13px; color: var(--muted); text-decoration: none; transition: color .2s; }
.ghost-link:hover { color: var(--text); }

/* ══ hero ══ */
main { position: relative; z-index: 1; flex: 1; width: 100%; max-width: 880px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 32px) 64px; }
.hero { position: relative; text-align: center; padding: clamp(44px, 8vh, 88px) 0 32px; }
.hero h1 { font-size: clamp(34px, 6.4vw, 58px); line-height: 1.06; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 600; }
.grad {
  background: linear-gradient(96deg, var(--mint) 0%, var(--cyan) 46%, var(--pink) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sub { color: var(--muted); font-size: clamp(15px, 2vw, 17px); max-width: 560px; margin: 0 auto; }
.sparkles { position: absolute; inset: 0; pointer-events: none; }
.sparkles svg { position: absolute; fill: var(--pink); filter: drop-shadow(0 0 10px rgba(255, 90, 208, .55)); opacity: .85; }
.sparkles svg:nth-child(1) { width: 26px; left: 6%; top: 22%; animation: twinkle 5s ease-in-out infinite; }
.sparkles svg:nth-child(2) { width: 15px; right: 9%; top: 46%; fill: var(--mint); filter: drop-shadow(0 0 8px rgba(110, 231, 183, .5)); animation: twinkle 6.5s ease-in-out infinite .8s; }
@keyframes twinkle { 0%, 100% { transform: scale(.85) rotate(0deg); opacity: .5; } 50% { transform: scale(1.15) rotate(24deg); opacity: 1; } }

/* ══ tabs ══ */
.tabs { display: inline-flex; gap: 4px; padding: 4px; margin-top: 34px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.tab {
  appearance: none; border: 0; cursor: pointer; font-family: var(--font); font-size: 14px; font-weight: 500;
  color: var(--muted); background: transparent; padding: 10px 22px; border-radius: 999px; transition: all .22s;
}
.tab:hover { color: var(--text); }
.tab.active { color: #05050a; background: linear-gradient(96deg, var(--mint), var(--cyan)); font-weight: 600; }

/* ══ panels / cards ══ */
.panel { display: none; }
.panel.active { display: block; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(20px, 4vw, 32px);
  margin-bottom: 18px;
  backdrop-filter: blur(10px);
}
.card.result { border-color: rgba(110, 231, 183, .22); }

/* ══ fields ══ */
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.hint { text-transform: none; letter-spacing: 0; color: rgba(139,141,155,.72); font-weight: 400; }
input, select, textarea {
  width: 100%; font-family: var(--font); font-size: 15px; color: var(--text);
  background: #0a0a0f; border: 1px solid var(--line); border-radius: 14px;
  padding: 13px 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
input::placeholder, textarea::placeholder { color: #555764; }
input:focus, select:focus, textarea:focus {
  border-color: rgba(34, 211, 238, .55);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .12);
}
textarea { resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #6b6d7a 50%), linear-gradient(135deg, #6b6d7a 50%, transparent 50%); background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .row2 { grid-template-columns: 1fr; } }

/* ══ singers ══ */
.singer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 12px; }
.singer-head .field-label { margin: 0; }
.search { width: 200px; padding: 9px 14px; font-size: 13.5px; border-radius: 999px; }
.singer-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px;
  max-height: 330px; overflow-y: auto; padding: 4px 4px 22px; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
}
.singer-grid::-webkit-scrollbar { width: 6px; }
.singer-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 999px; }
.singer {
  cursor: pointer; border: 1px solid var(--line); background: #0a0a0f; border-radius: 16px;
  padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  transition: all .2s; font-family: var(--font);
}
.singer:hover { border-color: rgba(255,255,255,.22); transform: translateY(-2px); }
.singer.sel { border-color: var(--mint); background: rgba(110,231,183,.07); box-shadow: 0 0 0 1px rgba(110,231,183,.35), 0 6px 24px -12px rgba(110,231,183,.6); }
.avatar {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-weight: 700; font-size: 17px; color: #05050a;
}
.singer span { font-size: 12.5px; color: #cfd1db; text-align: center; line-height: 1.25; }
.skeleton { height: 96px; border-radius: 16px; background: linear-gradient(100deg, #0a0a0f 25%, #14141c 50%, #0a0a0f 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ══ buttons ══ */
.cta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; margin-top: 20px; padding: 15px 22px;
  border: 0; border-radius: 16px; cursor: pointer;
  font-family: var(--font); font-size: 15.5px; font-weight: 600; color: #05050a;
  background: linear-gradient(96deg, var(--mint), var(--cyan) 60%, #7dd3fc);
  transition: transform .18s, box-shadow .18s, opacity .18s;
  box-shadow: 0 10px 34px -18px rgba(34, 211, 238, .9);
  text-decoration: none;
}
.cta:hover { transform: translateY(-1px); box-shadow: 0 14px 40px -16px rgba(34,211,238,.95); }
.cta:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.cta.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); box-shadow: none; }
.cta.ghost:hover { border-color: var(--mint); }
.arrow { font-size: 18px; line-height: 1; }

/* ══ result ══ */
.result-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.result-head h3 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.progress { height: 6px; border-radius: 999px; background: #13131a; overflow: hidden; }
.bar { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, var(--mint), var(--cyan), var(--pink)); transition: width .6s ease; }
.micro { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.mono { font-family: var(--mono); letter-spacing: .04em; }
audio { width: 100%; margin-top: 16px; border-radius: 12px; filter: invert(.92) hue-rotate(180deg); }

/* ══ misc ══ */
.disclaimer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 8px; }
.disclaimer strong { color: #b9bbc6; }
footer {
  position: relative; z-index: 1; display: flex; gap: 8px; align-items: center; justify-content: center;
  padding: 26px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px;
}
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.sep { opacity: .4; }

/* ═══════════ upload dropzone ═══════════ */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: clamp(26px, 6vw, 38px) 18px; text-align: center;
  border: 1.5px dashed rgba(255, 255, 255, .16); border-radius: 18px;
  background: linear-gradient(180deg, rgba(110, 231, 183, .045), rgba(34, 211, 238, .02));
  cursor: pointer; transition: border-color .2s, background .2s, transform .15s;
  -webkit-tap-highlight-color: transparent; min-height: 148px;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.over {
  border-color: rgba(110, 231, 183, .65);
  background: linear-gradient(180deg, rgba(110, 231, 183, .09), rgba(34, 211, 238, .05));
  outline: none;
}
.dropzone:active { transform: scale(.995); }
.dropzone.ready { border-style: solid; border-color: rgba(110, 231, 183, .45); }
.dropzone strong { font-size: 15.5px; font-weight: 600; }
.dropzone span { font-size: 12.5px; color: var(--muted); max-width: 320px; }
.dz-icon {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 4px;
  border-radius: 14px; color: #05050a;
  background: linear-gradient(135deg, var(--mint), var(--cyan));
  box-shadow: 0 10px 26px -14px rgba(34, 211, 238, .95);
}
.dz-icon svg { width: 22px; height: 22px; }
.upwrap { width: 100%; max-width: 320px; margin-top: 12px; }
.progress.slim { height: 4px; }
.link-toggle {
  display: block; margin: 14px auto 0; background: none; border: 0; cursor: pointer;
  color: var(--muted); font-family: var(--font); font-size: 13px; text-decoration: underline;
  text-underline-offset: 3px; padding: 8px 10px;
}
.link-toggle:hover { color: var(--text); }

/* ═══════════ mobile ═══════════ */
@media (max-width: 720px) {
  .topbar { padding: 12px 16px; }
  .brand-text { font-size: 15px; letter-spacing: .12em; }
  .mark { width: 32px; height: 32px; }
  .pill { display: none; }
  .hero { padding: 26px 0 22px; }
  .sub { font-size: 14.5px; padding: 0 6px; }
  .tabs { width: 100%; margin-top: 22px; }
  .tab { flex: 1; padding: 12px 8px; font-size: 13.5px; }
  .card { padding: 18px 16px; border-radius: 20px; }
  .singer-head { flex-wrap: wrap; gap: 8px; }
  .search { width: 100%; }
  .singer-grid { grid-template-columns: repeat(3, 1fr); max-height: none; overflow: visible;
                 -webkit-mask-image: none; mask-image: none; gap: 8px; }
  .singer { padding: 12px 6px; border-radius: 14px; }
  .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 15px; }
  .singer span { font-size: 11.5px; }
  input, select, textarea { font-size: 16px; } /* stops iOS zoom-on-focus */
  .cta { padding: 16px 20px; font-size: 16px; }
  footer { padding: 20px 16px calc(22px + env(safe-area-inset-bottom)); font-size: 12px; flex-wrap: wrap; }
  main { padding-bottom: 28px; }
  .glow { opacity: .13; }
}
@media (max-width: 380px) {
  .singer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 30px; }
}
