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

:root {
    --primary: #5b2b91;
    --primary-2: #3f1f6b;
    --accent: #31d843;
    --accent-2: #16b83b;
    --surface-tint: #f4effb;
    --border-tint: rgba(91, 43, 145, 0.18);
    --shadow-primary: rgba(91, 43, 145, 0.25);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #efe7fb 0%, #ffffff 45%, #eaf9ee 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    backdrop-filter: blur(10px);
    margin: 10px;
}

header {
    background: #ffffff;
    color: #333;
    padding: clamp(6px, 2vw, 12px) clamp(12px, 3vw, 22px);
    text-align: center;
    border-bottom: 1px solid var(--border-tint);
}

header h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 10px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: #fff;
    line-height: 1.2;
}

header p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    opacity: 0.95;
    line-height: 1.4;
}

.quiz-logo {
    width: min(300px, 100%);
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.22));
}

.screen {
    display: none;
    padding: clamp(20px, 5vw, 40px) clamp(15px, 4vw, 30px);
    min-height: 400px;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

.start-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

#start-screen .start-content {
    padding-top: 0;
}

.start-content h2 {
    color: var(--primary);
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: 600;
    margin-top: 16px;
}

.hero-image {
    margin-bottom: 12px;
    text-align: center;
}

.hero-image img {
    width: min(100%, 320px);
    height: auto;
    max-height: 240px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
}

.hero-image img:hover {
    transform: scale(1.05);
}

.start-content p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.progress-bar {
    background: #f0f0f0;
    height: 8px;
    border-radius: 10px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 5%;
}

#progress-text {
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-text {
    color: #666;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 6px 0 16px 0;
    text-align: left;
}

.question-images {
    margin-bottom: 30px;
}

.image-comparison {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 20px;
}

.image-item {
    position: relative;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: none;
}

.image-item:hover {
    transform: none;
}

.image-item img {
    width: 100%;
    height: clamp(120px, 25vw, 180px);
    object-fit: contain;
    display: block;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.question-container {
    max-width: 700px;
    margin: 0 auto;
}

#question-text {
    color: #333;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    margin-bottom: 30px;
    font-weight: 500;
    text-align: center;
    line-height: 1.6;
}

.options {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.option {
    background: linear-gradient(135deg, #ffffff, var(--surface-tint));
    border: 1px solid var(--border-tint);
    border-radius: 14px;
    padding: clamp(9px, 2.2vw, 14px);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: #555;
    position: relative;
    overflow: hidden;
    line-height: 1.4;
}

.option:hover {
    border-color: rgba(91, 43, 145, 0.45);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(91, 43, 145, 0.12);
}

.option.selected {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-color: var(--primary);
    transform: scale(1.02);
}

.option.selected::after {
    content: '✓';
    position: absolute;
    right: clamp(10px, 3vw, 20px);
    top: 50%;
    transform: translateY(-50%);
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    font-weight: bold;
}


.btn-primary, .btn-secondary, .btn-cta {
    padding: clamp(12px, 3vw, 18px) clamp(20px, 5vw, 35px);
    border: none;
    border-radius: 25px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 43, 145, 0.35);
}

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

.btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.btn-secondary:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.btn-secondary:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.tip-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.tip-header {
    margin-bottom: 30px;
}

.tip-header h2 {
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2rem);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.tip-emoji {
    font-size: clamp(3rem, 8vw, 4rem);
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.tip-content {
    background: linear-gradient(135deg, var(--surface-tint), #ffffff);
    padding: clamp(20px, 5vw, 30px);
    border-radius: 20px;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary);
    box-shadow: 0 8px 25px rgba(91, 43, 145, 0.12);
}

.tip-content p {
    color: #555;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    line-height: 1.6;
    margin-bottom: 20px;
}

.tip-extra {
    background: white;
    padding: 15px;
    border-radius: 15px;
    margin-top: 20px;
    border: 2px solid rgba(91, 43, 145, 0.25);
}

.tip-extra h4 {
    color: var(--primary);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    margin-bottom: 10px;
    font-weight: 600;
}

.tip-extra ul {
    list-style: none;
    text-align: left;
}

.tip-extra li {
    color: #666;
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: 8px;
    padding-left: 25px;
    position: relative;
}

.tip-extra li::before {
    content: '💡';
    position: absolute;
    left: 0;
}

#continue-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: clamp(12px, 3vw, 18px) clamp(25px, 6vw, 35px);
    border-radius: 25px;
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-primary);
}

#continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(91, 43, 145, 0.35);
}

.result-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

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

.result-image {
    width: min(100%, 400px);
    height: auto;
    max-height: 280px;
    object-fit: contain;
    background: transparent;
    border-radius: 0;
}

.result-image:hover {
    transform: scale(1.05);
}

.result-content h2 {
    color: var(--primary);
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 30px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

#score-display {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    padding: clamp(20px, 5vw, 30px);
    border-radius: 20px;
    margin-bottom: 30px;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
}

#profile-description {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 5px solid var(--primary);
}

#profile-description h3 {
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 15px;
}

#profile-description p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.8;
}

#recommendations {
    background: var(--surface-tint);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border-left: 5px solid var(--accent);
}

#recommendations h3 {
    color: var(--primary);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

