/* ============================================
   QUIZ MILHAS - CSS MODERNO E RESPONSIVO
   ============================================ */

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

:root {
    /* Cores Principais */
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #818cf8;
    --secondary: #f093fb;
    --accent: #4fd1c5;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Backgrounds */
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --bg-light: #f8fafc;

    /* Textos */
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-dark: #1e293b;

    /* Outros */
    --radius: 16px;
    --radius-lg: 24px;
    --shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET E BASE
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: moveBackground 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes moveBackground {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */

.page {
    width: 100%;
    max-width: 640px;
    margin: 20px auto;
    position: relative;
    z-index: 1;
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease-out;
}

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

/* ============================================
   HEADER E BADGES
   ============================================ */

.header {
    text-align: center;
    margin-bottom: 35px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
    color: var(--primary-light);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 20px;
    border: 1px solid rgba(102, 126, 234, 0.3);
    backdrop-filter: blur(10px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge span:first-child {
    font-size: 1.2em;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.title {
    font-size: 2.2rem;
    font-weight: 900;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ============================================
   QUESTÕES E OPÇÕES
   ============================================ */

.question {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 25px;
    text-align: center;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-option {
    width: 100%;
    background: var(--bg-card-hover);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 24px;
    border-radius: var(--radius);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

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

.btn-option:hover {
    border-color: var(--primary-light);
    background: rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
    box-shadow: 0 10px 30px -10px rgba(102, 126, 234, 0.5);
}

.btn-option strong {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.btn-option strong::before {
    content: '→';
    font-size: 1.4em;
    color: var(--primary-light);
    transition: transform 0.3s;
}

.btn-option:hover strong::before {
    transform: translateX(5px);
}

.btn-option .small {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    display: block;
    margin-left: 32px;
}

/* ============================================
   BOTÕES
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 18px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
    width: 100%;
    box-shadow: 0 10px 30px -10px rgba(102, 126, 234, 0.5);
    position: relative;
    overflow: hidden;
}

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

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px -10px rgba(102, 126, 234, 0.7);
}

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

.btn-secondary {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    color: var(--text-secondary);
    text-decoration: underline;
}

/* ============================================
   RESULTADOS
   ============================================ */

.result-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    border: 2px solid rgba(16, 185, 129, 0.3);
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    text-align: left;
}

.result-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--success);
    font-weight: 800;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-label::before {
    content: '✓';
    background: var(--success);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.result-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.result-text {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 1rem;
}

/* ============================================
   OFERTA
   ============================================ */

.offer {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 30px;
    border-radius: var(--radius);
    border: 2px solid rgba(102, 126, 234, 0.3);
    text-align: center;
}

.offer h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.offer-price {
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--success) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.offer-price::before {
    content: '🔥';
    font-size: 0.8em;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* ============================================
   FORMULÁRIOS
   ============================================ */

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    font-size: 1rem;
    background: var(--bg-card-hover);
    color: var(--text-primary);
    transition: var(--transition);
    position: relative;
}

.form-group {
    position: relative;
}

.form-group label::before {
    content: attr(data-icon);
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    z-index: 1;
    pointer-events: none;
    margin-top: 18px;
    opacity: 0.6;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
}

.form-group:focus-within label::before {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

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

.form-group input:focus::placeholder {
    opacity: 0.5;
}

/* ============================================
   ALERTAS E MENSAGENS
   ============================================ */

.notice {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary);
    padding: 16px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.notice strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 4px;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-top: 15px;
    font-size: 0.9rem;
    display: none;
}

.alert.alert-success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid var(--success);
    color: var(--success);
    display: block;
}

.alert.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid var(--error);
    color: var(--error);
    display: block;
}

/* ============================================
   CHECKOUT E QR CODE
   ============================================ */

.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.qr-box {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    border: 2px solid rgba(102, 126, 234, 0.3);
    padding: 35px;
    border-radius: var(--radius-lg);
    text-align: center;
    animation: slideUp 0.6s ease-out;
}

.qr-code {
    background: white;
    padding: 20px;
    border-radius: var(--radius);
    display: inline-flex;
    margin: 25px 0;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.3);
}

.qr-code img {
    display: block;
    border-radius: 8px;
}

.code-copy {
    background: var(--bg-card-hover);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    border-radius: var(--radius);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--text-secondary);
    word-break: break-all;
    margin: 20px 0;
    max-height: 120px;
    overflow-y: auto;
    position: relative;
}

.code-copy::before {
    content: '📋';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2em;
}

.small {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

#quizProgress {
    background: rgba(102, 126, 234, 0.2);
    color: var(--primary-light);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    display: inline-block;
}

/* ============================================
   MODAL
   ============================================ */

.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
}

.modal {
    background: var(--bg-card);
    padding: 45px;
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */

@media (min-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr 1fr;
    }

    .title {
        font-size: 2.5rem;
    }

    .card {
        padding: 50px;
    }
}

@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .page {
        margin: 10px auto;
    }

    .card {
        padding: 25px 20px;
        border-radius: var(--radius);
    }

    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .btn-option {
        padding: 18px;
    }

    .btn-primary {
        padding: 16px 24px;
        font-size: 1rem;
    }

    .qr-box {
        padding: 25px 15px;
    }

    .offer-price {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.5rem;
    }

    .btn-option strong {
        font-size: 1rem;
    }

    .btn-option .small {
        font-size: 0.85rem;
        margin-left: 0;
    }
}

/* ============================================
   ANIMAÇÕES EXTRAS
   ============================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* ============================================
   SCROLLBAR CUSTOMIZADA
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
}

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

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

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