/* ═══════════════════════════════════════
   SertanejoAI — Web Flow (criar.css)
   Mobile-first, dark theme, premium UX
   ═══════════════════════════════════════ */

:root {
    --bg: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-card-hover: #222;
    --bg-input: #1e1e1e;
    --green: #25D366;
    --green-hover: #1db954;
    --green-glow: rgba(37, 211, 102, 0.3);
    --text: #e0e0e0;
    --text-muted: #888;
    --text-dim: #555;
    --border: rgba(255, 255, 255, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
}

/* ── Container ── */
.criar-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px 120px;
}

/* ── Sticky Header with back button ── */
.criar-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
}

.criar-header h1 {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--green), #4ECDC4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    flex: 1;
    text-align: center;
}

.back-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.back-arrow:hover {
    border-color: var(--green);
    color: var(--green);
}

.back-arrow.hidden {
    opacity: 0;
    pointer-events: none;
}

.header-spacer {
    width: 36px;
    flex-shrink: 0;
}

/* ── Progress bar with labels ── */
.progress-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.progress-segment {
    flex: 1;
    text-align: center;
}

.progress-fill {
    height: 4px;
    border-radius: 2px;
    background: var(--bg-card);
    transition: background var(--transition);
    margin-bottom: 4px;
}

/* Standalone progress bars (lyrics/audio loading) */
.progress-bar>.progress-fill {
    background: var(--green);
    height: 6px;
}

.progress-segment.active .progress-fill,
.progress-segment.done .progress-fill {
    background: var(--green);
}

.progress-segment.done .progress-fill {
    opacity: 0.5;
}

.progress-label {
    font-size: 9px;
    font-weight: 500;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition);
}

.progress-segment.active .progress-label {
    color: var(--green);
    font-weight: 700;
}

.progress-segment.done .progress-label {
    color: var(--text-muted);
}

/* ── Social proof ── */
.social-proof {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0 16px;
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ── Steps ── */
.step {
    display: none;
    animation: fadeSlideIn 0.35s ease;
}

.step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.step-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ── Selection summary chips ── */
.selection-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.summary-chip:hover {
    border-color: var(--green);
    color: var(--green);
}

.summary-chip .chip-emoji {
    font-size: 14px;
}

/* ── Option cards ── */
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.option-card {
    background: var(--bg-card);
    border: 2px solid transparent;
    border-radius: var(--radius);
    padding: 16px 12px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.option-card:active {
    transform: scale(0.96);
}

.option-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border);
}

.option-card.selected {
    border-color: var(--green);
    background: rgba(37, 211, 102, 0.08);
    box-shadow: 0 0 20px var(--green-glow);
}

.option-card .emoji {
    font-size: 32px;
    display: block;
    margin-bottom: 6px;
}

.option-card .label {
    font-size: 14px;
    font-weight: 600;
}

/* ── Textarea ── */
.details-textarea {
    width: 100%;
    min-height: 140px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 15px;
    padding: 14px 16px;
    resize: vertical;
    transition: border-color var(--transition);
}

.details-textarea:focus {
    outline: none;
    border-color: var(--green);
}

.details-textarea::placeholder {
    color: var(--text-dim);
}

.char-count {
    text-align: right;
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 4px;
}

/* ── Buttons ── */
.btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: var(--green);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    margin-top: 20px;
}

.btn-primary:hover {
    background: var(--green-hover);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Buy button pulse */
.btn-pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 var(--green-glow);
    }

    50% {
        box-shadow: 0 0 20px 4px var(--green-glow);
    }
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 10px;
}

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

/* Free hint under CTA */
.free-hint {
    text-align: center;
    font-size: 12px;
    color: var(--green);
    margin-top: 8px;
    opacity: 0.8;
}

/* ── Loading / generation ── */
.loading-container {
    text-align: center;
    padding: 40px 0;
}

/* Warning banner */
.gen-warning {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 28px;
    animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Progress bar */
.gen-progress-label {
    margin-bottom: 10px;
}

#gen-pct-text {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--green), #1ebe57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gen-progress-track {
    width: 100%;
    height: 16px;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    position: relative;
}

.gen-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #25D366, #1ebe57, #0ea84e);
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.4);
    transition: width 0.5s ease-out;
}

.loading-subtext {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Fun fact / studio messages */
.fun-fact {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(37, 211, 102, 0.05);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-muted);
    animation: fadeIn 0.5s ease;
    transition: opacity 0.3s ease;
}

