.exercise-page{background:#f8fafc;min-height:100vh}.exercise-header{background:linear-gradient(135deg,#eef2ff,#f0f9ff);padding:35px 20px}.exercise-header-inner{max-width:960px;margin:auto}.exercise-header .back-link{color:#4f46e5;margin-bottom:22px;font-size:14px;font-weight:700;display:inline-block}.exercise-title{align-items:center;gap:18px;display:flex}.exercise-title>span{background:#fff;border-radius:20px;flex-shrink:0;justify-content:center;align-items:center;width:75px;height:75px;font-size:38px;display:flex;box-shadow:0 8px 25px #0f172a12}.exercise-title p{color:#64748b;margin-bottom:2px;font-size:13px}.exercise-title p a{color:#6366f1;font-weight:700}.exercise-title p a:hover{text-decoration:underline}.exercise-title h1{color:#172033;flex-wrap:wrap;align-items:center;gap:10px;font-size:33px;line-height:1.25;display:flex}.ex-solved-badge{color:#15803d;background:#ecfdf5;border:1px solid #bbf7d0;border-radius:20px;padding:5px 11px;font-size:13px;font-weight:700}.exercise-content{max-width:960px;margin:auto;padding:45px 20px 80px}.exercise-panel{background:#fff;border:1px solid #e5e7eb;border-radius:22px;padding:32px;box-shadow:0 12px 35px #0f172a0f}.ex-meta{flex-wrap:wrap;align-items:center;gap:9px;margin-bottom:20px;display:flex}.ex-difficulty,.ex-points,.ex-total-xp{border-radius:20px;padding:6px 12px;font-size:12px;font-weight:700}.ex-difficulty.easy{color:#15803d;background:#ecfdf5}.ex-difficulty.medium{color:#c2410c;background:#fff7ed}.ex-difficulty.hard{color:#b91c1c;background:#fef2f2}.ex-points{color:#c2410c;background:#fff7ed}.ex-total-xp{color:#4f46e5;background:#eef2ff;margin-left:auto}.ex-task{background:#f8fafc;border:1px solid #e2e8f0;border-radius:16px;margin-bottom:24px;padding:20px 22px}.ex-task h2{color:#1e293b;margin-bottom:6px;font-size:19px}.ex-task p{color:#475569;white-space:pre-line;font-size:16px;line-height:1.75}.ex-turtle-note{color:#166534;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:16px;gap:16px;margin-bottom:24px;padding:20px;display:flex}.ex-turtle-icon{font-size:40px;line-height:1}.ex-turtle-note p{margin:6px 0 14px;font-size:14px;line-height:1.7}.ex-editor{background:#111827;border:2px solid #0000;border-radius:15px;margin-bottom:18px;transition:border-color .2s;overflow:hidden}.ex-editor:focus-within{border-color:#818cf8}.ex-editor-header{color:#cbd5e1;background:#1f2937;justify-content:space-between;align-items:center;gap:10px;padding:11px 16px;font-size:13px;font-weight:700;display:flex}.ex-editor-tip{color:#64748b;font-size:11px;font-weight:600}.ex-editor-body{display:flex}.ex-gutter,.ex-textarea{padding-top:18px;padding-bottom:18px;font-family:Consolas,Courier New,monospace;font-size:15px;line-height:1.7}.ex-gutter{text-align:right;color:#4b5563;-webkit-user-select:none;user-select:none;white-space:pre;background:#0f172a;flex-shrink:0;min-width:46px;padding-left:12px;padding-right:10px;overflow:hidden}.ex-textarea{resize:vertical;color:#e2e8f0;caret-color:#facc15;tab-size:4;white-space:pre;background:0 0;border:none;outline:none;flex:1;min-width:0;min-height:200px;padding-left:16px;padding-right:16px;overflow:auto}.ex-textarea::selection{color:#fff;background:#4f46e5}.ex-input{margin-bottom:18px}.ex-input label{color:#334155;margin-bottom:7px;font-size:14px;font-weight:700;display:block}.ex-input label span{color:#94a3b8;font-size:12px;font-weight:600}.ex-input textarea{color:#1e293b;resize:vertical;background:#f8fafc;border:1px solid #cbd5e1;border-radius:12px;outline:none;width:100%;padding:12px 14px;font-family:Consolas,Courier New,monospace;font-size:14px}.ex-input textarea:focus{background:#fff;border-color:#818cf8}.ex-actions{flex-wrap:wrap;gap:10px;margin-bottom:20px;display:flex}.ex-btn{border-radius:10px;justify-content:center;align-items:center;gap:5px;padding:11px 17px;font-size:14px;font-weight:700;transition:all .2s;display:inline-flex}.ex-btn:hover:not(:disabled){transform:translateY(-2px)}.ex-btn:disabled{opacity:.45;cursor:not-allowed}.ex-btn.run{color:#fff;background:#16a34a}.ex-btn.run:hover:not(:disabled){background:#15803d}.ex-btn.primary{color:#fff;background:#4f46e5}.ex-btn.primary:hover:not(:disabled){background:#4338ca}.ex-btn.success{color:#fff;background:#16a34a}.ex-btn.success:hover:not(:disabled){background:#15803d}.ex-btn.hint{color:#854d0e;background:#fef9c3}.ex-btn.hint:hover,.ex-btn.hint.active{background:#fde68a}.ex-btn.secondary{color:#475569;background:#f1f5f9}.ex-btn.secondary:hover:not(:disabled),.ex-btn.secondary.active{background:#e2e8f0}.ex-btn.ghost{color:#64748b;background:#fff;border:1px solid #e2e8f0}.ex-btn.ghost:hover:not(:disabled){color:#4f46e5;border-color:#a5b4fc}.ex-hint{color:#854d0e;background:#fefce8;border:1px solid #fde68a;border-radius:13px;margin-bottom:18px;padding:15px 18px;font-size:15px;line-height:1.7;animation:.3s exPop}.ex-answer{background:#111827;border-radius:15px;margin-bottom:18px;animation:.3s exPop;overflow:hidden}.ex-answer-header{color:#cbd5e1;background:#1f2937;justify-content:space-between;align-items:center;padding:10px 16px;font-size:13px;font-weight:700;display:flex}.ex-answer-header button{color:#e5e7eb;background:#374151;border-radius:8px;padding:6px 11px;font-size:12px;font-weight:700}.ex-answer-header button:hover{background:#4f46e5}.ex-answer pre{color:#e2e8f0;padding:18px 20px;font-family:Consolas,Courier New,monospace;font-size:15px;line-height:1.7;overflow-x:auto}.ex-answer p{color:#94a3b8;padding:0 20px 14px;font-size:12px}.ex-output{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:15px;margin-bottom:20px;overflow:hidden}.ex-output-header{color:#334155;background:#e2e8f0;padding:10px 15px;font-size:12px;font-weight:700}.ex-output-body{min-height:70px;max-height:360px;padding:16px 18px;overflow:auto}.ex-output-text{color:#1e293b;white-space:pre-wrap;word-break:break-word;font-family:Consolas,Courier New,monospace;font-size:14px;line-height:1.6}.ex-output-placeholder{color:#94a3b8;font-size:14px;font-style:italic}.ex-output-status{color:#4f46e5;align-items:center;gap:10px;font-size:14px;font-weight:700;display:flex}.ex-snake{font-size:22px;animation:.8s ease-in-out infinite exWiggle;display:inline-block}@keyframes exWiggle{0%,to{transform:rotate(-12deg)translate(0)}50%{transform:rotate(12deg)translate(4px)}}.ex-spinner{border:3px solid #c7d2fe;border-top-color:#4f46e5;border-radius:50%;width:18px;height:18px;animation:.8s linear infinite exSpin}@keyframes exSpin{to{transform:rotate(360deg)}}.ex-error{color:#b91c1c;background:#fef2f2;border:1px solid #fecaca;border-radius:11px;margin-top:12px;padding:13px 15px;font-size:14px}.ex-error:first-child{margin-top:0}.ex-error strong{word-break:break-word;font-family:Consolas,Courier New,monospace;display:block}.ex-error p{color:#7f1d1d;margin-top:6px;line-height:1.6}.ex-notice{color:#1d4ed8;background:#eff6ff;border-top:1px solid #dbeafe;padding:11px 16px;font-size:13px;font-weight:600}.ex-success{text-align:center;color:#15803d;background:linear-gradient(135deg,#ecfdf5,#f0f9ff);border:1px solid #bbf7d0;border-radius:16px;padding:26px 20px;animation:.4s exPop;position:relative;overflow:hidden}.ex-success-title{margin-bottom:4px;font-size:24px;font-weight:800;animation:.8s 2 exBounce}.ex-success p{color:#166534;margin-bottom:15px;font-weight:600}.ex-confetti{pointer-events:none;position:absolute;inset:0}.ex-confetti span{top:-30px;left:calc(8% + var(--i) * 12%);animation:1.8s ease-in forwards exConfetti;animation-delay:calc(var(--i) * 90ms);opacity:0;font-size:22px;position:absolute}@keyframes exConfetti{0%{opacity:1;transform:translateY(0)rotate(0)}to{opacity:0;transform:translateY(220px)rotate(300deg)}}@keyframes exBounce{0%,to{transform:scale(1)}50%{transform:scale(1.08)}}@keyframes exPop{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.ex-fail{color:#c2410c;background:#fff7ed;border:1px solid #fed7aa;border-radius:14px;padding:16px 18px;animation:.3s exPop}.ex-compare p{color:#9a3412;margin:6px 0 10px;font-size:14px}.ex-compare-grid{grid-template-columns:1fr 1fr;gap:12px;display:grid}.ex-compare-grid>div{background:#fff;border:1px solid #fed7aa;border-radius:11px;overflow:hidden}.ex-compare-grid span{background:#ffedd5;padding:6px 12px;font-size:12px;font-weight:700;display:block}.ex-compare-grid pre{color:#1e293b;white-space:pre-wrap;word-break:break-word;padding:10px 12px;font-family:Consolas,Courier New,monospace;font-size:13px}.ex-compare-tip{margin-bottom:0!important;font-size:13px!important}.ex-nav{grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-top:25px;display:grid}.ex-nav>:first-child{justify-self:start}.ex-nav>:last-child{justify-self:end}.ex-nav .ex-btn{text-overflow:ellipsis;white-space:nowrap;max-width:100%;overflow:hidden}.exercise-not-found{text-align:center;padding:50px 30px}.exercise-not-found-icon{margin-bottom:8px;font-size:56px}.exercise-not-found h2{color:#1e293b;margin-bottom:8px}.exercise-not-found p{color:#64748b;margin-bottom:22px}@media (width<=700px){.exercise-header{padding:25px 18px}.exercise-title{gap:12px}.exercise-title>span{width:60px;height:60px;font-size:30px}.exercise-title h1{font-size:24px}.exercise-panel{padding:20px}.ex-total-xp{margin-left:0}.ex-editor-tip{display:none}.ex-gutter,.ex-textarea{font-size:14px}.ex-actions .ex-btn{flex:calc(50% - 10px)}.ex-compare-grid,.ex-nav{grid-template-columns:1fr}.ex-nav>*{justify-self:stretch!important}.ex-nav>span:empty{display:none}}
