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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --background-color: #f0f9ff;
    --card-background: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    text-align: center;
    padding: 30px 0;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
}

.screen {
    display: none;
    flex: 1;
}

.screen.active {
    display: block;
}

/* Tela Inicial */
.welcome-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.welcome-card h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.welcome-card > p {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.specialty-btn {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.specialty-btn:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.2);
}

.specialty-btn .icon {
    font-size: 2.5rem;
}

.specialty-btn span:last-child {
    font-weight: 600;
    color: var(--text-primary);
}

/* Quiz Screen */
.quiz-header {
    background: var(--card-background);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

#progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    width: 0%;
    transition: width 0.3s ease;
}

.question-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.question-category {
    display: inline-block;
    background: var(--background-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.question-text {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    line-height: 1.8;
}

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

.option-btn {
    background: var(--background-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 18px 25px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    color: var(--text-primary);
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background: #eff6ff;
}

.option-btn.correct {
    background: #d1fae5;
    border-color: var(--success-color);
    color: #065f46;
}

.option-btn.wrong {
    background: #fee2e2;
    border-color: var(--error-color);
    color: #991b1b;
}

.option-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.feedback {
    margin-top: 25px;
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    display: none;
}

.feedback.correct {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success-color);
}

.feedback.wrong {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--error-color);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 15px 40px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--secondary-color);
    color: var(--text-primary);
}

/* Result Screen */
.result-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 50px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

#result-title {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

#result-message {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.score-summary {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
}

.score-item {
    text-align: center;
}

.score-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.score-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
}

.score-item:nth-child(1) .score-value {
    color: var(--success-color);
}

.score-item:nth-child(2) .score-value {
    color: var(--error-color);
}

.score-item:nth-child(3) .score-value {
    color: var(--primary-color);
}

.percentage-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
}

.percentage-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.bg-circle {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 12;
}

#percentage-circle {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 339.292;
    stroke-dashoffset: 339.292;
    transition: stroke-dashoffset 1s ease;
}

#percentage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }

    .welcome-card,
    .question-card,
    .result-card {
        padding: 25px;
    }

    .specialties-grid {
        grid-template-columns: 1fr;
    }

    .score-summary {
        gap: 20px;
    }

    .score-value {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}
