@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --purple: #7c3aed;
    --purple-light: #a78bfa;
    --purple-glow: rgba(124, 58, 237, 0.3);
    --pink: #f472b6;
    --blue: #60a5fa;
    --bg: #050510;
    --surface: rgba(255,255,255,0.035);
    --surface-hover: rgba(255,255,255,0.06);
    --border: rgba(255,255,255,0.07);
    --border-focus: rgba(167, 139, 250, 0.4);
    --text: #e5e7eb;
    --text-dim: #9ca3af;
    --text-muted: #6b7280;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============ ANIMATED BACKGROUND ============ */
.bg-scene {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}

.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 20s ease-in-out infinite;
}

.bg-orb:nth-child(1) {
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, rgba(88,28,235,0.1) 40%, transparent 70%);
    top: -15%; left: -15%;
    animation-duration: 22s;
}

.bg-orb:nth-child(2) {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(244,114,182,0.2) 0%, rgba(236,72,153,0.08) 40%, transparent 70%);
    bottom: -10%; right: -15%;
    animation-duration: 28s;
    animation-delay: -7s;
}

.bg-orb:nth-child(3) {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(96,165,250,0.15) 0%, rgba(59,130,246,0.05) 40%, transparent 70%);
    top: 35%; left: 40%;
    animation-duration: 35s;
    animation-delay: -12s;
}

.bg-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 70%);
}

.bg-orb:nth-child(4) {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(168,85,247,0.12) 0%, transparent 70%);
    top: 70%; left: 10%;
    animation-duration: 32s;
    animation-delay: -18s;
}

.bg-stars {
    position: absolute; inset: 0;
    background-image:
        radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1px 1px at 50% 10%, rgba(255,255,255,0.12) 0%, transparent 100%),
        radial-gradient(1px 1px at 70% 40%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 80%, rgba(255,255,255,0.1) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 15% 85%, rgba(167,139,250,0.2) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 85% 15%, rgba(244,114,182,0.15) 0%, transparent 100%),
        radial-gradient(1px 1px at 45% 75%, rgba(255,255,255,0.08) 0%, transparent 100%),
        radial-gradient(1px 1px at 65% 55%, rgba(255,255,255,0.06) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 35%, rgba(255,255,255,0.1) 0%, transparent 100%);
    animation: twinkle 8s ease-in-out infinite alternate;
}

@keyframes twinkle {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.06); }
    50% { transform: translate(-20px, 40px) scale(0.94); }
    75% { transform: translate(30px, 20px) scale(1.03); }
}

/* ============ LAYOUT ============ */
.app {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 20px 60px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* ============ SCREENS ============ */
.screen { display: none; }
.screen.active { display: block; animation: screenIn 0.5s ease; }

@keyframes screenIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============ HERO ============ */
.hero { text-align: center; padding: 72px 0 32px; }

.hero-icon {
    font-size: 64px;
    margin-bottom: 20px;
    display: inline-block;
    animation: heroFloat 4s ease-in-out infinite;
    filter: drop-shadow(0 0 20px rgba(124,58,237,0.4));
}

@keyframes heroFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(2deg); }
}

.hero h1 {
    font-size: 30px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, var(--purple-light) 40%, var(--pink) 80%, var(--blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.hero p { font-size: 15px; color: var(--text-dim); line-height: 1.7; }
.hero .hl { color: var(--purple-light); font-weight: 600; }

/* ============ GLASS CARD ============ */
.glass {
    background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
}

.glass:hover { border-color: rgba(255,255,255,0.1); }

/* ============ SOCIAL PROOF BAR ============ */
.proof-bar {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin: 24px 0 32px;
    padding: 16px;
}

.proof-item { text-align: center; }

.proof-num {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--purple-light), var(--pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.proof-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1.5px; margin-top: 2px; }

/* ============ VARIANT GRID ============ */
.section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(var(--purple), var(--pink));
    border-radius: 2px;
}

.variant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
}

.variant-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.variant-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(244,114,182,0.08));
    opacity: 0;
    transition: opacity 0.3s;
}

.variant-card:hover::before { opacity: 1; }

