#game-root{font-family:Segoe UI,system-ui,-apple-system,sans-serif;max-width:800px;margin:0 auto;padding:8px;-moz-user-select:none;user-select:none;-webkit-user-select:none;min-height:80vh}.fm-welcome{text-align:center;padding:24px 16px}.fm-welcome-icon{font-size:64px;margin-bottom:12px;animation:fm-bounce 2s ease infinite}@keyframes fm-bounce{0%,to{transform:translateY(0)}50%{transform:translateY(-10px)}}.fm-welcome h1{font-size:28px;font-weight:800;background:linear-gradient(135deg,#6366f1,#a855f7,#ec4899);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin:0 0 8px}.fm-welcome p{color:#64748b;font-size:15px;margin:0 0 24px;line-height:1.5}.fm-level-map{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;margin-bottom:24px}.fm-level-card{background:#f8fafc;border:2px solid #e2e8f0;border-radius:16px;padding:16px;width:140px;text-align:center;cursor:pointer;transition:all .25s ease;position:relative}.fm-level-card:hover:not(.fm-locked){transform:translateY(-4px);box-shadow:0 8px 25px #6366f133;border-color:#818cf8}.fm-level-card.fm-locked{opacity:.5;cursor:not-allowed;filter:grayscale(.5)}.fm-level-card.fm-completed{border-color:#22c55e;background:#f0fdf4}.fm-level-card.fm-current{border-color:#6366f1;background:#eef2ff;box-shadow:0 0 0 3px #6366f126}.fm-level-icon{font-size:32px;margin-bottom:6px}.fm-level-name{font-size:13px;font-weight:700;color:#334155;margin-bottom:4px}.fm-level-stars{font-size:16px;letter-spacing:2px}.fm-lock-icon{position:absolute;top:8px;right:8px;font-size:14px}.fm-btn{display:inline-flex;align-items:center;gap:8px;padding:12px 32px;border:none;border-radius:12px;font-size:16px;font-weight:700;cursor:pointer;transition:all .2s ease;text-decoration:none}.fm-btn:active{transform:scale(.96)}.fm-btn-primary{background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;box-shadow:0 4px 15px #6366f159}.fm-btn-primary:hover{box-shadow:0 6px 20px #6366f173;transform:translateY(-1px)}.fm-btn-success{background:linear-gradient(135deg,#22c55e,#16a34a);color:#fff;box-shadow:0 4px 15px #22c55e59}.fm-btn-secondary{background:#f1f5f9;color:#475569;border:2px solid #e2e8f0;box-shadow:none}.fm-btn-secondary:hover{background:#e2e8f0}.fm-btn-small{padding:8px 20px;font-size:14px}.fm-game-header{display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:linear-gradient(135deg,#6366f1,#8b5cf6);border-radius:16px;margin-bottom:16px;color:#fff;flex-wrap:wrap;gap:8px}.fm-game-header-left{display:flex;align-items:center;gap:10px}.fm-game-header h2{font-size:16px;font-weight:700;margin:0}.fm-game-header .fm-level-badge{background:#fff3;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:600}.fm-game-header-right{display:flex;align-items:center;gap:16px;font-size:14px;font-weight:600}.fm-score-display{display:flex;align-items:center;gap:4px}.fm-hint-btn{background:#fff3;border:1px solid rgba(255,255,255,.3);color:#fff;padding:4px 12px;border-radius:8px;font-size:13px;cursor:pointer;transition:background .2s}.fm-hint-btn:hover{background:#ffffff59}.fm-hint-btn:disabled{opacity:.4;cursor:not-allowed}.fm-instruction{background:#fefce8;border:1px solid #fde047;border-radius:12px;padding:12px 16px;margin-bottom:16px;display:flex;align-items:flex-start;gap:10px;font-size:14px;color:#854d0e;line-height:1.5}.fm-instruction-icon{font-size:20px;flex-shrink:0}.fm-hint-banner{background:#eff6ff;border:1px solid #93c5fd;border-radius:12px;padding:10px 16px;margin-bottom:12px;font-size:13px;color:#1e40af;display:flex;align-items:center;gap:8px;animation:fm-fadeIn .3s ease}.fm-target{text-align:center;margin-bottom:16px}.fm-target-label{font-size:13px;color:#64748b;margin-bottom:4px;font-weight:600;text-transform:uppercase;letter-spacing:1px}.fm-target-number{display:inline-flex;align-items:center;justify-content:center;min-width:80px;height:60px;background:linear-gradient(135deg,#6366f1,#8b5cf6);color:#fff;font-size:32px;font-weight:800;border-radius:16px;box-shadow:0 4px 15px #6366f14d;padding:0 20px}.fm-target-pair{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.fm-target-and{font-size:18px;font-weight:700;color:#94a3b8}.fm-number-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:8px;margin-bottom:16px;max-width:600px;margin-left:auto;margin-right:auto}.fm-grid-cell{display:flex;align-items:center;justify-content:center;height:50px;background:#f8fafc;border:2px solid #e2e8f0;border-radius:10px;font-size:18px;font-weight:700;color:#334155;cursor:pointer;transition:all .2s ease;position:relative}.fm-grid-cell:hover{border-color:#818cf8;background:#eef2ff;transform:scale(1.05)}.fm-grid-cell.fm-selected{background:#6366f1;border-color:#6366f1;color:#fff;box-shadow:0 2px 8px #6366f159}.fm-grid-cell.fm-correct{background:#22c55e;border-color:#22c55e;color:#fff;animation:fm-pop .4s ease}.fm-grid-cell.fm-wrong{background:#ef4444;border-color:#ef4444;color:#fff;animation:fm-shake .5s ease}.fm-grid-cell.fm-missed{background:#fbbf24;border-color:#fbbf24;color:#fff}.fm-grid-cell.fm-disabled{pointer-events:none;opacity:.6}@keyframes fm-pop{0%{transform:scale(1)}50%{transform:scale(1.2)}to{transform:scale(1)}}@keyframes fm-shake{0%,to{transform:translate(0)}20%{transform:translate(-6px)}40%{transform:translate(6px)}60%{transform:translate(-4px)}80%{transform:translate(4px)}}@keyframes fm-fadeIn{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.fm-submit-bar{display:flex;align-items:center;justify-content:center;gap:12px;flex-wrap:wrap;margin:16px 0}.fm-selected-count{font-size:13px;color:#64748b;font-weight:600}.fm-round-result{text-align:center;padding:20px;border-radius:16px;margin:16px 0;animation:fm-fadeIn .4s ease}.fm-round-result.fm-perfect{background:linear-gradient(135deg,#f0fdf4,#dcfce7);border:2px solid #86efac}.fm-round-result.fm-good{background:linear-gradient(135deg,#eff6ff,#dbeafe);border:2px solid #93c5fd}.fm-round-result.fm-needs-work{background:linear-gradient(135deg,#fefce8,#fef9c3);border:2px solid #fde047}.fm-round-result h3{font-size:20px;margin:0 0 6px}.fm-round-result p{font-size:14px;color:#475569;margin:0}.fm-result-icon{font-size:40px;margin-bottom:8px}.fm-progress-bar-container{background:#e2e8f0;border-radius:10px;height:8px;margin-bottom:16px;overflow:hidden}.fm-progress-bar{height:100%;background:linear-gradient(90deg,#6366f1,#a855f7);border-radius:10px;transition:width .5s ease}.fm-progress-text{text-align:center;font-size:12px;color:#94a3b8;margin-bottom:4px;font-weight:600}.fm-level-complete{text-align:center;padding:32px 16px;animation:fm-fadeIn .5s ease}.fm-level-complete-icon{font-size:56px;margin-bottom:12px}.fm-level-complete h2{font-size:24px;font-weight:800;color:#1e293b;margin:0 0 4px}.fm-level-complete .fm-stars-big{font-size:40px;letter-spacing:6px;margin:12px 0}.fm-level-complete .fm-score-big{font-size:14px;color:#64748b;margin-bottom:20px}.fm-level-complete-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}.fm-tree-container{display:flex;flex-direction:column;align-items:center;gap:0;margin-bottom:16px;position:relative;min-height:200px}.fm-tree-row{display:flex;align-items:center;justify-content:center;gap:24px;margin:4px 0;position:relative}.fm-tree-node{display:flex;align-items:center;justify-content:center;width:52px;height:52px;border-radius:50%;font-size:18px;font-weight:700;border:3px solid #e2e8f0;background:#f8fafc;color:#334155;position:relative;z-index:2}.fm-tree-node.fm-prime{background:#22c55e;border-color:#16a34a;color:#fff;box-shadow:0 2px 8px #22c55e4d}.fm-tree-node.fm-composite{background:#6366f1;border-color:#4f46e5;color:#fff;cursor:pointer;box-shadow:0 2px 8px #6366f14d}.fm-tree-node.fm-composite:hover{transform:scale(1.1);box-shadow:0 4px 12px #6366f173}.fm-tree-node.fm-root-node{width:64px;height:64px;font-size:22px;background:linear-gradient(135deg,#6366f1,#8b5cf6);border-color:#4f46e5;color:#fff}.fm-tree-node.fm-splitting{animation:fm-pop .4s ease}.fm-tree-arrow{color:#94a3b8;font-size:18px;text-align:center;margin:2px 0}.fm-tree-connector{width:2px;height:16px;background:#cbd5e1;margin:0 auto}.fm-tree-branch{display:flex;align-items:flex-start;justify-content:center;gap:12px}.fm-tree-branch-line{position:relative}.fm-modal-overlay{position:fixed;top:0;right:0;bottom:0;left:0;background:#0006;display:flex;align-items:center;justify-content:center;z-index:1000;animation:fm-fadeIn .2s ease;padding:16px}.fm-modal{background:#fff;border-radius:20px;padding:24px;max-width:340px;width:100%;text-align:center;box-shadow:0 20px 60px #0003}.fm-modal h3{font-size:18px;color:#1e293b;margin:0 0 4px}.fm-modal p{font-size:13px;color:#64748b;margin:0 0 16px}.fm-modal-inputs{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:16px}.fm-modal-inputs input{width:70px;height:46px;text-align:center;font-size:20px;font-weight:700;border:2px solid #e2e8f0;border-radius:10px;outline:none;color:#334155}.fm-modal-inputs input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f126}.fm-modal-inputs .fm-times{font-size:20px;font-weight:700;color:#94a3b8}.fm-modal-error{color:#ef4444;font-size:12px;margin-bottom:8px;min-height:18px}.fm-modal-actions{display:flex;gap:8px;justify-content:center}.fm-answer-section{text-align:center;margin:16px 0}.fm-answer-row{display:flex;align-items:center;justify-content:center;gap:10px;margin-bottom:12px;flex-wrap:wrap}.fm-answer-label{font-size:16px;font-weight:700;color:#334155;min-width:50px}.fm-answer-input{width:100px;height:44px;text-align:center;font-size:20px;font-weight:700;border:2px solid #e2e8f0;border-radius:10px;outline:none;color:#334155}.fm-answer-input:focus{border-color:#6366f1;box-shadow:0 0 0 3px #6366f126}.fm-answer-input.fm-input-correct{border-color:#22c55e;background:#f0fdf4}.fm-answer-input.fm-input-wrong{border-color:#ef4444;background:#fef2f2}.fm-answer-feedback{font-size:13px;margin-top:2px;min-height:20px;font-weight:600}.fm-timer{display:flex;align-items:center;gap:4px}.fm-timer.fm-timer-warning{color:#fbbf24}.fm-timer.fm-timer-danger{color:#ef4444;animation:fm-pulse 1s ease infinite}@keyframes fm-pulse{0%,to{opacity:1}50%{opacity:.5}}.fm-game-over{text-align:center;padding:32px 16px;animation:fm-fadeIn .5s ease}.fm-game-over h1{font-size:28px;font-weight:800;background:linear-gradient(135deg,#22c55e,#16a34a);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;margin:12px 0 8px}.fm-game-over .fm-trophy{font-size:64px}.fm-final-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;max-width:400px;margin:20px auto}.fm-stat-card{background:#f8fafc;border:1px solid #e2e8f0;border-radius:12px;padding:12px 8px;text-align:center}.fm-stat-value{font-size:24px;font-weight:800;color:#6366f1}.fm-stat-label{font-size:11px;color:#94a3b8;font-weight:600;text-transform:uppercase;letter-spacing:.5px}.fm-all-levels-stars{display:flex;justify-content:center;gap:16px;margin:16px 0;flex-wrap:wrap}.fm-level-star-item{text-align:center}.fm-level-star-label{font-size:11px;color:#94a3b8;font-weight:600}.fm-level-star-stars{font-size:18px;letter-spacing:1px}.fm-venn-container{display:flex;flex-direction:column;align-items:center;margin-bottom:16px;gap:16px}.fm-venn-svg{max-width:420px;width:100%;height:auto}.fm-number-bank{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;padding:12px;background:#f8fafc;border:2px dashed #cbd5e1;border-radius:12px;min-height:50px;max-width:500px;width:100%}.fm-bank-label{font-size:12px;font-weight:700;color:#94a3b8;text-transform:uppercase;letter-spacing:1px;width:100%;text-align:center;margin-bottom:4px}.fm-draggable{display:flex;align-items:center;justify-content:center;width:44px;height:44px;background:#fff;border:2px solid #6366f1;border-radius:10px;font-size:16px;font-weight:700;color:#6366f1;cursor:pointer;transition:all .2s ease}.fm-draggable:hover{background:#6366f1;color:#fff;transform:scale(1.08)}.fm-draggable.fm-placed{opacity:.3;pointer-events:none}.fm-drop-zones{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-bottom:12px}.fm-drop-zone{min-width:110px;min-height:80px;border:2px dashed #cbd5e1;border-radius:12px;padding:8px;display:flex;flex-direction:column;align-items:center;gap:4px;transition:all .2s ease;flex:1;max-width:180px}.fm-drop-zone.fm-zone-active{border-color:#6366f1;background:#eef2ff}.fm-drop-zone-label{font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.5px;margin-bottom:4px}.fm-zone-items{display:flex;flex-wrap:wrap;gap:4px;justify-content:center}.fm-zone-chip{background:#6366f1;color:#fff;width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:8px;font-size:14px;font-weight:700;cursor:pointer;transition:all .2s ease}.fm-zone-chip:hover{background:#ef4444;transform:scale(1.1)}:root.dark #game-root,.dark #game-root{color:#e2e8f0}.dark .fm-level-card{background:#1e293b;border-color:#334155}.dark .fm-level-card.fm-completed{border-color:#22c55e;background:#14532d}.dark .fm-level-card.fm-current{border-color:#818cf8;background:#312e81}.dark .fm-level-name{color:#e2e8f0}.dark .fm-grid-cell{background:#1e293b;border-color:#334155;color:#e2e8f0}.dark .fm-grid-cell:hover{border-color:#818cf8;background:#312e81}.dark .fm-instruction{background:#422006;border-color:#854d0e;color:#fde047}.dark .fm-modal{background:#1e293b}.dark .fm-modal h3{color:#e2e8f0}.dark .fm-modal-inputs input{background:#0f172a;border-color:#334155;color:#e2e8f0}.dark .fm-tree-node{border-color:#475569;background:#1e293b;color:#e2e8f0}.dark .fm-number-bank{background:#1e293b;border-color:#475569}.dark .fm-drop-zone{border-color:#475569}.dark .fm-stat-card{background:#1e293b;border-color:#334155}.dark .fm-answer-input{background:#0f172a;border-color:#334155;color:#e2e8f0}.dark .fm-draggable{background:#1e293b}.dark .fm-hint-banner{background:#1e3a5f;border-color:#2563eb;color:#93c5fd}@media (max-width: 480px){.fm-welcome h1{font-size:22px}.fm-level-card{width:120px;padding:12px}.fm-level-icon{font-size:26px}.fm-number-grid{grid-template-columns:repeat(auto-fill,minmax(48px,1fr));gap:6px}.fm-grid-cell{height:44px;font-size:16px}.fm-game-header h2{font-size:14px}.fm-target-number{font-size:26px;height:50px}.fm-tree-node{width:42px;height:42px;font-size:15px}.fm-tree-node.fm-root-node{width:52px;height:52px;font-size:18px}.fm-final-stats{grid-template-columns:repeat(3,1fr);gap:8px}}
