/* ================================================
   CRIATIVO AUTO - Design System
   Cores: Roxo, Preto, Verde
   ================================================ */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Principais */
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --primary-light: #a78bfa;
    --primary-glow: rgba(139, 92, 246, 0.4);

    /* Verde */
    --secondary: #10b981;
    --secondary-dark: #059669;
    --secondary-light: #34d399;
    --secondary-glow: rgba(16, 185, 129, 0.4);

    /* Fundos */
    --background: #0a0a0f;
    --background-gradient: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0a0a0f 100%);
    --surface: rgba(26, 26, 46, 0.8);
    --surface-solid: #1a1a2e;
    --surface-light: rgba(45, 45, 80, 0.6);
    --surface-border: rgba(139, 92, 246, 0.2);

    /* Texto */
    --text: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;

    /* Estados */
    --error: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;

    /* Design Tokens */
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px var(--primary-glow);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    background-image: var(--background-gradient);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background com partículas sutis */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(ellipse at 20% 80%, var(--primary-glow) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, var(--secondary-glow) 0%, transparent 50%);
    opacity: 0.3;
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ================================================
   BOTÕES
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px var(--secondary-glow);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--secondary-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-ghost {
    background: var(--surface-light);
    color: var(--text);
    border: 1px solid var(--surface-border);
}

.btn-ghost:hover {
    background: var(--surface);
    border-color: var(--primary);
}

.btn-small {
    padding: 10px 18px;
    font-size: 13px;
    border-radius: var(--border-radius-sm);
}

.btn-large {
    padding: 18px 36px;
    font-size: 17px;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================================
   HEADER
   ================================================ */
.header {
    padding: 20px 0;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav {
    display: flex;
    gap: 12px;
}

/* ================================================
   HERO SECTION
   ================================================ */
.hero {
    padding: 120px 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0.3;
    pointer-events: none;
}

.hero h2 {
    font-size: 56px;
    font-weight: 800;
    margin-bottom: 24px;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 50%, var(--secondary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero p {
    font-size: 20px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 48px;
    line-height: 1.8;
}

.hero .btn {
    margin: 0 8px;
}

/* ================================================
   FEATURES
   ================================================ */
.features {
    padding: 100px 0;
}

.features h3 {
    text-align: center;
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 60px;
    letter-spacing: -0.5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    padding: 36px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--surface-border);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

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

.feature-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 24px;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.feature-card h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    border-top: 1px solid var(--surface-border);
    background: var(--surface);
}

/* ================================================
   AUTH PAGES
   ================================================ */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-container {
    width: 100%;
    max-width: 440px;
}

.auth-box {
    background: var(--surface);
    backdrop-filter: blur(20px);
    padding: 48px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--surface-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.auth-box .logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-box h2 {
    text-align: center;
    margin-bottom: 32px;
    font-size: 24px;
    font-weight: 700;
}

.auth-form .form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-solid);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    font-size: 14px;
    padding: 12px 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
}

.error-message:empty {
    display: none;
}

.auth-link {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
    font-size: 14px;
}

.auth-link a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.auth-link a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ================================================
   APP PAGE
   ================================================ */
.app-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    padding: 16px 0;
    background: var(--surface);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#userEmail {
    color: var(--text-muted);
    font-size: 14px;
    padding: 8px 16px;
    background: var(--surface-light);
    border-radius: var(--border-radius-full);
}

.app-main {
    flex: 1;
    padding: 48px 0;
}

/* ================================================
   PROGRESS STEPS - Redesenhado
   ================================================ */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin-bottom: 48px;
    position: relative;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 0;
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--surface-solid);
    border: 3px solid var(--surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
}

.step-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

/* Linha conectora entre steps */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    left: calc(50% + 30px);
    width: calc(100% - 20px);
    height: 3px;
    background: var(--surface-light);
    z-index: 1;
    min-width: 60px;
}

.step.active .step-number {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.1);
}

.step.active .step-label {
    color: var(--primary-light);
}

