/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px 20px 100px 20px;
}

.brain-flipped {
    display: inline-block;
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    -moz-transform: rotateY(180deg);
    -ms-transform: rotateY(180deg);
}

.visual-option {
    display: flex;
    align-items: center;
    padding: 15px;
    min-height: 80px;
}

.visual-option:hover {
    background: #f0f4ff;
    border-color: #667eea;
}

.visual-option.selected {
    background: #667eea;
    color: white;
}

/* Container principal */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    max-width: 900px;
    width: 100%;
    padding: 40px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

/* Títulos */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-weight: bold;
}

/* Seção de introdução */
.intro-section {
    text-align: center;
    margin-bottom: 40px;
}

.intro-section p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Botões informativos */
.info-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}

.info-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.info-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.info-btn::after {
    content: '?';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    opacity: 0.7;
}

/* Tela de configuração */
.setup-screen {
    text-align: center;
}

.setup-screen h2 {
    color: #555;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.question-count-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.count-option {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.count-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.start-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.start-btn:hover {
    background: #218838;
    transform: scale(1.05);
}

.start-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Tela do quiz */
.quiz-screen {
    display: none;
}

.progress-bar {
    width: 100%;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    margin-bottom: 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
    width: 0%;
    transition: width 0.3s ease;
}

.question-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    color: #666;
    font-weight: bold;
}

.question-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.question h3 {
    color: #333;
    margin-bottom: 25px;
    font-size: 1.3rem;
    line-height: 1.5;
}

.options {
    display: grid;
    gap: 15px;
}

.option {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.option:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.option.selected {
    border-color: #667eea;
    background: #667eea;
    color: white;
}

.option input[type="radio"] {
    margin: 0;
    accent-color: #667eea;
}

/* Navegação */
.navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.nav-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #5a6fd8;
    transform: translateY(-2px);
}

.nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.finish-btn {
    background: #dc3545;
}

.finish-btn:hover:not(:disabled) {
    background: #c82333;
}

/* Tela de resultados */
.results-screen {
    display: none;
    text-align: center;
}

.score-display {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 40px;
    border-radius: 20px;
    margin: 30px 0;
}

.score-number {
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.score-category {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.score-description {
    font-size: 1rem;
    opacity: 0.9;
}

.detailed-results {
    text-align: left;
    margin-top: 30px;
}

.wrong-answers {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
}

.wrong-answer-item {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    border-left: 4px solid #dc3545;
}

.restart-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 30px;
    transition: all 0.3s ease;
}

.restart-btn:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #000;
}

.modal h2 {
    color: #333;
    margin-bottom: 20px;
    padding-right: 40px;
}

.modal p, .modal ul {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal ul {
    padding-left: 20px;
}

.modal li {
    margin-bottom: 8px;
}

.modal h3, .modal h4 {
    color: #333;
    margin: 20px 0 10px 0;
}

.score-ranges {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
}

.score-range {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Rodapé */
.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 0.9rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.footer a {
    color: #3498db;
    text-decoration: none;
    margin: 0 5px;
}

.footer a:hover {
    text-decoration: underline;
}


/* Responsividade */
@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .question-count-selector {
        grid-template-columns: 1fr 1fr;
    }

    .info-buttons {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 20px;
    }

    body {
        padding: 15px 15px 100px 15px;
    }

    .score-number {
        font-size: 3rem;
    }
}