body{background:var(--bg, #f5f5f5);margin:0;min-height:100vh}[data-theme=dark] body{background:var(--bg, #1a1a2e)}.admin-page{max-width:1400px;margin:40px auto;padding:0 24px}.admin-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px;flex-wrap:wrap;gap:12px}.admin-header h1{font-size:1.5em;display:flex;align-items:center;gap:8px}.admin-user{font-size:.85em;color:#999}.admin-view{display:none}.login-box{max-width:360px;margin:80px auto;padding:32px;background:var(--bg-card);border-radius:16px;box-shadow:var(--shadow);border:1px solid var(--border)}.login-box h2{text-align:center;margin-bottom:24px}.login-box .form-group{margin-bottom:16px}.login-box input{width:100%;padding:12px 14px;border:2px solid var(--border);border-radius:10px;font-size:.95em;background:var(--input-bg);color:var(--text)}.login-box input:focus{outline:none;border-color:var(--accent)}.login-box .btn{width:100%;justify-content:center}.error-msg{color:#e74c3c;font-size:.85em;margin-top:8px}.toolbar{display:flex;gap:10px;margin-bottom:16px;flex-wrap:wrap}.post-item{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:var(--bg-card);border-radius:12px;border:1px solid var(--border);margin-bottom:10px;transition:.2s;gap:12px}.post-item:hover{border-color:var(--accent)}.post-item-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.post-item-info strong{font-size:1em}.post-item-info .muted{font-size:.82em}.post-item-actions{display:flex;gap:6px;flex-shrink:0}.tag-list{display:flex;flex-wrap:wrap;gap:4px}.tag-list .tag-pill{font-size:.75em;padding:1px 8px}#view-edit.active,#view-about.active{height:calc(100vh - 120px);display:flex;flex-direction:column;min-height:0}#view-edit .edit-box,#view-about .edit-box{max-width:1200px;flex:1;display:flex;flex-direction:column;min-height:0}#view-edit .edit-box form,#view-about .edit-box form,#view-edit .edit-box .editor-wrap,#view-about .edit-box .editor-wrap{flex:1;display:flex;flex-direction:column;min-height:0}#view-edit .edit-box .editor-container,#view-about .edit-box .editor-container{flex:1;min-height:0;height:0}#view-edit .editor-input-wrap,#view-about .editor-input-wrap{min-height:0}.edit-box .form-group{margin-bottom:16px}.edit-box label{display:block;font-weight:500;margin-bottom:6px;font-size:.92em;color:var(--text-secondary)}.edit-box input:not([type]),.edit-box input[type=text]:not(#edit-title),.edit-box textarea{width:100%;padding:12px 14px;border:2px solid var(--border);border-radius:10px;font-size:.95em;background:var(--input-bg);color:var(--text);font-family:inherit}.edit-box input:focus:not([type]),.edit-box input[type=text]:focus:not(#edit-title),.edit-box textarea:focus{outline:none;border-color:var(--accent)}.editor-toolbar{display:flex;align-items:center;gap:2px;padding:6px 12px;background:var(--bg-card);border:1px solid var(--border);border-bottom:none;border-radius:10px 10px 0 0;flex-wrap:wrap}.editor-toolbar .toolbar-btn{width:32px;height:32px;border:none;border-radius:6px;background:transparent;color:var(--text-secondary);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:14px;transition:.15s}.editor-toolbar .toolbar-btn:hover{background:var(--accent-light);color:var(--accent)}.editor-toolbar .toolbar-divider{width:1px;height:20px;background:var(--border);margin:0 4px}.editor-wrap .editor-container{display:grid;grid-template-columns:1fr 1fr;min-height:400px;border:1px solid var(--border);border-radius:0 0 10px 10px;overflow:hidden}.editor-wrap .editor-pane{display:flex;flex-direction:column;min-width:0;min-height:0}.editor-wrap .editor-pane+.editor-pane{border-left:1px solid var(--border)}.editor-wrap .editor-pane .editor-input-wrap{display:flex;flex:1;overflow:hidden}.editor-wrap .editor-pane .editor-gutter{padding:16px 8px 16px 10px;text-align:right;font-family:Fira Code,Consolas,monospace;font-size:13px;line-height:1.7;color:var(--text-secondary);background:var(--input-bg);-webkit-user-select:none;user-select:none;overflow:hidden;min-width:38px;border-right:1px solid var(--border);box-sizing:border-box;white-space:pre}.editor-wrap .editor-pane textarea{flex:1;border:none;border-radius:0;padding:16px;font-family:Fira Code,Consolas,monospace;font-size:13px;line-height:1.7;tab-size:2;resize:none;overflow-y:auto;overflow-x:auto;background:transparent;color:var(--text);outline:none;box-sizing:border-box;white-space:pre}.editor-wrap .editor-pane .post-content{flex:1;overflow-y:auto;padding:16px 20px;font-size:.95em;line-height:1.75;box-sizing:border-box}.editor-wrap .editor-pane .post-content p:last-child{margin-bottom:0}.editor-wrap .editor-pane .post-content pre{overflow-x:auto;white-space:pre-wrap!important;word-break:break-word!important}.editor-wrap .editor-pane .post-content pre code{tab-size:2;white-space:pre-wrap!important;word-break:break-word!important}.editor-wrap .editor-pane .post-content .hljs{background:transparent}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-keyword,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-selector-tag,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-literal,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-section,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-link{color:#ff7b72}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-string,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-title,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-name,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-type,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-attribute,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-selector-id{color:#a5d6ff}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-number,[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-meta{color:#d2a8ff}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-comment{color:#8b949e}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-built_in{color:#ffa657}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-deletion{color:#ffdcd7;background:#67060c}[data-theme=dark] .editor-wrap .editor-pane .post-content .hljs-addition{color:#aff5b4;background:#033a16}.editor-wrap.is-fullscreen{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:10000;background:var(--bg);display:flex;flex-direction:column;padding:0;margin:0}.editor-wrap.is-fullscreen .editor-container{flex:1;min-height:0;border-radius:0;border:none}@media(max-width:768px){.editor-wrap .editor-container{grid-template-columns:1fr}.editor-wrap .editor-pane textarea,.editor-wrap .editor-pane .post-content{min-height:250px}}.editor-toolbar .view-mode-btn.active{background:var(--accent-light);color:var(--accent)}.editor-wrap .editor-container.mode-edit .editor-pane:last-child{display:none}.editor-wrap .editor-container.mode-preview .editor-pane:first-child{display:none}.editor-wrap .editor-container.mode-edit,.editor-wrap .editor-container.mode-preview{grid-template-columns:1fr}.form-actions{display:flex;gap:10px}.btn-sm{padding:6px 14px;font-size:.85em;border-radius:8px}.loading{text-align:center;padding:40px;color:#999}.admin-page .admin-header h1 i{color:var(--accent)}.admin-page .admin-view>.btn{margin-bottom:8px}.admin-page .post-item-actions .btn{font-size:.85em;padding:6px 14px}.admin-page .post-item-info .muted i{margin-right:4px}.admin-page .login-box h2 i{color:var(--accent)}