.variant-card:hover {
    border-color: var(--border-focus);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(124,58,237,0.15);
}

.variant-card:active { transform: translateY(-1px); }

.variant-card .v-emoji { font-size: 28px; display: block; margin-bottom: 6px; position: relative; z-index: 1; }
.variant-card .v-name { font-size: 11px; font-weight: 600; color: var(--text); position: relative; z-index: 1; }
.variant-card .v-price { font-size: 11px; color: var(--text-muted); margin-top: 3px; position: relative; z-index: 1; }

/* ============ FORM ============ */
.form-card {
    margin-top: 20px;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.back-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
    font-family: inherit;
}

.back-btn:hover { color: #fff; border-color: var(--border-focus); }
.form-header h2 { font-size: 18px; font-weight: 700; }

.q-group { margin-bottom: 20px; }

.q-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.q-group label .q-emoji { margin-right: 6px; }

.q-group input,
.q-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
    outline: none;
}

.q-group input:focus,
.q-group textarea:focus {
    border-color: var(--purple-light);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.1), 0 0 20px rgba(124,58,237,0.1);
    background: rgba(255,255,255,0.06);
}

.q-group input::placeholder,
.q-group textarea::placeholder { color: var(--text-muted); }
.q-group textarea { resize: none; height: 80px; }

/* Email input */
.email-group { margin-bottom: 20px; }
.email-group input { width: 100%; }
.email-note { font-size: 11px; color: var(--text-muted); margin-top: 6px; }

/* ============ GENRE PICKER ============ */
.genre-section { margin-bottom: 24px; }
.genre-section h3 { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text); }

.genre-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.genre-opt {
    padding: 12px 8px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 12px;
    color: var(--text);
    font-family: inherit;
}

.genre-opt:hover {
    border-color: rgba(167, 139, 250, 0.3);
    background: var(--surface-hover);
}

.genre-opt.selected {
    border-color: var(--purple-light);
    background: rgba(167, 139, 250, 0.12);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.12);
}

.genre-opt .g-emoji { font-size: 20px; display: block; margin-bottom: 4px; }

/* ============ CTA BUTTON ============ */
.cta {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--purple), #9333ea, var(--pink));
    background-size: 200% 200%;
    animation: ctaShimmer 3s ease-in-out infinite;
    border: none;
    border-radius: var(--radius);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

@keyframes ctaShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--purple-glow), 0 2px 8px rgba(244,114,182,0.2);
}

.cta:disabled { opacity: 0.5; cursor: not-allowed; transform: none; animation: none; }
.cta .sub { display: block; font-size: 12px; font-weight: 400; opacity: 0.8; margin-top: 3px; }
.cta .old-price { text-decoration: line-through; opacity: 0.6; }

/* ============ LOADING ============ */
.loading-wrap { text-align: center; padding: 80px 0 40px; }
.loading-wrap h2 { font-size: 20px; margin: 16px 0 4px; }
.loading-wrap .pct { color: var(--text-dim); font-size: 14px; }

.prog-bar {
    width: 100%; height: 5px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    margin: 20px 0;
    overflow: hidden;
}

.prog-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--purple), var(--purple-light), var(--pink));
    border-radius: 3px;
    width: 0%;
    transition: width 0.4s ease;
}

.load-steps { text-align: left; max-width: 280px; margin: 0 auto; }

.load-step {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; font-size: 14px;
    color: var(--text-muted); transition: color 0.3s;
}

.load-step.done { color: var(--purple-light); }
.load-step.active { color: var(--text); }
.load-quote { margin-top: 36px; font-style: italic; color: var(--text-muted); font-size: 14px; }

/* ============ RESULT ============ */
.result-card {
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.1) 0%, rgba(0,0,0,0) 100%);
    border: 1px solid rgba(167, 139, 250, 0.12);
    border-radius: 24px;
    padding: 32px 20px;
    text-align: center;
    margin-top: 40px;
}