/* Buy section */
.buy-section {
    background: var(--bg-card);
    border: 1px solid rgba(255, 160, 0, 0.3);
    border-radius: var(--radius);
    padding: 24px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.buy-fire {
    font-size: 36px;
    margin-bottom: 8px;
}

.buy-headline {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.buy-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.buy-timer {
    font-size: 15px;
    color: #ff6b6b;
    margin-bottom: 14px;
}

#buy-clock {
    font-size: 20px;
    color: #ff4757;
    animation: pulse-warning 2s ease-in-out infinite;
}

.buy-prices {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.buy-price-old {
    font-size: 16px;
    color: var(--text-dim);
    text-decoration: line-through;
}

.buy-price-new {
    font-size: 28px;
    font-weight: 800;
    color: var(--green);
}

.buy-price-full {
    font-size: 28px;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 16px;
}

/* Audio feedback */
.feedback-block {
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    text-align: center;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.feedback-block.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.feedback-question {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.feedback-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.fb-btn {
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.fb-btn:active {
    transform: scale(0.95);
}

.fb-positive:hover {
    border-color: var(--green);
    background: rgba(37, 211, 102, 0.1);
}

.fb-negative:hover {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.feedback-reasons {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 8px;
}

.fb-reason {
    padding: 6px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: var(--bg-muted);
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.fb-reason:hover {
    border-color: #ff6b6b;
    color: var(--text);
}

.feedback-thanks {
    font-size: 13px;
    color: var(--green);
    padding-top: 4px;
}

/* PIX button */
.btn-pix {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #00B4A0, #00C9B1);
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-pix:hover {
    filter: brightness(1.1);
}

.btn-pix:active {
    transform: scale(0.98);
}

/* Surprise modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    background: var(--bg-card);
    border: 1px solid rgba(0, 180, 160, 0.3);
    border-radius: 16px;
    padding: 32px 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    animation: modalIn 0.4s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-emoji {
    font-size: 48px;
    margin-bottom: 8px;
}

.modal-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--green);
    margin-bottom: 12px;
}

.modal-body {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-email-gate {
    margin-bottom: 16px;
}

.modal-email-gate .input-field {
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
    background: var(--bg-muted);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: var(--text);
    outline: none;
}

.modal-email-gate .input-field:focus {
    border-color: var(--green);
}

/* Email backup section */
.gen-email-backup {
    margin-top: 24px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}

.gen-email-backup.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.gen-email-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.gen-email-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.gen-email-row {
    display: flex;
    gap: 8px;
}

.gen-email-field {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.gen-email-field:focus {
    border-color: var(--green);
}

.gen-email-btn {
    padding: 10px 16px;
    background: var(--green);
    color: #000;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 16px;
    cursor: pointer;
    font-weight: 600;
}

.gen-email-btn:active {
    transform: scale(0.95);
}

.gen-email-ok {
    margin-top: 8px;
    font-size: 13px;
    color: var(--green);
    font-weight: 500;
}

/* ── Preview / result ── */
.result-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}

.result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.result-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Audio player */
.audio-player {
    width: 100%;
    margin: 16px 0;
    border-radius: 8px;
}

audio {
    width: 100%;
    height: 48px;
}

/* Lyrics toggle */
.lyrics-toggle {
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    transition: color var(--transition);
}

.lyrics-toggle:hover {
    color: var(--green);
}

.price-section {
    margin: 16px 0 4px;
}

.price-tag {
    display: inline-block;
    background: rgba(37, 211, 102, 0.1);
    color: var(--green);
    font-size: 24px;
    font-weight: 800;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
}

.price-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Trust badges */
.trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.trust-badges span {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ── Lyrics preview ── */
.lyrics-preview {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 16px;
    margin: 8px 0;
    max-height: 300px;
    overflow-y: auto;
    text-align: left;
}

.lyrics-preview pre {
    font-family: inherit;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    color: var(--text-muted);
}

/* ── Error ── */
.error-msg {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-top: 12px;
    display: none;
}

.error-msg.visible {
    display: block;
}

/* ── Download page ── */
.download-success {
    text-align: center;
    padding: 40px 0;
}

.download-success .check-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 32px;
}

/* ── Lyrics editor (step 5) ── */
.lyrics-textarea {
    width: 100%;
    min-height: 280px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.7;
    padding: 14px 16px;
    resize: vertical;
    transition: border-color var(--transition);
}

.lyrics-textarea:focus {
    outline: none;
    border-color: var(--green);
}

.lyrics-loading {
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
    color: var(--text-muted);
}

.mini-spinner {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid var(--bg-card-hover);
    border-top-color: var(--green);
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}

.lyrics-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.btn-icon {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon:hover {
    border-color: var(--green);
    color: var(--green);
}

.btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Email form ── */
.email-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px 20px;
    margin: 20px 0;
}

.email-input {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
    font-size: 16px;
    margin-bottom: 4px;
    transition: border-color var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.email-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
}

.email-input::placeholder {
    color: var(--text-dim);
}

/* ── Share buttons ── */
.share-section {
    margin-top: 20px;
}

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.btn-share {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    color: #fff;
}

.btn-share:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-share-wa {
    background: #25D366;
}

.btn-share-tg {
    background: #0088cc;
}

/* ── Karaoke section ── */
.karaoke-section {
    margin-top: 24px;
}

.karaoke-divider {
    text-align: center;
    margin: 20px 0 16px;
    position: relative;
}

.karaoke-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.karaoke-divider span {
    position: relative;
    background: var(--bg);
    padding: 0 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--green);
    letter-spacing: 1px;
}

.karaoke-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-muted);
}

.karaoke-upsell {
    margin-top: 16px;
    text-align: center;
}

/* ── Responsive ── */
@media (min-width: 640px) {
    .criar-container {
        padding: 0 24px 80px;
    }

    .criar-header h1 {
        font-size: 22px;
    }

    .option-grid {
        gap: 12px;
    }

    .option-card {
        padding: 20px 16px;
    }

    .progress-label {
        font-size: 10px;
    }
}

/* ═══════ Name & Customize step ═══════ */
.text-green {
    color: var(--green);
    font-weight: 700;
}

.details-toggle {
    color: var(--text-muted);
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    transition: color var(--transition);
}

.details-toggle:hover {
    color: var(--green);
}