/* ========================================
   VARIÁVEIS E RESET
   ======================================== */
:root {
    --bg-primary: #0f0d13;
    --bg-secondary: #1a1720;
    --bg-card: #221f2a;
    --bg-card-hover: #2c2835;
    --accent: #e8445a;
    --accent-light: #ff6b81;
    --accent-glow: rgba(232, 68, 90, 0.3);
    --gold: #f0c040;
    --gold-light: #ffd966;
    --text-primary: #f0edf5;
    --text-secondary: #9d97a8;
    --text-muted: #6b6478;
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(232, 68, 90, 0.5);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(232, 68, 90, 0.15);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Outfit', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

::selection {
    background: var(--accent);
    color: white;
}

/* ========================================
   PARTÍCULAS DECORATIVAS
   ======================================== */
.particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0;
    animation: float-particle linear infinite;
}

@keyframes float-particle {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        opacity: 0;
        transform: translateY(-10vh) scale(1);
    }
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: relative;
    padding: 3rem 2rem 2rem;
    text-align: center;
    z-index: 1;
    background: linear-gradient(180deg, rgba(232, 68, 90, 0.08) 0%, transparent 100%);
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(232, 68, 90, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.header-content {
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    font-size: 2.5rem;
    animation: pop 2s ease-in-out infinite;
}

@keyframes pop {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.header h1 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), var(--gold-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ========================================
   BARRA DE PROGRESSO
   ======================================== */
.progress-container {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 13, 19, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
}

.progress-bar {
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 4px;
    width: 16.66%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px var(--accent-glow);
}

.progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-weight: 400;
}

/* ========================================
   MAIN / FORMULÁRIO
   ======================================== */
.main {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.form-section {
    display: none;
    animation: fadeInUp 0.5s ease-out;
}

.form-section.active {
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CABEÇALHO DA SEÇÃO
   ======================================== */
.section-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.section-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    min-width: 60px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 300;
}

/* ========================================
   FORM GROUPS
   ======================================== */
.form-group {
    margin-bottom: 2rem;
}

.form-group > label {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.helper-text {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 300;
    line-height: 1.5;
}

/* ========================================
   INPUTS E TEXTAREAS
   ======================================== */
textarea,
input[type="text"],
input[type="url"] {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    transition: var(--transition);
    resize: vertical;
    outline: none;
}

textarea:focus,
input[type="text"]:focus,
input[type="url"]:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(232, 68, 90, 0.1), var(--shadow-card);
    background: var(--bg-card-hover);
}

textarea::placeholder,
input::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

/* ========================================
   TAGS INPUT (3 PALAVRAS)
   ======================================== */
.tags-input-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    transition: var(--transition);
    cursor: text;
    min-height: 56px;
}

.tags-input-container:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px rgba(232, 68, 90, 0.1);
}

.tags-list {
    display: contents;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--accent), #c93a4d);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    animation: tagPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tagPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.tag-remove {
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
    background: none;
    border: none;
    color: white;
    padding: 0;
}

.tag-remove:hover {
    opacity: 1;
}

.tags-input {
    border: none !important;
    background: transparent !important;
    padding: 0.4rem !important;
    flex: 1;
    min-width: 120px;
    box-shadow: none !important;
    outline: none !important;
}

.tag-counter {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
    display: block;
}

.tag-counter.complete {
    color: var(--gold);
}

/* ========================================
   CHECKBOX E RADIO CARDS
   ======================================== */
.checkbox-group,
.radio-group {
    display: grid;
    gap: 0.75rem;
}

.checkbox-card,
.radio-card {
    cursor: pointer;
    display: block;
}

.checkbox-card input,
.radio-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-visual,
.radio-visual {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.3rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.checkbox-visual:hover,
.radio-visual:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.checkbox-card input:checked + .checkbox-visual,
.radio-card input:checked + .radio-visual {
    background: rgba(232, 68, 90, 0.1);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(232, 68, 90, 0.1);
}

.checkbox-icon,
.radio-icon {
    font-size: 1.5rem;
    min-width: 40px;
    text-align: center;
}

.checkbox-label,
.radio-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.radio-desc {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 300;
    margin-top: 0.15rem;
}

.radio-visual {
    flex-wrap: wrap;
}

.radio-visual > .radio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.radio-card input:checked + .radio-visual > .radio-icon {
    background: rgba(232, 68, 90, 0.2);
}

.radio-visual > span:last-child:not(.radio-icon):not(.radio-label) {
    width: 100%;
    padding-left: 64px;
}

/* ========================================
   BOTÕES DE NAVEGAÇÃO
   ======================================== */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 1.8rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-prev {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-prev:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transform: translateX(-4px);
}

.btn-next {
    background: linear-gradient(135deg, var(--accent), #c93a4d);
    color: white;
    box-shadow: 0 4px 20px rgba(232, 68, 90, 0.3);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(232, 68, 90, 0.4);
}

.btn-next:active {
    transform: translateY(0);
}

.btn-submit {
    background: linear-gradient(135deg, var(--gold), #e0a800);
    color: #1a1720;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(240, 192, 64, 0.3);
    padding: 1rem 2.2rem;
    font-size: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(240, 192, 64, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========================================
   LOADING SPINNER NO BOTÃO
   ======================================== */
.btn-submit .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(26, 23, 32, 0.3);
    border-top-color: var(--bg-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
    display: inline-block;
}

.btn-submit.loading svg {
    display: none;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   MODAIS
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-card);
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.modal p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-error {
    border-color: rgba(232, 68, 90, 0.3);
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 640px) {
    .header h1 {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .section-number {
        font-size: 2.2rem;
    }

    .section-header h2 {
        font-size: 1.4rem;
    }

    .main {
        padding: 1.5rem 1rem 3rem;
    }

    .nav-buttons {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .nav-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .modal {
        padding: 2rem 1.5rem;
    }

    .checkbox-visual,
    .radio-visual {
        padding: 0.9rem 1rem;
    }
}

/* ========================================
   SCROLLBAR CUSTOMIZADA
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   VALIDAÇÃO VISUAL
   ======================================== */
.form-group.error textarea,
.form-group.error input[type="text"],
.form-group.error .tags-input-container {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(232, 68, 90, 0.15);
}

.form-group.error .error-msg {
    display: block;
}

.error-msg {
    display: none;
    color: var(--accent-light);
    font-size: 0.82rem;
    margin-top: 0.4rem;
    font-weight: 400;
}