.result-card h2 { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.song-title { font-size: 20px; color: var(--purple-light); font-weight: 600; margin-bottom: 20px; }

.player {
    background: rgba(0,0,0,0.3);
    border-radius: var(--radius);
    padding: 20px;
    margin: 16px 0;
}

.player-art {
    width: 180px; height: 180px;
    margin: 0 auto 16px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0f0326, #1a0533, #4c1d95, #7c3aed);
    display: flex; align-items: center; justify-content: center;
    font-size: 56px;
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.3);
    position: relative;
    overflow: hidden;
}

.player-art::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08) 0%, transparent 60%);
}

.player-controls { display: flex; align-items: center; gap: 14px; margin-top: 16px; }

.play-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(124,58,237,0.3);
}

.play-btn:hover { transform: scale(1.08); }

.prog-wrap { flex: 1; }

.audio-bar {
    width: 100%; height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    cursor: pointer;
    overflow: hidden;
}

.audio-fill { width: 0%; height: 100%; background: var(--purple-light); border-radius: 2px; }

.time-row {
    display: flex; justify-content: space-between;
    font-size: 11px; color: var(--text-muted); margin-top: 4px;
}

.lyrics-box {
    text-align: left; margin: 20px 0; padding: 20px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.04);
}

.lyrics-label {
    font-size: 10px; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-muted); margin-bottom: 14px;
}

.lyrics-text { font-size: 14px; line-height: 1.9; color: #d1d5db; white-space: pre-wrap; }

/* Action Buttons */
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }

.act-btn {
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.act-btn:hover { background: var(--surface-hover); border-color: var(--border-focus); }
.act-btn.full { grid-column: 1 / -1; }

.act-btn.primary {
    background: linear-gradient(135deg, var(--purple), var(--purple-light));
    border: none;
    grid-column: 1 / -1;
    font-size: 15px;
    padding: 16px;
}

/* ============ TESTIMONIALS ============ */
.testimonials { margin-top: 36px; }

.testimonials h3 {
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 2px; color: var(--text-muted);
    text-align: center; margin-bottom: 16px;
}

.testi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

.testi-card:hover { border-color: rgba(255,255,255,0.12); }
.testi-stars { color: #fbbf24; font-size: 13px; margin-bottom: 6px; }
.testi-text { font-size: 13px; color: #d1d5db; line-height: 1.6; margin-bottom: 6px; }
.testi-author { font-size: 11px; color: var(--text-muted); }

/* ============ MY SONGS SECTION ============ */
.my-songs-card {
    text-align: center;
    padding: 20px;
    margin-top: 16px;
}

.my-songs-card p { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; }

.my-songs-input {
    display: flex;
    gap: 8px;
}

.my-songs-input input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.my-songs-input input:focus { border-color: var(--purple-light); }

.my-songs-input button {
    padding: 12px 20px;
    background: var(--purple);
    border: none;
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

/* ============ FOOTER ============ */
.footer {
    text-align: center;
    padding: 40px 0 20px;
    font-size: 12px;
    color: var(--text-muted);
}

.footer .badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 12px;
}

.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--purple-light); }

/* ============ LANGUAGE BAR ============ */
.lang-bar {
    display: flex;
    justify-content: center;
    gap: 4px;
    padding-top: 16px;
    flex-wrap: wrap;
}

.lang-btn {
    background: none;
    border: 1px solid transparent;
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.lang-btn:hover { color: var(--text); border-color: var(--border); }

.lang-btn.active {
    color: var(--purple-light);
    border-color: rgba(167,139,250,0.3);
    background: rgba(167,139,250,0.06);
}

/* ============ CONSENT ============ */
.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-dim);
    line-height: 1.5;
}

.consent-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--purple-light);
    min-width: 18px;
    min-height: 18px;
}

.consent-label a { color: var(--purple-light); }

/* ============ RESPONSIVE ============ */
@media (max-width: 420px) {
    .variant-grid { grid-template-columns: 1fr 1fr; }
    .hero h1 { font-size: 24px; }
    .proof-bar { gap: 16px; }
    .app { padding: 0 16px 40px; }
}

@media (min-width: 768px) {
    .app { max-width: 600px; }
    .hero h1 { font-size: 34px; }
    .variant-grid { grid-template-columns: repeat(4, 1fr); }
}