.step.completed .step-number {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    border-color: var(--secondary);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.step.completed .step-number::after {
    content: '✓';
    position: absolute;
    font-size: 20px;
}

.step.completed .step-label {
    color: var(--secondary-light);
}

.step.completed:not(:last-child)::after {
    background: linear-gradient(90deg, var(--secondary), var(--secondary-light));
}

/* ================================================
   STEP CONTENT
   ================================================ */
.step-content {
    display: none;
    animation: fadeInUp 0.4s ease;
}

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

.step-content.active {
    display: block;
}

.step-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--surface-border);
}

.step-header h2 {
    margin-bottom: 0;
    text-align: left;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ================================================
   CARDS - Glassmorphism
   ================================================ */
.card {
    background: var(--surface);
    backdrop-filter: blur(20px);
    padding: 32px;
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--surface-border);
    margin-bottom: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--primary);
}

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

.card h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card h3::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.hidden {
    display: none !important;
}

/* ================================================
   INPUT GROUP
   ================================================ */
.input-group {
    display: flex;
    gap: 12px;
}

.input-group input {
    flex: 1;
}

/* ================================================
   STATUS MESSAGE
   ================================================ */
.status-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-message:empty {
    display: none;
}

.status-message.success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.status-message.success::before {
    content: '✓';
    font-weight: bold;
}

.status-message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
}

.status-message.error::before {
    content: '✕';
    font-weight: bold;
}

.status-message.loading {
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

.status-message.loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--primary-light);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================================================
   VOICES GRID
   ================================================ */
.voices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.voice-card {
    background: var(--surface-light);
    padding: 24px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.voice-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.voice-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.voice-card:hover::before {
    opacity: 0.3;
}

.voice-card.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.voice-card.selected::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.voice-card h4 {
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: 700;
}

.voice-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.voice-card button {
    padding: 8px 16px;
    background: var(--surface-solid);
    border: 1px solid var(--surface-border);
    border-radius: var(--border-radius-sm);
    color: var(--text);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition-fast);
}

.voice-card button:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* ================================================
   UPLOAD AREA - Redesenhado
   ================================================ */
.upload-area {
    border: 2px dashed var(--surface-border);
    border-radius: var(--border-radius-lg);
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.03) 0%, rgba(16, 185, 129, 0.03) 100%);
}

.upload-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, var(--primary-glow) 0%, transparent 70%);
    opacity: 0;
    transition: var(--transition);
}

.upload-area:hover {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(16, 185, 129, 0.08) 100%);
}

.upload-area:hover::before {
    opacity: 0.2;
}

.upload-area.dragover {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(16, 185, 129, 0.15) 100%);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    filter: grayscale(0.3);
    transition: var(--transition);
}

.upload-area:hover .upload-icon {
    filter: grayscale(0);
    transform: scale(1.1);
}

.upload-area p {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ================================================
   VIDEO PREVIEW
   ================================================ */
.video-preview-container {
    margin-bottom: 24px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #000;
    box-shadow: var(--shadow-md);
}

.video-preview-container video,
.video-preview-container img {
    width: 100%;
    max-height: 450px;
    display: block;
    object-fit: contain;
}

/* ================================================
   ACTION BUTTONS
   ================================================ */
.action-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 8px;
}

/* ================================================
   AUDIO PLAYER - Estilizado
   ================================================ */
audio {
    width: 100%;
    margin-bottom: 24px;
    border-radius: var(--border-radius-sm);
    background: var(--surface-light);
}

audio::-webkit-media-controls-panel {
    background: var(--surface-light);
}

/* ================================================
   SUBTITLE STYLES GRID
   ================================================ */
.subtitle-styles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}

.subtitle-style {
    background: var(--surface-light);
    padding: 24px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.subtitle-style:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.subtitle-style.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
}

.subtitle-style.selected::before {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 22px;
    height: 22px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.style-preview {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 700;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--border-radius-sm);
}

