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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.container {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

header {
    padding: 20px 8px 48px 8px;
    text-align: center;
    
}

.title {
    font-size: 48px;
    font-weight: bold;
    color: #de2460;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(222, 36, 96, 0.1);
}

main {

    flex: 1;
}

.quiz-container {
    background-color: white;
    border-radius: 20px;
    max-width: 1121px;
    margin: 0 auto;
    padding: 24px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.question-slide {
    display: none;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.question-slide.active {
    display: block;
    animation: slideInRight 0.5s ease-out;
}

.question-content, .result-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.question-title, .result-title {
    font-size: 20px;
    font-weight: bold;
    color: #2c2c2c;
    text-align: center;
    margin-bottom: 8px;
}

.options-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option {
    background-color: #f5f5f5;
    border: 1px solid #D6D6D6;
    border-radius: 10px;
    padding: 8px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    transform: translateY(0);
    position: relative;
    overflow: hidden;
}

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

.option:hover {
    background-color: #e8f5e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6, 202, 87, 0.15);
}

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

.option.selected {
    background-color: #e8f5e8;
    border-color: #06ca57;
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(6, 202, 87, 0.2);
}

.option.selected .option-letter {
    background-color: #06ca57;
    color: white;
    transform: scale(1.1);
}

.option-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.option-letter {
    width: 30px;
    height: 30px;
    background-color: #e0e0e0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.option-text {
    font-size: 16px;
    font-weight: 500;
    color: #4a4a4a;
    transition: color 0.2s ease;
}

.option.selected .option-text {
    color: #06ca57;
    font-weight: 600;
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 24px;
}

.progress-info h3.progress-text {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 8px;
}

.progress-of {
    font-weight: normal;
}

.progress-bar {
    display: flex;
    gap: 5px;
    align-items: center;
}

.progress-segment {
    flex: 1;
    height: 4px;
    background-color: #e5e5e5;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.progress-segment::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 202, 87, 0.5), transparent);
    transition: left 0.6s ease;
}

.progress-segment.active {
    background-color: #06ca57;
    border: 2px solid #06ca57;
    height: 8px;
    box-shadow: 0 2px 8px rgba(6, 202, 87, 0.3);
}

.progress-segment.active::before {
    left: 100%;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.continue-btn, .prev-btn, .restart-btn {
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Estilo padrão para desktop */
.continue-btn {
    background-color: #06ca57;
    color: white;
    padding: 12px 28px;
    width: 100%;
    height: 60px;
    box-shadow: 0 4px 15px rgba(6, 202, 87, 0.3);
}

/* Estilo específico para celulares */
@media (max-width: 768px) {
  .continue-btn {
      padding: 0px 10px;
}

.continue-btn:hover:not(:disabled) {
    background-color: #05b34f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 202, 87, 0.4);
}

.continue-btn:disabled {
    background-color: #06ca57;
    cursor: not-allowed;
    box-shadow: none;
}

/* Estilos base (Mobile First) - Vale para todas as telas, começando pelo celular */
.prev-btn {
    /* Suas regras que não mudam */
    background-color: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;

    /* Padding padrão para CELULAR */
    padding: 12px 25px 10px 5px;
}

/* --- A MÁGICA ACONTECE AQUI --- */
/* Ajuste para telas maiores (Desktop) */
@media (min-width: 768px) {
    .prev-btn {
        /* Padding que será aplicado somente em telas com 768px de largura ou mais */
        padding: 12px 20px 10px 10px;
    }
}

.prev-btn:hover {
    background-color: #eee;
    transform: translateY(-1px);
}

.restart-btn {
    background-color: #de2460;
    color: white;
    padding: 15px 30px;
    margin-top: 20px;
}

.restart-btn:hover {
    background-color: #c91e54;
    transform: translateY(-2px);
}

.result-page {
    text-align: center;
}

.character-result {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    margin: 20px 0;
    animation: fadeInScale 0.6s ease-out;
}

.character-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #06ca57;
    box-shadow: 0 8px 25px rgba(6, 202, 87, 0.3);
    animation: pulse 2s infinite;
}

.character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.character-info h3 {
    font-size: 28px;
    color: #de2460;
    margin-bottom: 12px;
    text-shadow: 1px 1px 2px rgba(222, 36, 96, 0.1);
}

.character-info p {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    max-width: 600px;
    text-align: center;
}

/* Question 5 - Body selection layout */
.question-5 .question-content-body {
    display: flex;
    gap: 40px;
    align-items: center;
}

.question-5 .question-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.question-5 .question-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.body-silhouette {
    padding: 20px;
}

.body-silhouette svg {
    max-width: 280px;
    height: auto;
}

.body-silhouette circle {
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: drop-shadow(0 2px 4px rgba(6, 202, 87, 0.3));
    animation: bodyPulse 2s ease-in-out infinite;
}

.body-silhouette circle:hover {
    fill: #06ca57;
    transform: scale(1.3);
    filter: drop-shadow(0 4px 12px rgba(6, 202, 87, 0.6));
    animation: bodyPulseHover 0.6s ease-in-out infinite;
}

.body-silhouette circle.selected {
    fill: #06ca57;
    transform: scale(1.2);
    filter: drop-shadow(0 6px 15px rgba(6, 202, 87, 0.8));
    animation: bodySelected 1s ease-in-out infinite;
}

.body-silhouette text {
    pointer-events: none;
    transition: all 0.4s ease;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.body-silhouette circle:hover + text,
.body-silhouette circle.selected + text {
    fill: white;
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Result buttons */
.result-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stats-btn {
    background-color: #06ca57;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(6, 202, 87, 0.3);
}

.stats-btn:hover {
    background-color: #05b34f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 202, 87, 0.4);
}

/* Statistics Modal */
.stats-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.stats-overlay.show {
    opacity: 1;
    visibility: visible;
}

.stats-modal {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.stats-overlay.show .stats-modal {
    transform: scale(1);
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.stats-header h2 {
    color: #de2460;
    font-size: 24px;
    margin: 0;
}

.close-stats-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-stats-btn:hover {
    background-color: #f0f0f0;
    color: #666;
}

.stats-total {
    text-align: center;
    font-size: 18px;
    margin-bottom: 25px;
    color: #555;
}

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

.stat-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-character {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    padding-left: 10px;
}

.stat-name {
    font-weight: bold;
    color: #333;
}

.stat-percentage {
    font-size: 18px;
    font-weight: bold;
    color: #06ca57;
}

.stat-bar {
    background-color: #e9ecef;
    border-radius: 10px;
    height: 8px;
    margin-bottom: 5px;
    overflow: hidden;
}

.stat-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
    animation: fillBar 1s ease-out;
}

.stat-count {
    font-size: 12px;
    color: #666;
    text-align: right;
    display: block;
}

/* Keyframe animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

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

@keyframes bodySelected {
    0%, 100% {
        transform: scale(1.2);
        filter: drop-shadow(0 6px 15px rgba(6, 202, 87, 0.8));
    }
    50% {
        transform: scale(1.3);
        filter: drop-shadow(0 8px 20px rgba(6, 202, 87, 1));
    }
}

@keyframes fillBar {
    from {
        width: 0;
    }
}

@media (max-width: 1024px) {
    .question-5 .question-content-body {
        flex-direction: column;
        gap: 20px;
    }

    .question-5 .question-right {
        order: -1;
        align-self: center;
    }

    .body-silhouette svg {
        max-width: 200px;
    }
}

/* Responsive para desktop */
@media (min-width: 1280px) {
    header {
        padding: 48px 8px;
    }

    .title {
        font-size: 64px;
    }

    .quiz-container {
        padding: 40px;
    }

    .question-title, .result-title {
        font-size: 36px;
        text-align: left;
    }

    .result-title {
        text-align: center;
    }

    .character-result {
        flex-direction: row;
        text-align: left;
    }

    .character-image {
        width: 200px;
        height: 200px;
    }

    .character-info h3 {
        font-size: 32px;
    }

    .character-info p {
        font-size: 18px;
        text-align: left;
    }

    .navigation {
        justify-content: space-between;
    }

    .continue-btn {
        width: fit-content;
        height: 50px;
        padding: 12px 40px;
    }
}

@media (min-width: 768px) {
    .option-text {
        font-size: 16px;
    }

    .character-result {
        flex-direction: row;
        text-align: left;
    }

    .character-info p {
        text-align: left;
    }
}

/* Animações de entrada para as opções */
.option {
    animation: fadeInUp 0.5s ease-out both;
}

.option:nth-child(1) { animation-delay: 0.1s; }
.option:nth-child(2) { animation-delay: 0.2s; }
.option:nth-child(3) { animation-delay: 0.3s; }
.option:nth-child(4) { animation-delay: 0.4s; }
.option:nth-child(5) { animation-delay: 0.5s; }
.option:nth-child(6) { animation-delay: 0.6s; }

/* Efeitos de foco para acessibilidade */
.option:focus-visible,
.continue-btn:focus-visible,
.prev-btn:focus-visible,
.restart-btn:focus-visible {
    outline: 3px solid #06ca57;
    outline-offset: 2px;
}
