/*

Theme Name: Edu Simple

Version: 1.0

Author: K5A

*/

body { font-family: Arial, sans-serif; line-height: 1.6; margin: 0; padding: 10px; background: #f9f9f9; color: #333; }

header, footer { text-align: center; margin-bottom: 20px; padding: 10px 0; }

main { max-width: 1200px; margin: 0 auto; background: white; padding: 15px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

h1, h2, h3 { color: #2c3e50; }

a { color: #3498db; text-decoration: none; }

a:hover { text-decoration: underline; }

img { max-width: 100%; }

audio{max-width: 100%;}

.mb-5 { margin-bottom: 5px; }

.mb-10 { margin-bottom: 10px; }

.mb-20 { margin-bottom: 20px; }

.task-locked { background: #fff3cd; color: #856404; padding: 10px; border-radius: 4px; margin: 10px 0; }

.progress-indicator { height: 6px; background: #eee; border-radius: 3px; margin: 8px 0; }

.post-list-item { padding: 12px 0; border-bottom: 1px solid #eee; }

.post-list-item h3 { margin: 0; }

.post-list-item:last-child { border-bottom: none; }

.universal-task { max-width: 700px; margin: 0 auto; padding: 15px; }

.task-question-title { font-size: 1.2em; font-weight: bold; margin: 15px 0 8px 0; }

.task-question-content { margin-bottom: 15px; line-height: 1.5; }

.task-divider { margin: 20px 0; border: 0; border-top: 1px solid #eee; }

.task-answers.answers-row { display: flex; flex-wrap: wrap; gap: 10px; }

.task-answers.answers-column { display: block; }

.task-answer-option.option-radio,

.task-answer-option.option-checkbox { display: inline-flex; align-items: center; padding: 8px 12px; background: #f0f0f0; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; margin: 0 5px 5px 0; transition: all 0.2s; }

.task-answer-option.option-radio input,

.task-answer-option.option-checkbox input { display: none; }

.task-answer-option.option-radio .answer-text,

.task-answer-option.option-checkbox .answer-text { margin: 0 8px; }

.task-answer-option.answer-correct { background: #d4edda; border-color: #28a745; }

.task-answer-option.answer-incorrect { background: #f8d7da; border-color: #dc3545; }

.blank-box { display: inline-block; margin: 0 2px; box-sizing: border-box; }

.task-answer-input,

.blank-input-field { padding: 8px; border: 1px solid #ccc; border-radius: 4px; width: 100%; max-width: 300px; box-sizing: border-box; }

.task-answer-input.answer-correct,

.blank-input-field.answer-correct { border-color: #28a745; background-color: #f0fff4; }

.task-answer-input.answer-incorrect,

.blank-input-field.answer-incorrect { border-color: #dc3545; background-color: #fff0f0; }

.blank-drop-zone { display: inline-block; min-width: 40px; height: 30px; border: 2px dashed #aaa; border-radius: 4px; text-align: center; line-height: 30px; margin: 0 5px; background: #fafafa; color: #666; }

.blank-drop-zone.drag-over { border-color: #4CAF50; background: #f0fff4; }

.blank-drag-option { display: inline-block; padding: 6px 12px; background: #e0e0e0; border: 1px solid #ccc; border-radius: 4px; margin: 0 5px 5px 0; cursor: grab; }

.blank-drag-option.dragging { opacity: 0.6; }

.task-check-btn { background: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 1em; margin-top: 15px; }

.task-check-btn:hover { background: #005a87; }

@media (max-width: 600px) {

    .task-answers.answers-row { flex-direction: column; }

    .blank-drag-option,

    .task-answer-option { width: 100%; box-sizing: border-box; }

}

.task-answer-option.active { background-color: #e3f2fd; border-color: #2196f3; }

.answer-feedback { margin-left: 6px; font-weight: bold; }

.answer-correct .answer-feedback { color: #28a745; }

.answer-incorrect .answer-feedback { color: #dc3545; }

.blank-drop-zone.answer-correct { border-color: #28a745; background-color: #f0fff4; }

.blank-drop-zone.answer-incorrect { border-color: #dc3545; background-color: #fff0f0; }

.correct-answer-hint { display: block; margin-top: 5px; font-size: 0.9em; color: #28a745; }

.step-by-step-quiz .step-quiz-container { min-height: 260px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 20px; box-sizing: border-box; }

.step-by-step-quiz .step-quiz-progress { width: 100%; max-width: 500px; margin-bottom: 20px; font-weight: bold; font-size: 1.1em; }

.step-by-step-quiz .step-quiz-question { width: 100%; max-width: 500px; }

.step-by-step-quiz .step-quiz-question-title { margin: 0 0 12px 0; font-weight: bold; font-size: 1.3em; }

.step-by-step-quiz .step-quiz-content { margin-bottom: 20px; line-height: 1.5; }

.step-by-step-quiz .step-quiz-options { margin: 15px 0; text-align: left; }

.step-by-step-quiz .step-quiz-options label { display: block; margin: 8px 0; padding: 12px; border: 1px solid #ccc; border-radius: 6px; cursor: pointer; transition: background 0.2s; }

.step-by-step-quiz .step-quiz-options input[type="radio"] { margin-right: 10px; }

.step-by-step-quiz .step-quiz-input { width: 100%; max-width: 300px; padding: 10px; margin: 15px 0; border: 1px solid #ccc; border-radius: 4px; font-size: 1em; }

.step-by-step-quiz .step-quiz-btn { margin-top: 20px; background: #0073aa; color: white; border: none; padding: 10px 24px; border-radius: 4px; cursor: pointer; font-size: 1em; transition: background 0.2s; }

.step-by-step-quiz .step-quiz-btn:hover { background: #005a87; }

.step-by-step-quiz .step-quiz-results { width: 100%; max-width: 600px; margin: 0 auto; text-align: left; }

.step-by-step-quiz .results-list { margin-top: 20px; }

.step-by-step-quiz .result-item { margin: 12px 0; padding: 12px; border-radius: 4px; }

.step-by-step-quiz .result-item.correct { border-left: 4px solid #28a745; background: #f8fff9; color: #28a745; font-weight: bold; }

.step-by-step-quiz .result-item.incorrect { border-left: 4px solid #dc3545; background: #fff8f8; }

.step-by-step-quiz .result-item.incorrect .user-answer { color: #dc3545; text-decoration: line-through; }

.step-by-step-quiz .result-item.incorrect .correct-answer { color: #333; font-size: 0.95em; }

@media (max-width: 600px) {

    .step-by-step-quiz .step-quiz-container { padding: 15px; min-height: 220px; }

    .step-by-step-quiz .step-quiz-options label { padding: 10px; font-size: 0.95em; }

    .step-by-step-quiz .step-quiz-input,

    .step-by-step-quiz .step-quiz-btn { width: 100%; max-width: 100%; }

}

.word-search-grid { display: grid; gap: 2px; margin: 0 auto; width: fit-content; }

.word-search-grid[data-size="5"] { grid-template-columns: repeat(5, 30px); }

.word-search-grid[data-size="6"] { grid-template-columns: repeat(6, 30px); }

.word-search-grid[data-size="7"] { grid-template-columns: repeat(7, 30px); }

.word-search-grid[data-size="8"] { grid-template-columns: repeat(8, 30px); }

.word-search-grid[data-size="9"] { grid-template-columns: repeat(9, 30px); }

.word-search-grid[data-size="10"] { grid-template-columns: repeat(10, 30px); }

.word-search-grid[data-size="11"] { grid-template-columns: repeat(11, 30px); }

.word-search-grid[data-size="12"] { grid-template-columns: repeat(12, 30px); }

.ws-cell { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; background: white; border: 1px solid #ddd; font-weight: bold; font-size: 14px; user-select: none; }

.ws-btn { background: #0073aa; color: white; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; }

.ws-btn:hover { background: #005a87; }

.ws-cell { transition: all 0.2s; }

.universal-quiz { max-width: 800px; margin: 0 auto; padding: 20px 0; }

.universal-quiz .quiz-questions-container { min-height: 300px; margin-bottom: 20px; padding: 7px; background: #f8f9fa; border-radius: 8px; border: 1px solid #dee2e6; }

.universal-quiz .quiz-pagination-container { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 20px 0; }

.universal-quiz .quiz-page-btn { width: 40px; height: 40px; border: 2px solid #007bff; background: white; border-radius: 4px; cursor: pointer; font-weight: bold; transition: all 0.3s ease; }

.universal-quiz .quiz-page-btn:hover { background: #f8f9fa; }

.universal-quiz .quiz-page-active { background: #007bff; color: white; }

.universal-quiz .quiz-page-answered { background: #87ceeb; border-color: #5cb3ff; }

.universal-quiz .quiz-navigation-container { display: flex; justify-content: space-between; margin-top: 20px; }

.universal-quiz .quiz-nav-btn { padding: 10px 20px; border: none; border-radius: 4px; background: #007bff; color: white; cursor: pointer; font-size: 16px; transition: background 0.3s ease; }

.universal-quiz .quiz-nav-btn:hover { background: #0056b3; }

.universal-quiz .quiz-check-btn { background: #28a745; }

.universal-quiz .quiz-check-btn:hover { background: #1e7e34; }

.universal-quiz .quiz-prev-btn { background: #6c757d; }

.universal-quiz .quiz-prev-btn:hover { background: #545b62; }

.universal-quiz .quiz-results-container { margin-bottom: 20px; }

.universal-quiz .quiz-score-display { text-align: center; margin-bottom: 30px; padding: 20px; background: #f8f9fa; border-radius: 8px; }

.universal-quiz .quiz-question-result { padding: 15px; margin-bottom: 15px; border-radius: 8px; border-left: 4px solid #6c757d; }

.universal-quiz .quiz-correct { border-left-color: #28a745; background: #f8fff9; }

.universal-quiz .quiz-incorrect { border-left-color: #dc3545; background: #fff8f8; }

.universal-quiz .quiz-user-answer,

.universal-quiz .quiz-correct-answer { margin: 8px 0; padding: 8px; border-radius: 4px; }

.universal-quiz .quiz-correct-text { color: #28a745; font-weight: bold; }

.universal-quiz .quiz-incorrect-text { color: #dc3545; font-weight: bold; }

.universal-quiz .quiz-correct-answer { background: #f8fff9; border: 1px solid #28a745; }

.universal-quiz .quiz-page-correct { background: #00b51a; }

.universal-quiz .quiz-page-incorrect { background: #ff2727; }

.universal-quiz .quiz-result-icon { font-weight: bold; margin-left: 5px; }

.universal-quiz .quiz-retry-btn { padding: 12px 30px; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 16px; display: block; margin: 20px auto; }

.universal-quiz .quiz-retry-btn:hover { background: #0056b3; }

.universal-quiz .quiz-question { padding: 20px; background: white; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

.universal-quiz .quiz-question-title { margin-bottom: 15px; color: #333; }

.universal-quiz .quiz-question-content { margin-bottom: 15px; }

.universal-quiz .quiz-result-question-content { margin: 10px 0; padding: 10px; background: #f8f9fa; border-radius: 4px; border-left: 3px solid #6c757d; }

.universal-quiz .quiz-answers { margin-top: 15px; }

.universal-quiz .quiz-answers-row { display: flex; flex-wrap: wrap; gap: 10px; }

.universal-quiz .quiz-answers-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 15px; }

.universal-quiz .quiz-answers-grid .quiz-answer-option { display: block;margin: 8px 0; padding: 10px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; }

.universal-quiz .quiz-answers-grid .quiz-answer-option img{max-width: 100%!important;}

.universal-quiz .quiz-answer-option { display: block; margin: 8px 0; padding: 10px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; transition: all 0.3s ease; }

.universal-quiz .quiz-answer-option:hover { background: #f8f9fa; }

.universal-quiz .quiz-option-active { background: #e3f2fd; border-color: #2196f3; }

.universal-quiz .quiz-answer-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 16px; }

.universal-quiz .quiz-blank-drop-zone { display: inline-block; width: 50px; padding: 5px 10px; margin: 0 5px; border: 1px dashed #007bff; border-radius: 4px; background: #f8f9fa; text-align: center; cursor: pointer; }

.quiz-blank-drop-zone.quiz-blank-correct { background-color: #d4edda !important; color: #155724 !important; border: 2px solid #c3e6cb !important; }

.quiz-blank-drop-zone.quiz-blank-incorrect { background-color: #f8d7da !important; color: #721c24 !important; border: 2px solid #f5c6cb !important; }

.quiz-blank-drop-zone:hover { border-color: #0073aa; background-color: #e7f3ff; }

.universal-quiz .quiz-blank-drag-option { display: inline-block; padding: 8px 15px; margin: 5px; border: 1px solid #007bff; border-radius: 4px; background: #007bff; color: white; cursor: grab; }

.universal-quiz .quiz-dragging { opacity: 0.5; }

.universal-quiz .quiz-drag-over { background: #e3f2fd; }

.universal-quiz .quiz-blank-input-field { display: inline-block; width: 60px; padding: 5px; margin: 0 5px; border: 1px solid #9b9b9b; border-radius: 4px; text-align: center; }

.scrollable-row-container { overflow-x: auto; padding: 10px 0; margin: 15px 0; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; }

.scrollable-row-container .row-with-items { display: flex; gap: 8px; padding: 8px 0; min-width: 400px; align-items: center; }

.not-empty-item { min-width: 30px; text-align: center; font-family: 'Courier New', monospace; font-size: 16px; font-weight: bold; color: #2c3e50; background: white; border: 1px solid #ccc; border-radius: 4px; padding: 4px 8px; box-sizing: border-box; }

.scrollable-row-container .row-label { font-weight: bold; color: #7f8c8d; margin-right: 10px; min-width: 50px; text-align: right; }

.math-grid-quiz .current-example { transition: transform 0.3s ease, opacity 0.3s ease, border-color 0.3s ease; }

.math-grid-quiz .current-example.solved { border-color: #4CAF50; background: #e8f5e9; animation: pulseSuccess 0.5s ease, fadeOutAndShrink 0.6s 0.2s forwards; }

@keyframes pulseSuccess { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }

@keyframes fadeOutAndShrink { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.8); height: 0; padding: 0; margin: 0; overflow: hidden; } }

.math-grid-quiz .current-example.new { animation: popIn 0.4s ease; }

@keyframes popIn { 0% { opacity: 0; transform: scale(0.8); } 70% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }

.math-grid-quiz .progress-indicator { position: relative; height: 30px; background: #f0f0f0; border-radius: 15px; overflow: hidden; border: none; padding: 0; }

.math-grid-quiz .progress-indicator::before { content: attr(data-progress-text); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-weight: bold; color: #0073aa; z-index: 2; }

.math-grid-quiz .progress-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #4CAF50, #8BC34A); border-radius: 15px; transition: width 0.5s ease; z-index: 1; position: relative; }

.math-grid-quiz .task-check-btn { transition: all 0.3s ease; }

.math-grid-quiz .task-check-btn:hover { transform: scale(1.05); box-shadow: 0 6px 15px rgba(255, 107, 107, 0.5); }

.math-grid-quiz .grid-cell { transition: all 0.3s ease; }

.math-grid-quiz .grid-cell.correct { animation: popCorrect 0.3s ease, fadeOutAndRemove 0.5s 0.2s forwards; }

@keyframes popCorrect { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

@keyframes fadeOutAndRemove { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.5); visibility: hidden; } }

.math-grid-quiz .grid-cell.incorrect { animation: shake 0.5s ease; background: red!important; }

@keyframes shake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }

.edu-matching-cards-game { font-family: Arial, sans-serif; margin: 20px 0; background-color: #f0f8ff; border-radius: 10px; padding: 20px; touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }

.edu-matching-cards-game .game-container { display: flex; flex-direction: row; justify-content: space-between; gap: 15px; height: calc(100vh - 250px); min-height: 500px; max-height: 700px; }

.edu-matching-cards-game .column { display: flex; flex-direction: column; align-items: center; width: 48%; overflow-y: auto; padding: 5px; }

.edu-matching-cards-game .items-grid { display: flex; flex-direction: column; width: 100%; gap: 5px; }

.edu-matching-cards-game .item-container { width: 100%; min-height: 120px; display: flex; justify-content: center; align-items: center; position: relative; }

.edu-matching-cards-game .item { width: 140px; height: 140px; border: 3px solid #3498db; border-radius: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; background-color: white; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; touch-action: none; padding: 3px; box-sizing: border-box; }

.edu-matching-cards-game .left-column .item { background-color: #e6f7ff; }

.edu-matching-cards-game .right-column .item { background-color: #fff2e6; }

.edu-matching-cards-game .item img { max-width: 100%; max-height: 90%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none; margin-bottom: 8px; }

.edu-matching-cards-game .item-text { text-align: center; font-size: 14px; font-weight: 500; color: #2c3e50; margin-top: 5px; word-break: break-word; max-width: 100%; }

.edu-matching-cards-game .audio-button { position: absolute; right: 5px; bottom: 5px; width: 24px; height: 24px; background-color: rgba(255, 255, 255, 0.9); border-radius: 50%; border: 1px solid #ddd; cursor: pointer; display: flex; justify-content: center; align-items: center; z-index: 2; font-size: 12px; padding: 0; }

.edu-matching-cards-game .dragged-item { position: fixed; z-index: 1000; pointer-events: none; transform: scale(1.1); box-shadow: 0 5px 15px rgba(0,0,0,0.3); }

.edu-matching-cards-game .correct { border-color: #2ecc71 !important; background-color: #e8f8f5 !important; }

.edu-matching-cards-game .incorrect { border-color: #e74c3c !important; background-color: #fdedec !important; }

.edu-matching-cards-game .occupied { border-color: #3498db; background-color: #e6f2ff !important; position: relative; }

.edu-matching-cards-game .occupied::before { content: ""; position: absolute; top: -5px; right: -5px; width: 20px; height: 20px; background: #3498db; border-radius: 50%; z-index: 1; }

.edu-matching-cards-game .matched-text { color: #3498db; font-weight: bold; text-align: center; padding: 10px; font-size: 14px; }

.edu-matching-cards-game .drop-zone { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(0,0,0,0.1); display: none; z-index: 999; }

.edu-matching-cards-game .drop-zone.active { display: block; }

.edu-matching-cards-game .check-button { display: block; margin: 20px auto; padding: 12px 25px; font-size: 18px; background-color: #3498db; color: white; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; }

.edu-matching-cards-game .check-button:hover { background-color: #2980b9; }

.edu-matching-cards-game .check-button:disabled { background-color: #bdc3c7; cursor: not-allowed; }

.edu-matching-cards-game .message { text-align: center; font-size: 18px; margin: 15px; min-height: 30px; padding: 10px; font-weight: 500; }

.edu-matching-cards-editor .components-panel__body-title { font-weight: 600; }

@media (max-width: 768px) {

    .edu-matching-cards-game .game-container { height: 60vh; min-height: 400px; gap: 10px; }

    .edu-matching-cards-game .item { width: 120px; height: 120px; }

    .edu-matching-cards-game .item-text { font-size: 12px; }

}

@media (max-width: 480px) {

    .edu-matching-cards-game { padding: 10px; }

    .edu-matching-cards-game .game-container { height: 50vh; min-height: 350px; gap: 8px; }

    .edu-matching-cards-game .item { width: 100px; height: 100px; }

    .edu-matching-cards-game .item-text { font-size: 11px; }

    .edu-matching-cards-game .check-button { padding: 10px 20px; font-size: 16px; }

    .edu-matching-cards-game .message { font-size: 16px; }

}

.edu-matching-cards-game .column::-webkit-scrollbar { width: 6px; }

.edu-matching-cards-game .column::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px; }

.edu-matching-cards-game .column::-webkit-scrollbar-thumb { background: #3498db; border-radius: 3px; }

.edu-matching-cards-game .column::-webkit-scrollbar-thumb:hover { background: #2980b9; }

.edu-matching-cards-game .drag-clone { position: fixed !important; z-index: 9999 !important; pointer-events: none !important; opacity: 0.8 !important; transform: scale(1.05) rotate(3deg) !important; box-shadow: 0 8px 20px rgba(0,0,0,0.25) !important; transition: transform 0.1s ease, opacity 0.15s ease !important; cursor: grabbing !important; border: 2px solid #3498db !important; background-color: white !important; border-radius: 8px !important; overflow: hidden !important; box-sizing: border-box !important; margin: 0 !important; padding: 0 !important; }

.edu-matching-cards-game .drag-clone .item-image { max-width: 100% !important; max-height: 100% !important; object-fit: contain !important; }

.edu-matching-cards-game .drag-clone .item-text { font-size: 12px !important; padding: 4px !important; }

.edu-matching-cards-game .drag-clone .audio-button { display: none !important; }

.edu-matching-cards-game .item.dragging { opacity: 0.4 !important; transition: opacity 0.2s; }

.edu-matching-cards-game .item-container.drag-over { background-color: rgba(52, 152, 219, 0.1) !important; transform: scale(1.03) !important; transition: all 0.2s !important; border-radius: 8px; }

.edu-matching-cards-game .drop-zone { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(52, 152, 219, 0.05); z-index: 9998; border: 2px dashed #3498db; }

.edu-matching-cards-game .drop-zone.active { display: block !important; }

.edu-matching-cards-game .drop-zone-message { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 16px; font-weight: bold; color: #3498db; text-align: center; padding: 15px; background-color: rgba(255, 255, 255, 0.95); border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.edu-matching-cards-game .edu-matching-cards-game { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

@media (max-width: 768px) {

    .edu-matching-cards-game .drag-clone { transform: scale(1.03) rotate(2deg) !important; box-shadow: 0 6px 15px rgba(0,0,0,0.2) !important; opacity: 0.85 !important; }

    .edu-matching-cards-game .item-container.drag-over { transform: scale(1.02) !important; }

    .edu-matching-cards-game .drop-zone-message { font-size: 14px; padding: 12px; }

}

.edu-matching-cards-game.click-version { position: relative; }

.click-version .game-container { height: auto; max-height: unset; }

.edu-matching-cards-game.click-version .column { display: flex; flex-direction: column; align-items: center; width: 48%; overflow-y: unset; padding: 5px; }

.click-version .game-instructions { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; padding: 12px 16px; margin-bottom: 20px; font-size: 14px; color: #495057; }

.click-version .clickable-item { cursor: pointer; transition: all 0.2s ease; position: relative; z-index: 10; }

.click-version .clickable-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.click-version .clickable-item.selected { border-color: #2ecc71 !important; background-color: rgba(46, 204, 113, 0.1) !important; box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3); transform: scale(1.02); }

.click-version .connections-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 5; }

.click-version .connection-line { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1)); }

@media (max-width: 768px) {

    .click-version .clickable-item { min-height: 80px; }

    .click-version .game-instructions { font-size: 13px; padding: 10px; }

}

.touch-device .click-version .clickable-item { min-height: 90px; }

.touch-device .click-version .clickable-item:active { transform: scale(0.98); }



.math-race-game-container { width: 100%; min-height: 600px; position: relative; background: #111; overflow: hidden; }

.race-color-selector { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: white; min-height: 600px; border-radius: 10px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.race-color-selector-title { color: #4CAF50; margin-bottom: 30px; font-size: 32px; }
.race-color-selector-desc { color: #ccc; max-width: 600px; margin: 0 auto 40px; font-size: 18px; }
.race-color-options { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; margin-bottom: 40px; }
.race-color-option { width: 100px; height: 100px; border-radius: 50%; cursor: pointer; transition: all 0.3s ease; box-shadow: 0 4px 8px rgba(0,0,0,0.3); display: flex; justify-content: center; align-items: center; border: 4px solid transparent; }
.race-color-option-Red { background: red; }
.race-color-option-Yellow { background: yellow; }
.race-color-option-Blue { background: blue; }
.race-color-option--selected { border-color: #4CAF50; }
.race-color-option-inner { font-size: 12px; color: white; text-shadow: 1px 1px 1px rgba(0,0,0,0.7); }
.race-color-selector-btn { padding: 15px 40px; background: linear-gradient(135deg, #4CAF50, #45a049); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 18px; font-weight: bold; margin-top: 20px; opacity: 0.6; transition: all 0.3s; }
.race-color-selector-btn--enabled { opacity: 1; }

.race-level-selector { text-align: center; padding: 40px 20px; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: white; min-height: 600px; border-radius: 10px; box-sizing: border-box; }
.race-level-selector-title { color: #4CAF50; margin-bottom: 30px; font-size: 32px; }
.race-level-selector-desc { color: #ccc; max-width: 600px; margin: 0 auto 40px; font-size: 18px; }
.race-level-options { margin: 0 auto; max-width: 600px; }
.race-level-card { background: rgba(255, 255, 255, 0.05); border: 2px solid; border-radius: 12px; padding: 20px; margin: 15px 0; cursor: pointer; transition: all 0.3s; position: relative; overflow: hidden; opacity: 1; }
.race-level-card-content { display: flex; justify-content: space-between; align-items: center; }
.race-level-card-title { margin: 0 0 10px 0; font-size: 22px; }
.race-level-card-info { color: #aaa; font-size: 14px; }
.race-level-card-progress-wrapper { text-align: right; }
.race-level-card-progress-label { font-size: 14px; color: #aaa; margin-bottom: 5px; }
.race-level-card-progress-value { font-size: 24px; font-weight: bold; }
.race-level-card-progress-bar { margin-top: 15px; height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
.race-level-card-progress-fill { height: 100%; transition: width 0.5s; }
.race-level-card-lock-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.4); z-index: 1; }
.race-level-card-hover-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(76, 175, 80, 0.1); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.race-level-card--selected { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3); }
.race-level-selector-btn { padding: 15px 40px; background: linear-gradient(135deg, #4CAF50, #45a049); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 18px; font-weight: bold; margin-top: 30px; opacity: 0.6; transition: all 0.3s; }
.race-level-selector-btn--enabled { opacity: 1; }

.race-game-loading { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #111; display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 1000; color: white; font-family: Arial, sans-serif; }
.race-game-loading-text { font-size: 28px; margin-bottom: 20px; color: #4CAF50; }
.race-game-loading-status { margin-bottom: 30px; color: #ccc; }
.race-game-loading-bar { width: 300px; height: 4px; background: #333; border-radius: 2px; overflow: hidden; }
.race-game-loading-bar-fill { width: 0%; height: 100%; background: #4CAF50; transition: width 0.3s; }

.race-game-wrapper { width: 100%; height: 600px; }

.race-game-error { width: 100%; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #111; color: white; text-align: center; padding: 40px; }
.race-game-error-title { font-size: 24px; color: #f44336; margin-bottom: 20px; }
.race-game-error-message { color: #ccc; margin-bottom: 30px; max-width: 500px; }
.race-game-error-btn { padding: 12px 24px; background: #4CAF50; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 16px; }

.race-ui { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; z-index: 100; font-family: Arial, sans-serif; }
.race-ui-top { position: absolute; top: 20px; left: 20px; right: 20px; display: flex; justify-content: space-between; align-items: flex-start; }
.race-ui-timer, .race-positions { background: rgba(0, 0, 0, 0.7); color: white; padding: 15px 25px; border-radius: 10px; }
.race-ui-timer { border-left: 4px solid #4CAF50; }
.race-positions { min-width: 180px; border-left: 4px solid #FFD700; }
.race-ui-correct { position: absolute; top: 120px; left: 20px; background: rgba(0, 0, 0, 0.7); color: white; padding: 12px 20px; border-radius: 10px; border-left: 4px solid #2196F3; }
.race-ui-level { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, 0.7); color: white; padding: 10px 25px; border-radius: 10px; border-left: 4px solid #9C27B0; }
.race-ui-label { font-size: 12px; color: #ccc; margin-bottom: 5px; }
.race-timer { font-size: 32px; font-weight: bold; color: #4CAF50; }
.race-position-item { font-size: 16px; margin: 4px 0; color: white; font-weight: normal; }
.race-position-item--player { color: #4CAF50; font-weight: bold; }
.race-position-distance { float: right; color: #ccc; font-size: 14px; }
.race-level-name { font-size: 20px; font-weight: bold; color: #9C27B0; }
.race-correct-count { font-size: 24px; font-weight: bold; color: #4CAF50; }
.race-question-panel { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); width: 90%; max-width: 800px; background: rgba(0, 0, 0, 0.9); color: white; padding: 20px; border-radius: 15px; border: 3px solid #4CAF50; box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5); pointer-events: auto; z-index: 101; }
.race-question-text { font-size: 24px; margin-bottom: 20px; text-align: center; font-weight: bold; color: #4CAF50; min-height: 40px; padding: 10px; }
.race-answers-container { display: flex; justify-content: center; gap: 15px; margin-top: 10px; flex-wrap: wrap; }
.race-answer-btn { padding: 15px 25px; font-size: 18px; background: linear-gradient(135deg, #2c3e50, #34495e); color: white; border: 2px solid #7f8c8d; border-radius: 10px; cursor: pointer; transition: all 0.2s; font-weight: bold; pointer-events: auto; min-width: 150px; flex: 1; max-width: 200px; }
.race-exit-btn { position: absolute; top: 20px; right: 20px; padding: 10px 20px; background: rgba(220, 53, 69, 0.3); color: white; border: 2px solid rgba(220, 53, 69, 0.5); border-radius: 8px; cursor: pointer; font-size: 14px; pointer-events: auto; z-index: 102; }

/* Результаты */
.race-results-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.9); z-index: 200; display: flex; justify-content: center; align-items: center; }
.race-results-modal { background: rgba(0, 0, 0, 0.95); color: white; padding: 25px; border-radius: 12px; border: 3px solid #FFD700; min-width: 350px; max-width: 450px; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7); font-size: 14px; }
.race-results-modal--winner { border-color: #4CAF50; }
.race-results-title { color: #FFD700; margin-top: 0; margin-bottom: 5px; font-size: 24px; }
.race-results-modal--winner .race-results-title { color: #4CAF50; }
.race-results-level { color: #ccc; margin-bottom: 10px; }
.race-results-standings, .race-results-math { margin: 5px 0; }
.race-results-section-title { font-size: 18px; color: #4CAF50; margin-bottom: 5px; }
.race-results-standing-item { display: flex; justify-content: space-between; align-items: center; padding: 10px; background: rgba(255, 255, 255, 0.05); margin: 6px 0; border-radius: 6px; border-left: 3px solid #666; }
.race-results-standing-item--player { background: rgba(76, 175, 80, 0.1); border-left-color: #4CAF50; }
.race-results-standing-place, .race-results-standing-status { font-size: 16px; color: white; }
.race-results-standing-status { color: #ccc; }
.race-results-math { background: rgba(255, 255, 255, 0.05); padding: 15px; border-radius: 8px; }
.race-results-math-stats { display: flex; justify-content: space-around; margin-bottom: 12px; }
.race-results-math-stat { text-align: center; }
.race-results-math-label { font-size: 12px; color: #ccc; }
.race-results-math-value { font-size: 24px; color: #4CAF50; font-weight: bold; }
.race-results-progress { margin-top: 5px; padding-top: 5px; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.race-results-progress-value { font-size: 28px; color: #4CAF50; font-weight: bold; }
.race-results-progress-bar { height: 6px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.race-results-progress-fill { height: 100%; width: 0%; background: #4CAF50; transition: width 1s; }
.race-results-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.race-results-btn { padding: 12px; background: linear-gradient(135deg, #757575, #616161); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: bold; }
.race-results-btn--next { background: linear-gradient(135deg, #4CAF50, #45a049); }
.race-results-btn--retry { background: linear-gradient(135deg, #2196F3, #1976D2); }
.race-results-btn--menu { background: linear-gradient(135deg, #757575, #616161); }

@media (max-width: 1024px) {
    .race-level-selector { padding: 30px 15px; }
    .race-level-selector-title { font-size: 28px; margin-bottom: 25px; }
    .race-level-selector-desc { font-size: 16px; margin: 0 auto 30px; }
    .race-level-card { padding: 15px; margin: 12px 0; }
    .race-level-card-title { font-size: 20px; }
    .race-level-card-info { font-size: 13px; }
    .race-level-card-progress-label { font-size: 13px; margin-bottom: 4px; }
    .race-level-card-progress-value { font-size: 22px; }
    .race-level-card-progress-bar { margin-top: 12px; height: 5px; border-radius: 2.5px; }
    .race-level-selector-btn { padding: 12px 30px; font-size: 16px; margin-top: 25px; }
    .race-game-loading-text { font-size: 24px; margin-bottom: 15px; }
    .race-game-loading-status { margin-bottom: 25px; }
    .race-game-loading-bar { width: 250px; height: 3px; border-radius: 1.5px; }
    .race-game-error { padding: 30px; }
    .race-game-error-title { font-size: 20px; margin-bottom: 15px; }
    .race-game-error-message { margin-bottom: 25px; }
    .race-game-error-btn { padding: 10px 20px; font-size: 14px; }
    .race-ui-top { top: 15px; left: 15px; right: 15px; }
    .race-ui-timer, .race-positions { padding: 12px 20px; border-radius: 8px; }
    .race-positions { min-width: 150px; }
    .race-ui-correct { top: 100px; left: 15px; padding: 10px 15px; border-radius: 8px; }
    .race-ui-level { top: 15px; padding: 8px 20px; border-radius: 8px; }
    .race-ui-label { font-size: 11px; margin-bottom: 4px; }
    .race-timer { font-size: 28px; }
    .race-position-item { font-size: 15px; margin: 3px 0; }
    .race-position-distance { font-size: 13px; }
    .race-level-name { font-size: 18px; }
    .race-correct-count { font-size: 22px; }
    .race-question-panel { bottom: 15px; width: 95%; padding: 15px; border-radius: 12px; }
    .race-question-text { font-size: 22px; margin-bottom: 15px; min-height: 36px; padding: 8px; }
    .race-answers-container { gap: 12px; margin-top: 8px; }
    .race-answer-btn { padding: 12px 20px; font-size: 16px; min-width: 130px; border-radius: 8px; max-width: 180px; }
    .race-exit-btn { top: 15px; right: 15px; padding: 8px 15px; font-size: 13px; border-radius: 6px; }
    .race-results-modal { padding: 20px; border-radius: 10px; min-width: 300px; max-width: 400px; font-size: 13px; }
    .race-results-title { font-size: 22px; }
    .race-results-level { margin-bottom: 15px; }
    .race-results-standings, .race-results-math { margin: 12px 0; }
    .race-results-section-title { font-size: 16px; margin-bottom: 10px; }
    .race-results-standing-item { padding: 8px; margin: 5px 0; border-radius: 5px; }
    .race-results-standing-place, .race-results-standing-status { font-size: 15px; }
    .race-results-math { padding: 12px; border-radius: 6px; }
    .race-results-math-stats { margin-bottom: 10px; }
    .race-results-math-value { font-size: 22px; }
    .race-results-progress { margin-top: 10px; padding-top: 10px; }
    .race-results-progress-value { font-size: 24px; }
    .race-results-progress-bar { height: 5px; border-radius: 2.5px; margin-top: 6px; }
    .race-results-buttons { gap: 6px; margin-top: 15px; }
    .race-results-btn { padding: 10px; border-radius: 6px; font-size: 13px; }
}

@media (max-width: 768px) {
    .race-level-selector { padding: 20px 10px; }
    .race-level-selector-title { font-size: 24px; margin-bottom: 20px; }
    .race-level-selector-desc { font-size: 14px; margin: 0 auto 25px; }
    .race-level-card { padding: 12px; margin: 10px 0; }
    .race-level-card-title { font-size: 18px; }
    .race-level-card-info { font-size: 12px; }
    .race-level-card-progress-label { font-size: 12px; margin-bottom: 3px; }
    .race-level-card-progress-value { font-size: 20px; }
    .race-level-card-progress-bar { margin-top: 10px; height: 4px; border-radius: 2px; }
    .race-level-selector-btn { padding: 10px 20px; font-size: 14px; margin-top: 20px; }
    .race-game-loading-text { font-size: 20px; margin-bottom: 10px; }
    .race-game-loading-status { margin-bottom: 20px; }
    .race-game-loading-bar { width: 200px; height: 2px; border-radius: 1px; }
    .race-game-error { padding: 20px; }
    .race-game-error-title { font-size: 18px; margin-bottom: 10px; }
    .race-game-error-message { margin-bottom: 20px; }
    .race-game-error-btn { padding: 8px 16px; font-size: 12px; }
    .race-ui-top { top: 10px; left: 10px; right: 10px; flex-direction: row; gap: 8px; }
    .race-ui-timer, .race-positions { padding: 5px; border-radius: 6px; min-width: auto; }
    .race-positions { order: 2; min-width: 100px; }
    .race-position-item { font-size: 12px; }
    .race-ui-correct { top: 85px; left: 10px; padding: 5px; border-radius: 6px; }
    .race-ui-level { display: none; top: auto; bottom: calc(100px + 40px + 10px); left: 50%; padding: 6px 15px; border-radius: 6px; }
    .race-ui-label { font-size: 10px; margin-bottom: 3px; }
    .race-timer { font-size: 24px; }
    .race-position-item { font-size: 14px; margin: 2px 0; }
    .race-position-distance { font-size: 12px; }
    .race-level-name { font-size: 16px; }
    .race-correct-count { font-size: 20px; }
    .race-question-panel { bottom: 10px; width: 95%; padding: 12px; border-radius: 10px; }
    .race-question-text { font-size: 20px; margin-bottom: 12px; min-height: 32px; padding: 6px; }
    .race-answers-container { gap: 8px; margin-top: 6px; flex-direction: row; }
    .race-answer-btn { padding: 10px 15px; font-size: 14px; min-width: auto; max-width: none; }
    .race-exit-btn { top: 10px; right: 10px; padding: 4px 8px; font-size: 12px; border-radius: 4px; }
    .race-results-modal { padding: 15px; border-radius: 8px; min-width: 220px; max-width: 95vw; font-size: 12px; }
    .race-results-title { font-size: 20px; }
    .race-results-level { margin-bottom: 12px; }
    .race-results-standings, .race-results-math { margin: 10px 0; }
    .race-results-section-title { font-size: 15px; margin-bottom: 8px; }
    .race-results-standing-item { padding: 6px; margin: 4px 0; border-radius: 4px; }
    .race-results-standing-place, .race-results-standing-status { font-size: 14px; }
    .race-results-math { padding: 10px; border-radius: 4px; }
    .race-results-math-stats { margin-bottom: 8px; }
    .race-results-math-value { font-size: 20px; }
    .race-results-progress { margin-top: 8px; padding-top: 8px; }
    .race-results-progress-value { font-size: 22px; }
    .race-results-progress-bar { height: 4px; border-radius: 2px; margin-top: 4px; }
    .race-results-buttons { gap: 5px; margin-top: 12px; }
    .race-results-btn { padding: 8px; border-radius: 4px; font-size: 12px; }
}

@media (max-width: 768px) and (orientation: landscape) {
    .race-answers-container { flex-direction: row; flex-wrap: wrap; }
    .race-answer-btn { width: auto; flex: 1 1 calc(50% - 4px); min-width: 120px; }
    .race-ui-top { flex-direction: row; justify-content: space-between; }
    .race-positions { order: 0; }
    .race-ui-correct { bottom: auto; top: 90px; left: 10px; }
    .race-ui-level { bottom: auto; top: 10px; left: 50%; }
}