#recommendations ul {
    list-style: none;
    text-align: left;
}

#recommendations li {
    color: #666;
    font-size: 1rem;
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

#recommendations li::before {
    content: '💡';
    position: absolute;
    left: 0;
}

.cta-container {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: white;
    padding: clamp(25px, 6vw, 35px);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(91, 43, 145, 0.25);
    text-align: center;
}

.cta-container h3 {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    margin-bottom: 15px;
    font-weight: 600;
    line-height: 1.2;
}

.cta-container p {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.4;
}

.btn-cta {
    background: white;
    color: var(--primary);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    padding: clamp(14px, 3.5vw, 18px) clamp(25px, 6vw, 35px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: pulse 2s infinite;
    width: auto;
    max-width: 100%;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.btn-cta:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.testimonials {
    margin-bottom: 30px;
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    border: 2px solid var(--border-tint);
    box-shadow: 0 8px 25px rgba(91, 43, 145, 0.12);
}

.testimonials-title {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.testimonials-subtitle {
    color: #777;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.testimonials-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 85%;
    gap: 14px;
    overflow-x: auto;
    padding: 4px 4px 10px 4px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
}

.testimonials-carousel::-webkit-scrollbar {
    display: none;
}

.testimonials-carousel.dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.testimonial-card {
    scroll-snap-align: start;
    background: linear-gradient(135deg, #fff3f8, #ffffff);
    border-radius: 18px;
    padding: 16px;
    border: 1px solid #ffe0ec;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
    user-select: none;
}

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

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.testimonial-meta {
    text-align: left;
}

.testimonial-name {
    color: #333;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.1;
}

.testimonial-city {
    color: #777;
    font-size: 0.85rem;
}

.testimonial-text {
    color: #555;
    font-size: 1rem;
    line-height: 1.6;
    text-align: left;
    margin-bottom: 12px;
}

.testimonial-stars {
    color: #ffb400;
    font-size: 1.05rem;
    letter-spacing: 1px;
    text-align: left;
}

.testimonials-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.testimonials-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(91, 43, 145, 0.35);
    transition: all 0.2s ease;
}

.testimonials-dot.active {
    width: 18px;
    background: rgba(91, 43, 145, 0.95);
}

.book-image-container {
    text-align: center;
    margin: 30px 0;
}

.book-image {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 300px;
    object-fit: contain;
    background: transparent;
}

.offer-container {
    text-align: center;
    margin: 20px 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.offer-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #374151;
}

.offer-label {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 4px;
}

.old-price-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px;
}

.new-price-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.old-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #dc2626;
    text-decoration: line-through;
    text-decoration-color: #dc2626;
    text-decoration-thickness: 3px;
    opacity: 0.9;
    line-height: 1;
}

.new-price {
    font-size: 3rem;
    font-weight: 900;
    color: #16a34a;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.15);
    animation: pulse-green 2s infinite;
    line-height: 1;
    margin-top: 8px;
}

.discount-badge {
    margin-top: 8px;
}

.discount-percent {
    display: inline-block;
    background: #dc2626;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
    animation: bounce-discount 1.5s ease-in-out infinite alternate;
}

@keyframes pulse-green {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

@keyframes bounce-discount {
    0% { transform: translateY(0px); }
    100% { transform: translateY(-4px); }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 95%;
        margin: 10px auto;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        padding: 5px;
    }
    
    .container {
        margin: 5px;
        border-radius: 15px;
    }
    
    .image-comparison {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .image-item img {
        height: 150px;
    }
    
    .btn-primary, .btn-secondary, .btn-cta {
        width: 100%;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 12px;
    }
    
    body {
        padding: 2px;
    }
    
    .container {
        margin: 2px;
        border-radius: 10px;
    }
    
    header {
        padding: 15px 10px;
    }
    
    .screen {
        padding: 20px 15px;
    }
    
    .image-item img {
        height: 120px;
    }
    
    .option {
        padding: 12px;
        font-size: 0.95rem;
    }
    
    .cta-container {
        padding: 20px 15px;
    }

    .testimonials-carousel {
        grid-auto-columns: 92%;
    }
}

@media (max-width: 320px) {
    html {
        font-size: 11px;
    }
    
    .option {
        font-size: 0.85rem;
        padding: 10px;
    }
    
    .btn-primary, .btn-secondary, .btn-cta {
        font-size: 0.9rem;
        padding: 14px;
    }
}

/* Ajustes para tablets em modo retrato */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .container {
        max-width: 90%;
    }
    
    .image-item img {
        height: 160px;
    }
}

/* Ajustes para tablets em modo paisagem */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .container {
        max-width: 85%;
    }
    
    .image-comparison {
        grid-template-columns: 1fr 1fr;
    }
    
    .image-item img {
        height: 140px;
    }
}

/* Ajustes para telas muito grandes */
@media (min-width: 1400px) {
    .container {
        max-width: 1000px;
    }
    
    .image-item img {
        height: 200px;
    }
}

/* Ajustes para dispositivos com tela pequena mas alta */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        margin: 5px;
    }
    
    .screen {
        padding: 15px 20px;
    }
    
    .image-item img {
        height: 100px;
    }
    
    .option {
        padding: 10px 15px;
    }
}
