* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, rgba(222, 184, 135, 0.7) 0%, rgba(245, 245, 220, 0.9) 100%), 
                url('fundo.png') center/cover no-repeat fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Elementos de ruído no background */
.noise-element {
    position: fixed;
    opacity: 0.25;
    pointer-events: none;
    z-index: 1;
    animation: floatNoise 20s infinite ease-in-out;
    transition: opacity 2s ease-in-out;
}

.noise-element.fading {
    opacity: 0;
}

.noise-element.disappearing {
    animation: hardDisappear 0.5s linear forwards;
}

@keyframes hardDisappear {
    0% {
        clip-path: inset(0% 0% 0% 0%);
    }
    100% {
        clip-path: inset(0% 100% 0% 0%);
    }
}

@keyframes floatNoise {
    0%, 100% {
        transform: translateY(0px);
    }
    33% {
        transform: translateY(-10px);
    }
    66% {
        transform: translateY(5px);
    }
}

.noise-element:nth-child(odd) {
    animation-direction: reverse;
    animation-duration: 25s;
}

.noise-element:nth-child(3n) {
    animation-duration: 30s;
    opacity: 0.18;
}

.noise-element:nth-child(4n) {
    animation-duration: 15s;
    opacity: 0.3;
}

.container {
    background: rgba(245, 245, 220, 0.95);
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(139, 69, 19, 0.2);
    padding: 40px;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
}

h1 {
    text-align: center;
    color: #8B4513;
    margin-bottom: 40px;
    font-size: 2.2em;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Barra roxa no topo */
.top-bar {
    height: 8px;
    background: rgb(177, 65, 230);
    margin: -40px -40px 0 -40px;
    width: calc(100% + 80px);
    border-radius: 15px 15px 0 0;
}

/* Logo do site */
.logo-container {
    text-align: center;
    margin: 0 -40px 40px -40px;
    width: calc(100% + 80px);
}

.site-logo {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Seção de ajuda no card de resultados */
.help-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #DDA0DD;
}

.help-section p {
    color: #8B4513;
    font-size: 0.9em;
    margin-bottom: 15px;
}

.help-button {
    display: inline-block;
    background: rgb(177, 65, 230);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(177, 65, 230, 0.3);
}

.help-button:hover {
    background: rgb(157, 45, 210);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(177, 65, 230, 0.4);
}

/* Contador de perguntas restantes */
.questions-counter {
    text-align: center;
    margin: 30px auto;
    padding: 15px 20px;
    background: rgba(177, 65, 230, 0.1);
    border: 2px solid rgb(177, 65, 230);
    border-radius: 10px;
    max-width: 300px;
    transition: all 0.3s ease;
}

.questions-counter p {
    margin: 0;
    color: rgb(177, 65, 230);
    font-weight: 500;
    font-size: 16px;
}

#remaining-count {
    font-weight: bold;
    font-size: 1.2em;
}

.questions-counter.hidden {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
}

/* Títulos das Seções */
.section-title {
    margin: 40px 0 25px 0;
    padding: 20px;
    background: rgb(177, 65, 230);
    border-radius: 12px;
    text-align: left;
    box-shadow: 0 6px 20px rgba(174, 47, 233, 0.4);
}

.section-title h2 {
    color: white;
    font-size: 1.5em;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.section-title p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95em;
    margin: 0;
    font-style: italic;
    line-height: 1.4;
}

.score-container {
    text-align: center;
    background: linear-gradient(135deg, #DA70D6 0%, #8B4513 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(218, 112, 214, 0.3);
}



@keyframes scoreAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); color: #F5F5DC; }
    100% { transform: scale(1); }
}

/* Caixa de Resultados */
.results-box {
    margin-top: 40px;
    background: rgba(245, 245, 220, 0.95);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid #DDA0DD;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    background: linear-gradient(135deg, #DA70D6 0%, #8B4513 100%);
    color: white;
    padding: 20px;
    border-radius: 13px 13px 0 0;
    text-align: center;
}

.results-header h2 {
    margin: 0;
    font-size: 1.5em;
    font-weight: 500;
}

.results-content {
    padding: 30px;
}

.final-score {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(218, 112, 214, 0.1);
    border-radius: 10px;
    border: 1px solid #DDA0DD;
}

.score-label {
    display: block;
    color: #8B4513;
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 10px;
}

#final-score {
    font-size: 2.5em;
    font-weight: bold;
    color: #DA70D6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stage-info {
    margin-bottom: 25px;
    text-align: center;
}

.stage-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #8B4513;
    margin-bottom: 12px;
    line-height: 1.3;
}

.stage-description {
    font-size: 1em;
    color: #666;
    line-height: 1.5;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: rgba(221, 160, 221, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #DA70D6 0%, #DDA0DD 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 0%;
}

.question-block {
    margin-bottom: 35px;
    padding: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-left: 4px solid rgb(114, 0, 167);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.1);
}

.question-block h3 {
    color: #8B4513;
    margin-bottom: 20px;
    font-size: 1.2em;
    font-weight: 500;
    line-height: 1.4;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.option-btn {
    background: rgba(245, 245, 220, 0.9);
    border: 2px solid #DDA0DD;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #8B4513;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.option-btn:hover {
    border-color: #DA70D6;
    background: rgba(245, 245, 220, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(218, 112, 214, 0.2);
}

.option-btn.selected {
    background: linear-gradient(135deg, #DA70D6 0%, #DDA0DD 100%);
    border-color: #DA70D6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(218, 112, 214, 0.4);
}

.option-btn.selected::after {
    content: "✓";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    font-size: 18px;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}



/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        margin: 10px;
    }
    
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .question-block {
        padding: 15px;
        margin-bottom: 25px;
    }
    
    .option-btn {
        padding: 12px 15px;
        font-size: 15px;
    }
    
    .top-bar {
        margin: -20px -20px 0 -20px;
        width: calc(100% + 40px);
    }
    
    .logo-container {
        margin: 0 -20px 20px -20px;
        width: calc(100% + 40px);
    }
    
    .site-logo {
        width: 100%;
        max-width: 100%;
    }
    
    .questions-counter {
        max-width: 280px;
        font-size: 14px;
    }
    
    .help-button {
        font-size: 13px;
        padding: 10px 16px;
    }
}