.word-by-word-preview .highlight {
    color: var(--secondary);
    background: rgba(16, 185, 129, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 2px;
}

.karaoke-preview .karaoke-text {
    background: linear-gradient(90deg, var(--primary) 50%, var(--text) 50%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popup-preview .popup-word {
    animation: popupAnim 1s ease infinite;
    color: var(--secondary);
}

@keyframes popupAnim {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

.glow-preview .glow-text {
    text-shadow:
        0 0 10px var(--primary),
        0 0 20px var(--primary),
        0 0 40px var(--primary);
    color: var(--text);
}

.underline-preview .underline-text {
    text-decoration: underline;
    text-decoration-color: var(--secondary);
    text-underline-offset: 6px;
    text-decoration-thickness: 3px;
}

.subtitle-style h4 {
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 700;
}

.subtitle-style p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ================================================
   CUSTOMIZATION GRID
   ================================================ */
.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.form-group input[type="range"] {
    padding: 0;
    background: transparent;
    height: 6px;
    -webkit-appearance: none;
    border-radius: 3px;
    background: var(--surface-light);
}

.form-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px var(--primary-glow);
}

.form-group input[type="color"] {
    padding: 4px;
    height: 48px;
    cursor: pointer;
    border-radius: var(--border-radius-sm);
}

/* ================================================
   RADIO OPTIONS
   ================================================ */
.resize-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px 16px;
    background: var(--surface-light);
    border-radius: var(--border-radius-sm);
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.radio-option:hover {
    border-color: var(--primary);
}

.radio-option input {
    width: auto;
    accent-color: var(--primary);
}

.radio-option input:checked + span {
    color: var(--primary-light);
    font-weight: 600;
}

/* ================================================
   OVERLAY PREVIEW & SETTINGS
   ================================================ */
.overlay-preview-container {
    margin-bottom: 24px;
    text-align: center;
    background: var(--surface-light);
    padding: 20px;
    border-radius: var(--border-radius);
}

.overlay-preview-container img {
    max-width: 200px;
    max-height: 150px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-md);
}

/* Position Grid - 3x3 */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 360px;
    margin: 0 auto 24px;
}

.position-option {
    cursor: pointer;
}

.position-option input[type="radio"] {
    display: none;
}

.position-option .position-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 60px;
    background: var(--surface-light);
    border: 2px solid transparent;
    border-radius: var(--border-radius-sm);
    font-size: 24px;
    transition: var(--transition);
}

.position-option .position-label {
    display: block;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.position-option:hover .position-box {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.position-option input[type="radio"]:checked + .position-box {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    box-shadow: 0 0 15px var(--primary-glow);
}

.position-option input[type="radio"]:checked + .position-box + .position-label {
    color: var(--primary-light);
    font-weight: 600;
}

/* Overlay Settings Grid */
.overlay-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
    padding: 20px;
    background: var(--surface-light);
    border-radius: var(--border-radius);
}

/* ================================================
   FORMAT SELECTION GRID
   ================================================ */
.format-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.format-option {
    cursor: pointer;
}

.format-option input[type="checkbox"] {
    display: none;
}

.format-card {
    background: var(--surface-light);
    padding: 24px 16px;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid transparent;
    transition: var(--transition);
    position: relative;
}

.format-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.format-option input[type="checkbox"]:checked + .format-card {
    border-color: var(--secondary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
}

.format-option input[type="checkbox"]:checked + .format-card::before {
    content: '✓';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
}

.format-icon {
    font-size: 36px;
    display: block;
    margin-bottom: 12px;
}

.format-card h4 {
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 700;
}

.format-card p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* ================================================
   DOWNLOAD LINKS
   ================================================ */
.download-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-light);
    padding: 18px 24px;
    border-radius: var(--border-radius);
    border: 1px solid var(--surface-border);
    transition: var(--transition);
}

.download-item:hover {
    border-color: var(--secondary);
}

.download-item span {
    font-weight: 700;
    font-size: 15px;
}

