
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
    
}

.quiz-container {
    max-width: 950px;
    margin: 0 auto;
    padding: 10px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.btn-outline {
    background: transparent;
    border: 2px solid #4ecdc4;
    color: #4ecdc4;
    padding: 8px 15px;
    font-size: 0.9rem;
    box-shadow: none;
}

.btn-outline:hover {
    background: #4ecdc4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 20px;
    border-radius: 18px;
    margin-bottom: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #ff6b6b;
    animation: bounce 2s infinite;
}

.logo h1 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    color: #4ecdc4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.progress-wrapper {
    margin: 15px 0 5px;
    width: 100%;
}

.progress-info {
    text-align: right;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.quiz-progress-bar {
    width: 100%;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.progress-bar {
    width: 200px;
    height: 12px;
    background: #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ffd93d);
    border-radius: 6px;
    transition: width 0.5s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.screen {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.screen.question {
    padding-top: 8px;
}

.age-selection {
    flex-direction: column;
    text-align: center;
}

.age-selection h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.age-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 800px;
    width: 100%;
}

.age-btn {
    background: white;
    border: none;
    border-radius: 20px;
    padding: 30px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.age-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.age-btn:hover::before {
    left: 100%;
}

.age-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.age-btn i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.age-btn:nth-child(1) i {
    color: #ff6b6b;
}

.age-btn:nth-child(2) i {
    color: #4ecdc4;
}

.age-btn:nth-child(3) i {
    color: #45b7d1;
}

.age-btn span {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.age-btn small {
    color: #666;
    font-size: 0.9rem;
}

.question {
    flex-direction: column;
    gap: 30px;
}

.category-info {
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.category-info h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.8rem;
    color: #4ecdc4;
    margin-bottom: 8px;
}

.category-info p {
    color: #666;
    font-size: 1.1rem;
}

.question-content {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    width: 100%;
}

.question-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.question-text h4 {
    font-size: 1.4rem;
    line-height: 1.5;
    color: #333;
    flex: 1;
}

.audio-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.audio-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.audio-btn.playing {
    animation: pulse 1s infinite;
}

.question-image {
    text-align: center;
    margin-bottom: 20px;
}

.question-image img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.choice-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.option-btn {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
    border-radius: 15px;
    padding: 20px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(240, 147, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.option-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.option-btn:hover::before {
    left: 100%;
}

.option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
}

.option-btn.selected {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    transform: scale(0.95);
}

.option-btn.correct {
    background: linear-gradient(135deg, #56ab2f, #a8e6cf);
    animation: correctAnswer 0.6s ease;
}

.option-btn.incorrect {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    animation: shake 0.6s ease;
}

.drag-drop-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.drop-zone {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: 3px dashed rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-height: 100px;
    display: none;
    
    align-items: center;
    justify-content: center;
}

.drop-zone.visible {
    display: flex;
}

.drop-zone.drag-over {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border-color: white;
    transform: scale(1.02);
}

.drop-zone.has-answer {
    background: linear-gradient(135deg, #56ab2f, #a8e6cf);
    border-color: #56ab2f;
}

.drop-zone.has-answer {
    padding: 14px 18px;
    min-height: unset;
    align-items: center;
    justify-content: flex-start;
}

.drop-zone .draggable,
.drop-zone .option-card {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}

.drop-zone .option-img {
    width: 96px;
    height: auto;
    object-fit: contain;
    margin: 0;
}

.drop-zone .option-label {
    display: inline-block;
    width: auto;
    padding: 8px 14px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 10px;
    margin: 0;
}

.drag-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.draggable {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: 2px solid #fcb69f;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #333;
    cursor: grab;
    transition: all 0.25s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
}

.draggable:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(252, 182, 159, 0.4);
}

.draggable.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.draggable.placed {
    background: linear-gradient(135deg, #a8e6cf 0%, #56ab2f 100%);
    border-color: #56ab2f;
    color: white;
    cursor: default;
}

.option-img {
    display: block;
    width: 140px;
    height: 110px;
    object-fit: contain;
    margin: 0 auto;
    pointer-events: none;
}

.option-label {
    display: block;
    font-size: 1rem;
    color: #333;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.6);
    padding: 6px 10px;
    border-radius: 8px;
    width: calc(100% - 12px);
    text-align: center;
    margin-top: 6px;
}

.option-label {
    
    user-select: none;
    -webkit-user-select: none;
}

.draggable:has(.option-img) {
    padding: 10px;
}

.results {
    text-align: center;
}

.result-card {
    background: white;
    border-radius: 25px;
    padding: 50px 40px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.result-icon {
    margin-bottom: 30px;
}

.result-icon i {
    font-size: 5rem;
    color: #ffd93d;
    animation: bounce 2s infinite;
}

.result-card h2 {
    font-family: 'Fredoka One', cursive;
    font-size: 2.2rem;
    color: #4ecdc4;
    margin-bottom: 30px;
}

.score-display {
    margin-bottom: 30px;
}

.score {
    font-size: 4rem;
    font-weight: 700;
    color: #ff6b6b;
    display: block;
}

.total {
    font-size: 1.2rem;
    color: #666;
    display: block;
}

.result-message {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 40px;
    padding: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-radius: 15px;
    font-weight: 600;
}

.result-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    border: none;
    border-radius: 25px;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #ff6b6b, #ff8e53);
    color: white;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 240ms ease, transform 240ms ease;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.loading-spinner i {
    font-size: 3rem;
    color: #4ecdc4;
    animation: spin 1s linear infinite;
}

.loading-spinner p {
    margin-top: 15px;
    font-size: 1.2rem;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes correctAnswer {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.screen {
    animation: slideIn 0.5s ease;
}

.click-map-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.click-area {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.area-image {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
    
}

.area-image.revealed {
    opacity: 1;
    animation: glowPulse 2s infinite;
    filter: drop-shadow(0 0 15px gold);
}

@keyframes glowPulse {
    0% {
        filter: drop-shadow(0 0 5px gold);
    }

    50% {
        filter: drop-shadow(0 0 20px gold);
    }

    100% {
        filter: drop-shadow(0 0 5px gold);
    }
}

.click-map-container.locked .click-area {
    cursor: default;
}

@media (max-width: 768px) {
    .quiz-container {
        padding: 10px;
    }

    .quiz-header {
        flex-direction: row;
        gap: 12px;
        text-align: left;
        padding: 10px 15px;
        margin-bottom: 10px;
        align-items: center;
    }

    .logo h1 {
        display: none;
    }

    .logo i {
        font-size: 1.8rem;
    }

    .header-right {
        flex-direction: row;
        flex: 1;
        gap: 10px;
        width: auto;
        align-items: center;
        justify-content: flex-end;
    }

    .header-actions {
        order: 2;
    }

    .header-actions .btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .progress-container {
        flex: 1;
        align-items: stretch;
        order: 1;
    }

    .progress-bar {
        width: 100%;
        max-width: none;
    }

    .progress-text {
        font-size: 0.75rem;
        text-align: center;
    }

    .category-info {
        display: none;
    }

    .question {
        gap: 15px;
    }

    .age-selection h2 {
        font-size: 2rem;
    }

    .age-options {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .question-content {
        padding: 20px 15px;
    }

    .question-text {
        flex-direction: column;
        gap: 15px;
    }

    .question-text h4 {
        text-align: center;
        font-size: 1.15rem;
    }

    .choice-options {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .drag-options {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

    .option-btn {
        font-size: 1rem;
        padding: 15px;
    }

    .drag-drop-container {
        gap: 15px;
    }

    .drop-zone {
        padding: 20px 15px;
        font-size: 1rem;
    }

    .result-card {
        padding: 30px 25px;
    }

    .result-card h2 {
        font-size: 1.8rem;
    }

    .score {
        font-size: 3rem;
    }

    .result-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .quiz-header {
        padding: 8px 12px;
        gap: 8px;
    }

    .logo i {
        font-size: 1.5rem;
    }

    .question-content {
        padding: 20px 15px;
    }

    .age-btn {
        padding: 20px 15px;
    }

    .age-btn i {
        font-size: 2.5rem;
    }

    .age-btn span {
        font-size: 1.1rem;
    }

    .audio-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media print {

    .quiz-header,
    .audio-btn,
    .result-actions {
        display: none;
    }

    .question-content {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

@media (prefers-contrast: high) {

    .option-btn,
    .age-btn,
    .btn {
        border: 2px solid currentColor;
    }

    .drop-zone {
        border: 3px solid currentColor;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.click-area[data-id="lingua"] {
    top: 48%;
    
    left: 28%;
    width: 44%;
    
    height: 40%;
    
    z-index: 10;
    
    border-radius: 40% 40% 50% 50%;
}

.click-area[data-id="dentes"] {
    top: 25%;
    left: 15%;
    width: 70%;
    height: 65%;
    z-index: 5;
    
    border-radius: 40%;
}

.click-area[data-id="saliva"] {
    top: 60%;
    left: 32%;
    width: 36%;
    
    height: 12%;
    
    z-index: 15;
    
    border-radius: 20px;
}

.click-area[data-id="gengiva"] {
    top: 10%;
    left: 20%;
    width: 60%;
    height: 15%;
    
    z-index: 12;
    
    border-radius: 50% 50% 0 0;
}

.stage {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 100%;
}

#mouth-img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
    user-select: none;
    -webkit-user-drag: none;
    cursor: pointer;
    touch-action: manipulation;
}

.draggable {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border: 2px solid #fcb69f;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: #333;
    cursor: grab;
    transition: all 0.25s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 140px;
}

.draggable:active {
    cursor: grabbing;
}

.option-img {
    display: block;
    width: 160px;
    height: 120px;
    object-fit: contain;
    margin: 0 auto;
    pointer-events: none;
}

.click-area.revealed {
    opacity: 1;
    animation: glowPulse 2s infinite;
}

.stage {
    position: relative;
    
}

.brush-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2000;
    pointer-events: auto;
}

.brush-img {
    display: block;
    width: 120px;
    
    max-width: 28%;
    min-width: 48px;
    height: auto;
    touch-action: none;
    user-select: none;
    -webkit-user-drag: none;
}

.brush-success {
    animation: brushSuccess 0.6s ease forwards;
}

@keyframes brushSuccess {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(0, 0, 0, 0));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 6px 18px rgba(78, 205, 196, 0.25));
    }

    100% {
        transform: scale(1);
        filter: none;
    }
}

@media (max-width: 480px) {
    .option-img {
        width: 120px;
        height: 90px;
    }
}

.brush-feedback-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150px;
    z-index: 100;
    pointer-events: none;
    display: none;
}

.brush-feedback-animation.active {
    display: block;
    animation: vaiEVemBrushing 1.5s ease-in-out infinite;
}

@keyframes vaiEVemBrushing {

    0%,
    100% {
        transform: translate(-50%, -50%) translateX(-40px) rotate(-10deg);
    }

    50% {
        transform: translate(-50%, -50%) translateX(40px) rotate(10deg);
    }
}

.foam-particle {
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    opacity: 0.8;
    pointer-events: none;
    z-index: 1000;
    animation: foamPop 0.8s ease-out forwards;
    box-shadow: 0 0 2px rgba(200, 200, 255, 0.5);
}

@keyframes foamPop {
    0% {
        transform: scale(0.5) translate(0, 0);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2) translate(var(--rx), var(--ry));
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5) translate(var(--rx), var(--ry));
        opacity: 0;
    }
}