:root{font-family:Inter,Noto Sans TC,Microsoft JhengHei,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#12313d;background:#e6fbff;--ink: #12313d;--muted: #5d7280;--teal: #0f9f9b;--teal-deep: #087a79;--mint: #dffbf1;--sky: #dff5ff;--sun: #ffd45a;--coral: #ff7b67;--coral-deep: #e95f4d;--leaf: #55b867;--line: #bde7ed;--surface: #ffffff;--surface-soft: #f4fdff;--shadow: 0 14px 34px rgba(12, 83, 96, .14);font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0;min-width:1120px}button,textarea,select{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;background:repeating-linear-gradient(135deg,rgba(15,159,155,.08) 0 1px,transparent 1px 22px),linear-gradient(180deg,#e4fbff,#f8feff 52%,#f2fff7)}.app-header{position:relative;overflow:hidden;display:flex;align-items:center;justify-content:space-between;gap:24px;min-height:94px;padding:16px 30px 14px;border-bottom:3px solid rgba(255,212,90,.9);background:linear-gradient(135deg,rgba(255,255,255,.16) 0 18%,transparent 18% 100%),linear-gradient(115deg,#0499a5,#16c5b2 48%,#ffd45a);box-shadow:0 8px 24px #0c53602e}.app-header:after{position:absolute;right:0;bottom:-10px;left:0;height:34px;content:"";background:radial-gradient(34px 16px at 34px 0,rgba(255,255,255,.62) 49%,transparent 52%) 0 0 / 68px 34px repeat-x;opacity:.72;pointer-events:none}.brand-lockup{position:relative;z-index:1;display:flex;align-items:center;gap:14px;min-width:0}.brand-text{min-width:0}.brand-text span{display:inline-flex;align-items:center;margin-top:5px;border:1px solid rgba(255,255,255,.48);border-radius:999px;background:#fff3;color:#f7fffb;padding:4px 10px;font-size:13px;font-weight:900;letter-spacing:0}.app-header h1{margin:0;color:#fff;font-size:26px;line-height:1.2;text-shadow:0 2px 10px rgba(4,82,91,.28)}.guishan-logo{flex:0 0 auto;width:78px;height:58px;filter:drop-shadow(0 8px 12px rgba(5,93,102,.22));animation:islandFloat 4s ease-in-out infinite}.logo-sun{fill:#ffcf4f}.logo-ray{fill:none;stroke:#fff4a2;stroke-linecap:round;stroke-width:3}.logo-wave,.logo-wave-soft{fill:none;stroke:#f2ffff;stroke-linecap:round;stroke-width:4}.logo-wave-soft{opacity:.74;stroke-width:3}.logo-island{fill:#55b867}.logo-shell{fill:#2b985e;opacity:.8}.logo-eye{fill:#12313d}.logo-smile,.logo-cheek{fill:none;stroke:#12313d;stroke-linecap:round;stroke-width:2.6}.header-actions{position:relative;z-index:1;display:flex;align-items:center;gap:12px}.user-chip{display:flex;align-items:center;gap:10px;border:1px solid rgba(255,255,255,.72);border-radius:999px;background:#ffffffe0;padding:5px 6px 5px 10px;font-size:14px;font-weight:700;color:var(--ink);box-shadow:0 8px 20px #087a792e}.user-chip img{width:28px;height:28px;border-radius:50%}.primary-button,.ghost-button,.icon-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:8px;min-height:38px;padding:0 14px;font-weight:800;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease}.primary-button{background:linear-gradient(135deg,var(--teal) 0%,var(--teal-deep) 100%);color:#fff;box-shadow:0 8px 18px #0f9f9b3d}.primary-button:hover{background:linear-gradient(135deg,#12b7b1,#08706e);transform:translateY(-1px)}.primary-button:disabled{cursor:not-allowed;background:#9db5b2}.primary-button.wide,.ghost-button.wide{width:100%}.ghost-button{border:1px solid var(--line);background:#fff;color:#28515b}.ghost-button:hover{background:var(--sky);border-color:#8fd4df}.icon-button{width:32px;min-height:32px;padding:0;color:#51647c;background:transparent}.icon-button:hover{background:#dff5ff}.workspace-layout{display:grid;grid-template-columns:190px minmax(620px,1fr) 430px;gap:12px;height:calc(100vh - 118px);padding:12px 28px 22px}.workspace-layout.admin-maximized{grid-template-columns:minmax(0,1fr)}.workspace-layout.admin-maximized .problem-rail,.workspace-layout.admin-maximized .editor-panel{display:none}.workspace-layout.admin-maximized .side-panel{grid-template-columns:64px minmax(0,1fr);min-width:0}.workspace-layout.admin-maximized .tab-content{background:#f8fafc}.workspace-layout.admin-maximized .panel-stack{padding:20px}.workspace-layout.admin-maximized .admin-section{max-width:none}.problem-rail,.editor-panel,.side-panel{min-height:0;border:1px solid var(--line);border-radius:10px;background:#fffffff0;box-shadow:var(--shadow)}.problem-rail{display:flex;flex-direction:column;gap:8px;padding:12px;overflow-y:auto}.rail-title{border:0;border-radius:9px;background:linear-gradient(135deg,var(--coral) 0%,#ff9f64 100%);color:#fff;min-height:42px;font-weight:900;box-shadow:0 8px 18px #ff7b6738}.rail-filters{display:flex;flex-direction:column;gap:8px;border:1px solid #bfe9d8;border-radius:9px;background:linear-gradient(180deg,#fff,#effff8);padding:10px}.rail-filters label{display:flex;flex-direction:column;gap:4px;color:var(--teal-deep);font-size:12px;font-weight:900}.rail-filters select{width:100%;border:1px solid #a9dce4;border-radius:8px;background:#fff;color:var(--ink);min-height:34px;padding:0 8px;font-weight:800}.rail-filters span{color:var(--coral-deep);font-size:12px;font-weight:900}.problem-item{display:flex;flex-direction:column;align-items:flex-start;gap:4px;border:1px solid #cce9ef;border-radius:9px;background:#fff;color:var(--ink);padding:12px;text-align:left;box-shadow:0 4px 12px #0f9f9b0f;transition:background .16s ease,border-color .16s ease,transform .16s ease,box-shadow .16s ease}.problem-item:hover{border-color:#92dbe5;background:#f4fdff;transform:translateY(-1px)}.problem-item span{font-weight:900}.problem-item-title{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}.problem-item small{color:var(--muted);font-size:12px;line-height:1.5}.problem-item.active{border-color:var(--teal);background:linear-gradient(135deg,#e7fffa,#fff8d8);color:var(--teal-deep);box-shadow:0 8px 18px #0f9f9b24}.editor-panel{display:flex;flex-direction:column;overflow:hidden}.editor-toolbar{display:grid;grid-template-columns:1fr auto auto;align-items:center;gap:12px;border-bottom:1px solid var(--line);background:linear-gradient(90deg,#fff,#f1fffb 55%,#fff9e6);padding:10px 12px;min-height:58px}.editor-toolbar>div:first-child{display:flex;flex-direction:column;gap:2px}.editor-toolbar strong{font-size:17px;color:var(--ink)}.editor-toolbar span{display:flex;align-items:center;flex-wrap:wrap;gap:6px;color:var(--muted);font-size:13px}.segmented{display:flex;border:1px solid #9fdbe3;border-radius:9px;overflow:hidden;background:#fff}.segmented button{border:0;min-height:36px;padding:0 13px;background:#fff;color:#3d6370;font-weight:800}.segmented button.selected{background:linear-gradient(135deg,var(--teal) 0%,var(--teal-deep) 100%);color:#fff}.toolbar-actions{display:flex;align-items:center;gap:8px}.hidden-file-input{display:none}.blockly-host{flex:1;min-height:0}.blockly-host .blocklyToolboxDiv{background:linear-gradient(180deg,#fff,#edfaff)}.side-panel{display:grid;grid-template-columns:52px 1fr;overflow:hidden}.vertical-tabs{display:flex;flex-direction:column;border-right:1px solid var(--line);background:linear-gradient(180deg,#f8feff,#e9fbff)}.vertical-tabs button{display:flex;writing-mode:vertical-rl;text-orientation:mixed;align-items:center;justify-content:center;gap:8px;border:0;border-bottom:1px solid #cdebf0;background:transparent;color:#3d6370;min-height:112px;padding:10px 0;font-size:15px;font-weight:900}.vertical-tabs button svg{transform:rotate(90deg)}.vertical-tabs button.active{background:linear-gradient(180deg,var(--teal) 0%,var(--teal-deep) 100%);color:#fff}.vertical-tabs button:hover:not(.active){background:#fff8dd;color:var(--coral-deep)}.tab-content{min-width:0;min-height:0;overflow:hidden}.panel-scroll,.panel-stack{height:100%;overflow-y:auto;padding:16px}.panel-stack{display:flex;flex-direction:column;gap:14px}.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:14px}.panel-heading.compact-heading{margin:6px 0 0;padding-top:10px;border-top:1px solid #e2e8f0}.panel-heading h2{margin:0;font-size:22px;line-height:1.25}.panel-heading span{border-radius:999px;background:#fff2c4;color:#7b5600;padding:6px 10px;font-size:12px;font-weight:900;white-space:nowrap}.statement-text{color:#2c4650;line-height:1.7}.info-block{border-top:1px solid #e2e8f0;padding:12px 0}.info-block span,.example-box span,.output-box span{color:var(--teal-deep);font-size:13px;font-weight:900}.info-block p{margin:7px 0 0;color:#2c4650;line-height:1.6}.metric-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0}.practice-summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.metric{border:1px solid #cfe9ef;border-radius:9px;padding:12px;background:linear-gradient(180deg,#fff,#f3fdff)}.metric span{display:block;color:var(--muted);font-size:12px;font-weight:800}.metric strong{display:block;margin-top:5px;font-size:20px}.example-box,.output-box,.score-card,.history-row,.leader-row,.case-row,.practice-row{border:1px solid #cfe9ef;border-radius:9px;background:#fff}.practice-status-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-height:24px;border-radius:999px;padding:0 9px;font-size:12px;font-weight:900;line-height:1}.practice-status-badge.compact{min-height:22px;padding:0 8px;font-size:11px}.practice-status-badge.completed{border:1px solid #83dfc7;background:#e6fff8;color:var(--teal-deep)}.practice-status-badge.in-progress{border:1px solid #ffd45a;background:#fff8d8;color:#8a5a00}.practice-status-badge.not-started{border:1px solid #bddfe6;background:#f4fdff;color:var(--muted)}.practice-list{display:flex;flex-direction:column;gap:8px;max-height:310px;overflow-y:auto;padding-right:2px}.practice-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px;color:#172033;text-align:left}.practice-row.active{border-color:var(--teal);background:linear-gradient(135deg,#e7fffa,#fff9df)}.practice-row span{min-width:0}.practice-row strong,.practice-row small{display:block}.practice-row strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.practice-row small,.practice-row-meta small{color:var(--muted);font-size:12px;font-weight:700}.practice-row-meta{display:flex;flex-direction:column;align-items:flex-end;gap:5px;min-width:92px}.example-box{display:flex;flex-direction:column;gap:7px;margin-bottom:12px;padding:12px}pre{margin:0;border-radius:9px;background:#12313d;color:#f7fffb;padding:10px;overflow-x:auto;white-space:pre-wrap}.code-input,.json-input{width:100%;border:1px solid #a9dce4;border-radius:9px;background:#fff;color:var(--ink);padding:12px;line-height:1.5;resize:vertical}.code-input{min-height:150px}.json-input{min-height:300px;font-family:Cascadia Code,Consolas,monospace;font-size:13px}.json-input.compact{min-height:170px}.admin-section{display:flex;flex-direction:column;gap:12px;border:1px solid #cfe9ef;border-radius:10px;background:#fffffff5;padding:14px;box-shadow:0 8px 22px #0c536014}.section-title-row{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.section-title-row h3{margin:0;color:var(--ink);font-size:17px}.section-title-row p{margin:4px 0 0;color:var(--muted);font-size:13px;line-height:1.5}.section-pill{border-radius:999px;background:#fff2c4;color:#7b5600;padding:6px 10px;font-size:12px;font-weight:900;white-space:nowrap}.admin-field{display:flex;flex-direction:column;gap:7px;color:#3d6370;font-size:13px;font-weight:900}.admin-file-actions{display:flex;flex-wrap:wrap;gap:8px}.json-file-picker{display:flex;flex-wrap:wrap;align-items:center;gap:10px;border:1px solid #cfe9ef;border-radius:9px;background:#f8feff;padding:10px 12px;color:#28515b}.json-file-input{flex:1;min-width:240px;color:#12313d;font-weight:700}.json-file-input::file-selector-button{margin-right:10px;border:1px solid #9ed5df;border-radius:8px;background:#fff;color:#28515b;padding:8px 12px;font-weight:900;cursor:pointer}.admin-top-tabs{position:sticky;top:0;z-index:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border:1px solid #cfe9ef;border-radius:10px;background:#fff;padding:8px;box-shadow:0 8px 20px #0c53601a}.admin-top-tabs button{border:0;border-radius:8px;min-height:42px;background:#eafaff;color:#28515b;font-weight:900}.admin-top-tabs button.active{background:linear-gradient(135deg,var(--coral) 0%,#ff9f64 100%);color:#fff}.admin-mode-row{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid #cfe9ef;border-radius:9px;background:#f4fdff;padding:10px}.admin-mode-row>span{color:#3d6370;font-size:13px;font-weight:900}.admin-problem-editor{display:flex;flex-direction:column;gap:12px}.admin-table{overflow-x:auto;border:1px solid #cfe9ef;border-radius:9px;background:#fff}.admin-table-head{background:#eafaff;color:#28515b;font-size:12px;font-weight:900}.user-table-row,.progress-table-row,.problem-table-row,.submission-table-row{display:grid;align-items:center;gap:10px;min-width:720px;border-bottom:1px solid #d9eef2;padding:9px 10px}.user-table-row{grid-template-columns:minmax(120px,.8fr) minmax(180px,1fr) 150px 90px 110px minmax(420px,1.5fr);min-width:1080px}.progress-table-row{grid-template-columns:minmax(130px,1fr) 80px 150px 90px 95px 80px 150px minmax(260px,1.4fr);min-width:1100px}.problem-table-row{grid-template-columns:minmax(150px,1fr) 62px 90px minmax(160px,1.1fr) 54px 54px 54px 64px 54px 70px 86px;min-width:1140px}.problem-table-item{min-width:1140px;border-bottom:1px solid #d9eef2}.problem-table-item:last-child{border-bottom:0}.problem-table-item .problem-table-row{border-bottom:0}.problem-table-row.clickable{cursor:pointer}.problem-table-row.clickable:hover,.problem-table-row.clickable.active{background:#f0fbfd}.problem-edit-row{display:flex;flex-direction:column;gap:12px;border-top:1px solid #d9eef2;background:#fbfeff;padding:14px}.problem-form-grid{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:10px}.problem-form-field{display:flex;flex-direction:column;gap:6px;color:#315764;font-size:12px;font-weight:900}.problem-form-field input,.problem-form-field select,.problem-form-field textarea,.problem-array-row input,.problem-array-row select,.problem-array-row textarea{width:100%;border:1px solid #b9dfe6;border-radius:8px;background:#fff;color:var(--ink);padding:9px 10px;font:inherit}.problem-form-field textarea,.problem-array-row textarea{min-height:72px;resize:vertical}.problem-array-editor{display:flex;flex-direction:column;gap:8px;border:1px solid #d9eef2;border-radius:9px;background:#fff;padding:10px}.array-title-row,.problem-form-actions,.user-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.array-title-row{justify-content:space-between}.array-title-row h4{margin:0;color:var(--ink);font-size:15px}.problem-array-row{display:grid;align-items:start;gap:8px;border-top:1px solid #edf6f8;padding-top:8px}.example-array-row{grid-template-columns:minmax(120px,.8fr) minmax(180px,1fr) minmax(180px,1fr) 90px}.case-array-row{grid-template-columns:minmax(90px,.7fr) minmax(70px,.5fr) minmax(180px,1fr) minmax(180px,1fr) 80px 90px 90px}.danger-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #f0b4ac;border-radius:8px;background:#fff4f1;color:#a72d1f;min-height:36px;padding:8px 12px;font-weight:900;cursor:pointer}.danger-button:hover:not(:disabled){background:#ffe5df}.danger-button:disabled{cursor:not-allowed;opacity:.58}.status-pill{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#e9fff7;color:#197041;padding:5px 9px;font-size:12px;font-weight:900;white-space:nowrap}.status-pill.disabled{background:#fff4f1;color:#a72d1f}.user-actions .ghost-button,.user-actions .danger-button{min-height:34px;padding:7px 10px}.submission-table-row{grid-template-columns:150px minmax(110px,.8fr) minmax(160px,1fr) 80px 90px}.admin-table>div:last-child{border-bottom:0}.table-empty{margin:0;padding:12px}.output-box{display:flex;flex-direction:column;gap:8px;padding:12px}.test-action-grid{display:grid;grid-template-columns:1fr;gap:10px}.removed-interactive-run{display:none!important}.score-card{padding:16px;background:linear-gradient(135deg,#e9fff7,#fff5cc);border-color:#9ee8d6;box-shadow:0 10px 22px #0f9f9b1f}.score-card strong{display:block;color:var(--teal-deep);font-size:34px;line-height:1.1}.score-card span{color:#2c4650;font-weight:700}.case-list{display:flex;flex-direction:column;gap:8px}.case-row{display:grid;grid-template-columns:50px 70px 1fr;align-items:center;gap:8px;padding:10px;background:#fff4f1;border-color:#ffc8bd}.case-row.passed{background:#effff7;border-color:#a8ecc8}.case-row small{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.history-row,.leader-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px}.history-row div,.leader-row div{display:flex;flex-direction:column;gap:3px}.history-row span,.leader-row small{color:var(--muted);font-size:12px;font-weight:700}.rank{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;border-radius:50%;background:linear-gradient(135deg,var(--coral) 0%,var(--teal) 100%);color:#fff;font-weight:900}.warning-text{margin:0;border:1px solid #ffd45a;border-radius:9px;background:#fff8d8;color:#744a00;padding:10px;line-height:1.5;font-weight:700}.muted{color:var(--muted)}.ok-text{color:#197041;font-weight:900}.danger-text{color:#c43828;font-weight:900}.toast{position:fixed;right:24px;bottom:24px;max-width:460px;border-radius:10px;background:#12313d;color:#fff;padding:13px 16px;font-weight:800;box-shadow:0 12px 30px #12313d3d}.loading-screen{display:flex;align-items:center;justify-content:center;gap:10px;min-height:100vh;color:var(--ink);font-size:18px;font-weight:900}@keyframes islandFloat{0%,to{transform:translateY(0)}50%{transform:translateY(-3px)}}.spin{animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}@media(max-width:1180px){body{min-width:0}.app-header{align-items:flex-start;flex-direction:column;padding:16px 20px 12px}.header-actions{flex-wrap:wrap;width:100%}.workspace-layout{grid-template-columns:1fr;height:auto;padding:0 20px 22px}.problem-rail{flex-direction:row;overflow-x:auto}.rail-filters{min-width:190px}.problem-item{min-width:160px}.editor-toolbar{align-items:stretch;grid-template-columns:1fr}.segmented,.toolbar-actions,.editor-toolbar .ghost-button{width:100%}.segmented button{flex:1}.toolbar-actions{flex-wrap:wrap}.toolbar-actions .ghost-button{flex:1}.test-action-grid,.problem-form-grid,.example-array-row,.case-array-row{grid-template-columns:1fr}.editor-panel{min-height:620px}.blockly-host{min-height:520px}.side-panel{grid-template-columns:52px 1fr;min-height:620px}}@media(max-width:520px){.app-header{padding:16px 14px 12px}.app-header h1{font-size:20px}.workspace-layout{padding:0 14px 20px}.header-actions .primary-button{width:100%}.header-actions{align-items:stretch;flex-direction:column}.rail-title{min-width:42px;writing-mode:vertical-rl}.rail-filters{min-width:180px}.editor-panel{min-height:690px}.blockly-host{min-height:560px}}