.download-item a {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px var(--secondary-glow);
}

.download-item a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--secondary-glow);
}

/* ================================================
   EXPORT SECTION - Celebração
   ================================================ */
#exportSection {
    text-align: center;
}

#exportSection h3 {
    justify-content: center;
    font-size: 28px;
    margin-bottom: 12px;
}

#exportSection h3::before {
    display: none;
}

#exportSection > p {
    color: var(--text-muted);
    margin-bottom: 32px;
}

/* ================================================
   SCROLLBAR CUSTOMIZADA
   ================================================ */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    .hero h2 {
        font-size: 36px;
    }

    .hero p {
        font-size: 16px;
    }

    .auth-box {
        padding: 32px 24px;
    }

    .progress-steps {
        gap: 8px;
        padding: 0;
    }

    .step {
        flex-direction: column;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }

    .step-label {
        display: none;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .card {
        padding: 24px;
    }

    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .step-header h2 {
        font-size: 22px;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .upload-area {
        padding: 40px 20px;
    }

    .upload-icon {
        font-size: 48px;
    }

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 80px 0;
    }

    .hero h2 {
        font-size: 28px;
    }

    .features h3 {
        font-size: 28px;
    }

    .voices-grid,
    .subtitle-styles-grid {
        grid-template-columns: 1fr;
    }

    .format-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .format-card {
        padding: 16px 12px;
    }
}

/* ================================================
   ANIMAÇÕES EXTRAS
   ================================================ */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.card {
    animation: slideIn 0.4s ease;
}

/* Tooltip customizado */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--surface-solid);
    color: var(--text);
    font-size: 12px;
    border-radius: var(--border-radius-sm);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

[data-tooltip]:hover::after {
    opacity: 1;
    bottom: calc(100% + 8px);
}

/* ================================================
   CREATIVE MODE SELECTION
   ================================================ */
.mode-card {
    transition: all 0.3s ease;
}

.mode-card:hover {
    transform: translateY(-4px);
}

.mode-card.selected {
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
}

#modeTextOnly.selected {
    box-shadow: 0 8px 32px rgba(236, 72, 153, 0.3);
}

/* ================================================
   TEXT OVERLAY EDITOR
   ================================================ */
.text-overlay-item {
    transition: all 0.3s ease;
}

.text-overlay-item:hover {
    border-color: rgba(236, 72, 153, 0.6) !important;
}

.text-overlay-input:focus {
    outline: none;
    border-color: #ec4899 !important;
}

.text-position-select:focus,
.text-font-select:focus {
    outline: none;
    border-color: #ec4899 !important;
}

.text-overlay-preview {
    transition: border-color 0.3s ease;
}

.text-overlay-preview:hover {
    border-color: rgba(236, 72, 153, 0.7) !important;
}

#textOverlayPreviewTexts > div {
    transition: all 0.2s ease;
}

.remove-text-btn:hover {
    background: rgba(239, 68, 68, 0.4) !important;
}

#addTextOverlayBtn:hover {
    background: rgba(236, 72, 153, 0.3) !important;
    border-color: #ec4899 !important;
}

/* Overlay Type Selection Buttons */
.overlay-type-btn {
    transition: all 0.3s ease;
}

.overlay-type-btn:hover {
    transform: translateY(-2px);
}

.overlay-type-btn.active {
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

#selectTextOverlay.active {
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.3) !important;
}

/* Interactive Overlay Preview */
.overlay-interactive-preview,
.text-overlay-preview {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
}

.overlay-interactive-preview video,
.text-overlay-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.draggable-overlay {
    position: absolute;
    cursor: move;
    user-select: none;
    transition: box-shadow 0.2s ease;
}

.draggable-overlay:hover {
    box-shadow: 0 0 0 2px #8b5cf6;
}

.draggable-overlay.dragging {
    box-shadow: 0 0 0 3px #4ade80;
}

.draggable-overlay img {
    max-width: 100%;
    height: auto;
    display: block;
}
