* {
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

body {
    background: #f5f7fa;
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.app {
    max-width: 1200px;
    width: 100%;
    background: white;
    border-radius: 24px;
    padding: 24px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    font-weight: 600;
    font-size: 28px;
    color: #2c3e50;
    margin-top: 0;
}

.sub {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 20px;
}

.model-wrapper {
    background: #ecf0f1;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 30px;
}

#model-container {
    width: 100%;
    height: 400px;
    display: block;
    cursor: grab;
}

#model-container:active {
    cursor: grabbing;
}

.quiz-area {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    justify-content: center;
    margin-bottom: 20px;
}

.question-card {
    flex: 1 1 300px;
    min-width: 250px;
    background: #f8f9fc;
    border-radius: 16px;
    padding: 16px 12px;
    border: 1px solid #e9edf4;
}

.question-title {
    font-weight: 600;
    font-size: 18px;
    color: #2c3e50;
    text-align: center;
    border-bottom: 2px solid #dce1ea;
    padding-bottom: 8px;
    margin-bottom: 14px;
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.option-item {
    background: white;
    border-radius: 12px;
    border: 3px solid transparent;
    padding: 4px;
    transition: 0.15s;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    display: flex;
    justify-content: center;
    align-items: center;
}

.option-item:hover {
    border-color: #b0c4de;
    transform: scale(1.02);
}

.option-item.selected {
    border-color: #2980b9;
    background: #eaf4fb;
}

.option-item.correct {
    border-color: #27ae60;
    background: #eafaf1;
}

.option-item.wrong {
    border-color: #e74c3c;
    background: #fdedec;
}

.option-item canvas {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
    display: block;
    border-radius: 6px;
    background: white;
}

.btn-group {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-primary {
    background: #2980b9;
    color: white;
}

.btn-primary:hover {
    background: #1f6390;
    transform: scale(1.02);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background: #d5dbdf;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #1e8449;
}

#result {
    text-align: center;
    margin-top: 16px;
    font-size: 20px;
    font-weight: 600;
    min-height: 40px;
}

.pass {
    color: #27ae60;
}

.fail {
    color: #e74c3c;
}

.legend {
    font-size: 13px;
    color: #7f8c8d;
    text-align: center;
    margin-top: 12px;
    border-top: 1px solid #ecf0f1;
    padding-top: 12px;
}

.legend span {
    display: inline-block;
    margin: 0 8px;
}

.dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 4px;
}

@media (max-width: 700px) {
    .app {
        padding: 16px;
    }

    .question-card {
        flex: 1 1 100%;
    }
}