* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Microsoft YaHei', sans-serif; background: #f5f7fa; color: #333; overflow: hidden; }

/* 主布局 */
.seo-layout { display: flex; height: calc(100vh - 52px); }

/* 左侧目录树 */
.seo-sidebar { width: 280px; background: white; border-right: 1px solid #e8e8e8; overflow-y: auto; overflow-x: hidden; flex-shrink: 0; padding: 8px 0; }
.seo-sidebar::-webkit-scrollbar { width: 4px; }
.seo-sidebar::-webkit-scrollbar-thumb { background: #d9d9d9; border-radius: 2px; }
.tree-node-wrap { overflow: hidden; transition: opacity 0.25s ease, transform 0.25s ease; transform-origin: top; }
.tree-node-wrap.hidden { opacity: 0; max-height: 0; overflow: hidden; pointer-events: none; margin: 0; }
.tree-link { display: flex; align-items: center; gap: 4px; padding: 6px 8px; font-size: 13px; text-decoration: none; color: #333; transition: background 0.15s ease; cursor: pointer; }
.tree-link:hover { background: #f0f5ff; }
.tree-link.active { background: #e6f7ff; color: #1890ff; font-weight: 500; border-right: 3px solid #1890ff; }
.tree-arrow { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: #999; flex-shrink: 0; transition: transform 0.25s cubic-bezier(0.4,0,0.2,1); }
.tree-arrow.expanded { transform: rotate(90deg); }
.tree-icon { width: 40px; height: 30px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #f5f5f5; border: 1px solid #f0f0f0; }
.tree-icon img { width: 100%; height: 100%; object-fit: cover; }
.tree-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 右侧主区域 */
.seo-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.breadcrumb { padding: 10px 16px; font-size: 13px; color: #999; border-bottom: 1px solid #f0f0f0; background: white; flex-shrink: 0; }
.breadcrumb a { color: #1890ff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 6px; color: #ccc; }

/* 模型信息头 */
.model-header { background: white; padding: 14px 20px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.model-header .mh-img { width: 80px; height: 60px; border-radius: 6px; object-fit: contain; background: #f5f5f5; border: 1px solid #eee; flex-shrink: 0; }
.model-header .mh-info { flex: 1; }
.model-header .mh-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.model-header .mh-sub { font-size: 12px; color: #999; }
.model-header .mh-sub a { color: #1890ff; text-decoration: none; }
.model-header .mh-sub a:hover { text-decoration: underline; }
.model-header .mh-actions { display: flex; gap: 8px; flex-shrink: 0; }
.mh-btn { padding: 7px 18px; border-radius: 4px; font-size: 13px; cursor: pointer; border: 1px solid #d9d9d9; background: white; color: #333; transition: all 0.2s; }
.mh-btn:hover { border-color: #1890ff; color: #1890ff; }
.mh-btn.primary { background: #1890ff; color: white; border-color: #1890ff; }
.mh-btn.primary:hover { background: #40a9ff; }

/* 3D区域 */
.viewer-area { flex: 1; display: flex; flex-direction: column; min-height: 0; min-width: 0; overflow: hidden; }
.viewer-box { width: 100%; height: 100%; background: #1a1a2e; position: relative; overflow: hidden; }
.viewer-box canvas { display: block !important; }
.viewer-placeholder { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e, #16213e); color: #aaa; z-index: 2; }
.viewer-placeholder .lock-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.6; }
.viewer-placeholder .ph-img { width: 240px; height: 180px; object-fit: contain; margin-bottom: 16px; border-radius: 8px; opacity: 0.5; filter: blur(2px); }
.viewer-placeholder p { font-size: 14px; margin-bottom: 16px; color: #888; }
.login-btn { background: linear-gradient(135deg, #1890ff, #40a9ff); color: white; border: none; padding: 10px 32px; border-radius: 6px; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.login-btn:hover { box-shadow: 0 4px 12px rgba(24,144,255,.4); transform: translateY(-1px); }
.viewer-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #aaa; font-size: 14px; background: rgba(0,0,0,.4); padding: 12px 24px; border-radius: 8px; z-index: 3; }
.viewer-toolbar { position: absolute; top: 12px; right: 12px; z-index: 10; display: flex; flex-direction: column; gap: 4px; }
.tb-group { background: rgba(0,0,0,.65); border-radius: 6px; overflow: hidden; }
.tb-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: #ddd; border: none; background: transparent; cursor: pointer; font-size: 16px; transition: all 0.15s; }
.tb-btn:hover { background: rgba(255,255,255,.15); color: white; }
.tb-btn.active { background: rgba(24,144,255,.5); color: white; }

/* 登录弹窗 */
.auth-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.5); z-index: 9999; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); }
.auth-dialog { background: white; border-radius: 12px; width: 380px; overflow: hidden; box-shadow: 0 12px 48px rgba(0,0,0,.3); animation: dialogIn 0.25s ease-out; }
@keyframes dialogIn { from { opacity: 0; transform: scale(0.95) translateY(-10px); } }
.auth-tabs { display: flex; background: #f8f9fa; border-bottom: 1px solid #e9ecef; position: relative; }
.auth-tabs span { flex: 1; text-align: center; padding: 14px 0; font-size: 15px; cursor: pointer; color: #868e96; transition: color 0.2s; }
.auth-tabs span.active { color: #1890ff; border-bottom: 2px solid #1890ff; font-weight: 500; }
.auth-body { padding: 24px 28px 20px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 13px; color: #495057; margin-bottom: 6px; font-weight: 500; }
.auth-field input { width: 100%; padding: 10px 12px; border: 1px solid #dee2e6; border-radius: 8px; font-size: 14px; outline: none; transition: border-color 0.2s; }
.auth-field input:focus { border-color: #1890ff; box-shadow: 0 0 0 3px rgba(24,144,255,.1); }
.auth-error { color: #ff4d4f; font-size: 13px; margin-bottom: 12px; padding: 6px 10px; background: #fff2f0; border-radius: 6px; border: 1px solid #ffccc7; }
.auth-submit { width: 100%; padding: 11px; background: linear-gradient(135deg, #1890ff, #40a9ff); color: white; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; transition: all 0.2s; }
.auth-submit:hover { box-shadow: 0 4px 12px rgba(24,144,255,.3); }
