/* ================= 全局重置与基础风格 ================= */
        

        
        

        /* ================= 头部样式 ================= */
        header {
            position: fixed; top: 0; left: 0; right: 0; height: 50px;
            background: var(--surface); border-bottom: 2px solid var(--primary);
            display: flex; align-items: center; justify-content: space-between;
            padding: 0 15px; z-index: 100;
        }

        .header-left, .header-right {
            display: flex; align-items: center; flex: 1;
        }
        
        .header-right { justify-content: flex-end; }

        .header-center {
            flex: 2; text-align: center;
        }

        .back-btn {
            background: transparent; color: var(--text-main);
            padding: 5px 8px; border: 1px solid var(--border); border-radius: 3px; cursor: pointer;
            display: flex; align-items: center; justify-content: center; outline: none;
            text-decoration: none; font-size: 14px;
        }
        .back-btn:hover { border-color: var(--primary); color: var(--primary); }
        
        .header-title {
            font-size: 16px; font-weight: bold; color: var(--primary);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }

        /* ================= 按钮与输入框 ================= */
        button {
            padding: 8px 15px; background-color: var(--primary); color: white;
            border: 1px solid var(--primary-hover); border-radius: 3px; cursor: pointer;
            font-size: 14px; transition: background 0.2s; white-space: nowrap;
        }
        button:hover { background-color: var(--primary-hover); }
        button:disabled { background-color: #cccccc; border-color: #bbbbbb; cursor: not-allowed; }
        
        .btn-outline { background: var(--surface); border: 1px solid var(--border); color: var(--text-main); }
        .btn-outline:hover { background: #f0f0f0; }
        .btn-danger { background: #d9534f; border-color: #d43f3a; color: white; }
        .btn-danger:hover { background: #c9302c; }

        input[type="text"] {
            padding: 10px; border: 1px solid var(--border); border-radius: 3px;
            font-size: 14px; outline: none; width: 100%; background: var(--surface);
        }
        input[type="text"]:focus { border-color: var(--primary); }

        /* ================= 侧边栏样?================= */
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        

        
        
        
        
        

        /* ================= 收藏组卡片布局 ================= */
        .container { max-width: 1200px; margin: 0 auto; width: 95%; padding: 0 5px; }
        
        .top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 10px; }
        .stats { font-size: 14px; color: var(--text-sub); }

        .group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }

        .group-card { background: var(--surface); border: 1px solid var(--border); border-radius: 4px; padding: 15px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
        .group-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--border); padding-bottom: 10px; gap: 10px;}
        .group-title { font-weight: bold; font-size: 16px; color: var(--primary); word-break: break-all; flex: 1; }
        .group-actions { display: flex; gap: 5px; flex-shrink: 0; }
        .group-actions button { padding: 6px 10px; font-size: 12px; }
        
        .group-tags-preview { font-size: 13px; color: #666; flex: 1; word-break: break-word; line-height: 1.5; }
        
        .search-trigger-btn { width: 100%; padding: 10px; font-size: 14px; background-color: #5cb85c; border-color: #4cae4c; margin-top: auto; }
        .search-trigger-btn:hover { background-color: #449d44; }

        /* ================= 模态框 & 标签编辑 ================= */
        .modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.7); z-index: 2000; align-items: center; justify-content: center; padding: 15px; }
        .modal-content { background: var(--surface); border-radius: 6px; padding: 20px; width: 100%; max-width: 500px; max-height: 90vh; display: flex; flex-direction: column; gap: 15px; position: relative; overflow-y: auto; }
        
        .tag-list-editor { display: flex; flex-wrap: wrap; gap: 8px; border: 1px solid var(--border); padding: 12px; border-radius: 3px; min-height: 80px; max-height: 200px; overflow-y: auto; background: var(--bg-color); align-content: flex-start; }
        .tag-pill { display: inline-flex; align-items: center; background: white; border: 1px solid #ddd; font-size: 13px; border-radius: 3px; padding: 4px 8px; gap: 6px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); max-width: 100%; }
        .tag-pill span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .tag-pill .remove { color: #c0392b; cursor: pointer; font-weight: bold; font-size: 16px; padding: 0 2px; }
        .tag-pill .remove:hover { color: #a94442; }

        .autocomplete-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.15); z-index: 3600; max-height: 200px; overflow-y: auto; display: none; flex-direction: column; border-radius: 3px; margin-top: 2px; }
        .autocomplete-item { padding: 10px 12px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 14px; border-bottom: 1px solid #eee; color: var(--text-main); }
        .autocomplete-item:hover { background: #f5f5f5; }

        /* ================= 移动端专项适配 ================= */
        @media (max-width: 600px) {
            .group-grid { grid-template-columns: 1fr; }
            .top-bar { flex-direction: column; align-items: stretch; gap: 15px; }
            .top-bar button { width: 100%; padding: 12px; }
            .modal-content { padding: 15px; width: 95%; max-height: 95vh; }
            header { padding: 0 10px; }
            .header-title { font-size: 15px; }
            .back-btn { padding: 6px 10px; font-size: 13px; }
            input[type="text"] { padding: 12px; }
            .autocomplete-item { padding: 12px; }
            
            /* 在窄屏下隐藏返回按钮的文字，只留箭头，给中间的标题留出更多空?*/
            .header-left a.back-btn {
                font-size: 0;
                padding: 6px 12px;
            }
            .header-left a.back-btn::before {
                content: "?;
                font-size: 14px;
            }
        }
