/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* GitHub同步相关样式 */
.btn-github {
    background: linear-gradient(135deg, #24292e, #586069);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-github:hover {
    background: linear-gradient(135deg, #1b1f23, #444d56);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(36, 41, 46, 0.3);
}

.github-setup-modal {
    max-width: 600px;
    width: 90vw;
}

.setup-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step {
    padding: 20px;
    border: 1px solid #e1e4e8;
    border-radius: 8px;
    background: #f6f8fa;
}

.step h4 {
    color: #24292e;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.step p {
    color: #586069;
    margin-bottom: 8px;
    line-height: 1.5;
}

.step code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e36209;
}

.step a {
    color: #0366d6;
    text-decoration: none;
}

.step a:hover {
    text-decoration: underline;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    font-size: 14px;
    background: white;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 3px rgba(3, 102, 214, 0.1);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #24292e;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0366d6;
}

/* 通知样式 */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    min-width: 300px;
    border-left: 4px solid #28a745;
    animation: slideIn 0.3s ease;
}

.notification-success {
    border-left-color: #28a745;
}

.notification-error {
    border-left-color: #dc3545;
}

.notification-warning {
    border-left-color: #ffc107;
}

.notification-info {
    border-left-color: #17a2b8;
}

.notification i {
    font-size: 1.2rem;
}

.notification-success i {
    color: #28a745;
}

.notification-error i {
    color: #dc3545;
}

.notification-warning i {
    color: #ffc107;
}

.notification-info i {
    color: #17a2b8;
}

.notification span {
    color: #333;
    font-weight: 500;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 重要待办样式 */
.todo-item.important {
    border-left: 4px solid #dc3545;
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.1) 0%, rgba(255, 255, 255, 0.95) 10%);
}

.todo-item.important .item-text {
    color: #dc3545;
    font-weight: 600;
}

.important-icon {
    color: #dc3545;
    margin-left: 8px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.important-btn {
    color: #6c757d;
    transition: all 0.3s ease;
}

.important-btn:hover {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

.important-btn.active {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
}

/* 链接管理按钮样式 */
.link-actions {
    display: flex;
    gap: 5px;
}

.btn-edit {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.btn-edit:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* 资源管理侧边栏样式 */
.resource-sidebar {
    position: fixed;
    top: 0;
    right: -50vw;
    width: 50vw;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1000;
    border-left: 1px solid #e0e0e0;
}

.resource-sidebar.active {
    right: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-bottom: 1px solid #e0e0e0;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.sidebar-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.sidebar-content {
    height: calc(100% - 60px);
    overflow: hidden;
}

/* 资源管理面板样式 */
.resource-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-layout {
    display: flex;
    height: 100%;
}

/* 左侧分类导航 */
.category-sidebar {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.category-header {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
}

.category-header h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #495057;
}

.btn-manage-categories {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-manage-categories:hover {
    background: #e9ecef;
    color: #495057;
}

.resource-categories {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.category-item {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 6px;
    margin-bottom: 4px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.category-item:hover {
    background: #e9ecef;
}

.category-item.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.category-item i {
    margin-right: 8px;
    width: 16px;
}

.category-item {
    position: relative;
    justify-content: space-between;
}

.category-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-item:hover .category-actions {
    opacity: 1;
}

.btn-edit-category,
.btn-delete-category {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: inherit;
    padding: 2px 4px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.3s ease;
}

.btn-edit-category:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-delete-category:hover {
    background: rgba(220, 53, 69, 0.8);
    color: white;
}

.category-manage-modal .modal-content {
    max-width: 600px;
}

.add-category-section {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.add-category-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
}

/* 右侧资源内容 */
.resource-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.resource-search {
    margin-bottom: 15px;
}

.resource-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
}

.resource-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-right: 5px;
}

/* 自定义滚动条样式 */
.resource-list::-webkit-scrollbar,
.resource-categories::-webkit-scrollbar {
    width: 6px;
}

.resource-list::-webkit-scrollbar-track,
.resource-categories::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.resource-list::-webkit-scrollbar-thumb,
.resource-categories::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.resource-list::-webkit-scrollbar-thumb:hover,
.resource-categories::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.empty-resources {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-resources i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ccc;
}

.empty-resources p {
    margin-bottom: 20px;
}

.btn-add-resource {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-add-resource:hover {
    background: #218838;
    transform: translateY(-1px);
}

.resource-actions {
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.resource-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 8px;
    padding: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.resource-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #007bff;
}

.resource-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.btn-toggle-children {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 2px 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-width: 20px;
}

.btn-toggle-children:hover {
    background: #f8f9fa;
    color: #007bff;
}

.resource-spacer {
    width: 20px;
    display: inline-block;
}

.resource-content-wrapper {
    flex: 1;
    min-width: 0;
}

.resource-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    word-wrap: break-word;
}

/* 资源链接容器 */
.resource-link-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.resource-url {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 4px;
    word-wrap: break-word;
    flex: 1;
}

.resource-url:hover {
    text-decoration: underline;
}

/* 本地路径样式 */
.resource-url.local-path {
    color: #28a745;
    cursor: pointer;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    margin-bottom: 0;
}

.resource-url.local-path:hover {
    background: #e9ecef;
    text-decoration: none;
}

/* 网络链接样式 */
.resource-url.web-link {
    color: #007bff;
}

.resource-url.web-link:hover {
    text-decoration: underline;
}

/* 未知链接样式 */
.resource-url.unknown-link {
    color: #6c757d;
    cursor: default;
}

/* 复制按钮 */
.btn-copy-path {
    background: none;
    border: 1px solid #dee2e6;
    color: #6c757d;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.btn-copy-path:hover {
    background: #f8f9fa;
    color: #007bff;
    border-color: #007bff;
}

.resource-no-url {
    color: #6c757d;
    font-style: italic;
    font-size: 0.9rem;
}

.resource-category {
    font-size: 0.7rem;
    background: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}

.resource-description {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 4px;
    line-height: 1.4;
}

.resource-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resource-item:hover .resource-actions {
    opacity: 1;
}

.resource-actions button {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 0.8rem;
}

.resource-actions button:hover {
    background: #f8f9fa;
}

.btn-add-child:hover {
    color: #28a745;
}

.btn-edit-resource:hover {
    color: #ffc107;
}

.btn-delete-resource:hover {
    color: #dc3545;
}

.resource-children {
    margin-top: 8px;
    padding-left: 16px;
    border-left: 2px solid #e9ecef;
}

/* 路径显示样式 */
.path-display {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
    margin: 12px 0;
}

.path-display label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.path-display code {
    display: block;
    background: white;
    border: 1px solid #dee2e6;
    padding: 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    word-break: break-all;
    margin-bottom: 8px;
}

.extension-status {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
}

.extension-status h4 {
    margin-top: 0;
    color: #0066cc;
}

.path-options {
    margin: 16px 0;
}

.path-options h4 {
    margin-bottom: 12px;
    color: #495057;
}

.option-grid {
    display: grid;
    gap: 16px;
    margin-top: 12px;
}

.option-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 12px;
}

.option-item strong {
    color: #495057;
    display: block;
    margin-bottom: 8px;
}

.option-item ul {
    margin: 0;
    padding-left: 20px;
}

.option-item li {
    margin-bottom: 4px;
    color: #6c757d;
}

.extension-help {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 16px;
    margin-top: 16px;
}

.extension-help h4 {
    margin-top: 0;
    color: #856404;
}

.extension-help ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.extension-help li {
    margin-bottom: 4px;
    color: #856404;
}

kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 2px 4px;
    font-size: 0.8rem;
    font-family: monospace;
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-body {
    padding: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* 主内容区域调整 */
.container.sidebar-open {
    margin-right: 50vw;
    transition: margin-right 0.3s ease;
}

/* 资源按钮样式 */
.resource-btn {
    background: #17a2b8;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 5px;
    transition: all 0.3s ease;
}

.resource-btn:hover {
    background: #138496;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .resource-sidebar {
        width: 350px;
        right: -350px;
    }
    
    .container.sidebar-open {
        margin-right: 350px;
    }
}

@media (max-width: 768px) {
    .resource-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .container.sidebar-open {
        margin-right: 0;
    }
    
    .resource-sidebar.active {
        right: 0;
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header h1 i {
    margin-right: 15px;
    color: #667eea;
}

/* 统计面板 */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-content {
    flex: 1 1 auto;
    min-width: 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.5rem;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* 模块卡片 */
.module-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.module-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

.module-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.module-header h2 i {
    margin-right: 10px;
    color: #667eea;
}

.module-actions {
    display: flex;
    gap: 10px;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* 分类标签 */
.category-tabs {
    padding: 0 30px 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    background: #f8f9fa;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #e9ecef;
    color: #495057;
}

/* 模块内容 */
.module-content {
    padding: 30px;
}

/* 大纲和待办容器 */
.outline-container,
.todo-container {
    min-height: 200px;
}

.outline-item,
.todo-item {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.outline-item:hover,
.todo-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.outline-item.level-1 {
    border-left-color: #667eea;
}

.outline-item.level-2 {
    border-left-color: #4ecdc4;
    margin-left: 20px;
}

.outline-item.level-3 {
    border-left-color: #feca57;
    margin-left: 40px;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.item-text {
    flex: 1;
    font-size: 1rem;
    color: #2c3e50;
}

.item-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.outline-item:hover .item-actions,
.todo-item:hover .item-actions {
    opacity: 1;
}

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: #dee2e6;
    color: #6c757d;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

/* 复选框样式 */
.todo-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.todo-checkbox.checked {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    border-color: #4ecdc4;
}

.todo-checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.todo-item.completed .item-text {
    text-decoration: line-through;
    color: #6c757d;
}

/* 历史记录 */
.history-container {
    max-height: 400px;
    overflow-y: auto;
}

.history-group {
    margin-bottom: 20px;
}

.history-date {
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 2px solid #e9ecef;
}

.history-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-text {
    color: #2c3e50;
}

.history-time {
    font-size: 0.8rem;
    color: #6c757d;
}

/* 思维导图样式 */
.mind-map-container {
    min-height: 300px;
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 12px;
    padding: 20px;
    position: relative;
    overflow: auto;
}

/* 全分类视图样式 */
.all-categories-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.category-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.category-section h4 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 明日待办特殊样式 */
.module-card:has(#tomorrowContainer) .module-header h2 {
    color: #ff6b6b;
}

.module-card:has(#tomorrowContainer) .btn-warning {
    background: linear-gradient(135deg, #ff9500 0%, #ff6b6b 100%);
    color: white;
    border: none;
}

.module-card:has(#tomorrowContainer) .btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px 30px 20px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #495057;
}

.modal-body {
    padding: 25px 30px;
}

.modal-body input,
.modal-body select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
    max-height: 150px;
    overflow-y: auto;
}

.modal-body label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #495057;
    cursor: pointer;
}

.modal-body input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.modal-body input:focus,
.modal-body select:focus {
    outline: none;
    border-color: #667eea;
}

.modal-footer {
    padding: 20px 30px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* 导出菜单 */
.export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 16px;
    min-width: 320px;
    z-index: 9999;
    display: none;
    pointer-events: auto;
}

.export-date-range {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.export-date-range label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.date-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.date-inputs input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    flex: 1;
}

.date-inputs span {
    color: #666;
    font-size: 14px;
}

.date-presets {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.preset-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.preset-btn:hover {
    background: #f8f9fa;
}

.preset-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.export-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.export-option {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.export-option:hover {
    background-color: #f8f9fa;
}

.export-option i {
    color: #667eea;
}

/* 思维导图样式 */
.simple-mindmap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    min-height: 300px;
}

.mindmap-center {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mindmap-branches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.mindmap-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
    max-width: 300px;
}

.branch-node {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #667eea;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.branch-node:hover {
    transform: translateY(-2px);
}

.sub-branches {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.sub-branch {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.sub-branch:hover {
    background: rgba(255, 255, 255, 0.9);
}

.sub-branch.completed {
    text-decoration: line-through;
    opacity: 0.6;
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

.mindmap-container {
    display: none;
    min-height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-top: 15px;
}

/* 全分类视图模态框样式 */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.fullscreen-content {
    background: white;
    border-radius: 20px;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.fullscreen-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px 20px 0 0;
}

.fullscreen-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.fullscreen-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.category-section {
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

.category-title i {
    color: #667eea;
}

.category-items {
    display: grid;
    gap: 10px;
}

.outline-item-display {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid #667eea;
    border-radius: 10px;
    padding: 15px;
}

.outline-item-display .item-text {
    font-weight: 600;
    color: #333;
}

.sub-items {
    margin-top: 10px;
    padding-left: 20px;
}

.sub-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: #666;
}

.pending-section, .completed-section {
    margin-bottom: 20px;
}

.pending-section h4, .completed-section h4 {
    margin-bottom: 10px;
    color: #667eea;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.todo-item-display {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.todo-item-display.completed {
    opacity: 0.6;
    text-decoration: line-through;
    background: rgba(76, 175, 80, 0.1);
    border-color: #4caf50;
}

.locked-icon {
    color: #ff9800;
    font-size: 0.9rem;
}

/* 全屏思维导图样式 */
.fullscreen-mindmap {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    min-height: 100%;
}

.fullscreen-mindmap .mindmap-center {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px 40px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.8rem;
    margin-bottom: 50px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.fullscreen-mindmap .mindmap-branches {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    width: 100%;
    max-width: 1400px;
}

.fullscreen-mindmap .mindmap-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.category-node {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    color: white;
    padding: 15px 30px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.outline-branch {
    background: rgba(102, 126, 234, 0.1);
    border: 2px solid #667eea;
    color: #333;
    font-weight: 600;
}

.todo-branch {
    background: rgba(76, 175, 80, 0.1);
    border: 2px solid #4caf50;
    color: #333;
    position: relative;
}

.todo-branch.completed {
    background: rgba(158, 158, 158, 0.1);
    border-color: #9e9e9e;
    opacity: 0.7;
    text-decoration: line-through;
}

.third-level {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid #667eea;
}

.third-branch {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 15px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #666;
}

.outline-ref {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* 分类分组样式 */
.category-group {
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.category-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #667eea;
    font-size: 1rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
}

.category-group-title i {
    color: #667eea;
    font-size: 0.9rem;
}

/* 思维导图二级大纲样式 */
.outline-group {
    margin-bottom: 15px;
    border-left: 3px solid #667eea;
    padding-left: 15px;
}

.outline-branch-title {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 8px 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 10px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.outline-branch-title.no-outline {
    background: linear-gradient(135deg, #9e9e9e, #757575);
    box-shadow: 0 2px 8px rgba(158, 158, 158, 0.3);
}

.outline-todos {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.todo-with-outline {
    background: rgba(102, 126, 234, 0.15);
    border: 1px solid #667eea;
    color: #333;
}

.todo-without-outline {
    background: rgba(158, 158, 158, 0.15);
    border: 1px solid #9e9e9e;
    color: #333;
}

.todo-with-outline.completed {
    background: rgba(102, 126, 234, 0.1);
    opacity: 0.6;
    text-decoration: line-through;
}

.todo-without-outline.completed {
    background: rgba(158, 158, 158, 0.1);
    opacity: 0.6;
    text-decoration: line-through;
}

/* 解锁按钮样式 */
.unlock-btn {
    background: linear-gradient(135deg, #ff9800, #f57c00);
    color: white;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.unlock-btn:hover {
    background: linear-gradient(135deg, #f57c00, #e65100);
    transform: translateY(-1px);
}

/* 导出菜单样式 */
.export-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 20px;
    min-width: 300px;
    z-index: 1000;
    display: none;
}

.export-section {
    margin-bottom: 20px;
}

.export-section h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 15px;
}

.preset-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    background: #f5f5f5;
    border-color: #667eea;
}

.preset-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.date-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.date-inputs input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
}

.export-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.export-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.export-btn.json {
    background: #667eea;
    color: white;
}

.export-btn.txt {
    background: #764ba2;
    color: white;
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
    
    .stats-panel {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .module {
        padding: 20px;
    }
    
    .tabs {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .tab-btn {
        flex: 1;
        min-width: 80px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .mindmap-branches {
        flex-direction: column;
        align-items: center;
    }
    
    .mindmap-branch {
        width: 100%;
        max-width: none;
    }
    
    .export-menu {
        right: -10px;
        left: -10px;
        min-width: auto;
    }
    
    .preset-buttons {
        grid-template-columns: 1fr;
    }
    
    .date-inputs {
        grid-template-columns: 1fr;
    }
    
    .export-buttons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .module-header {
        padding: 20px;
    }
    
    .module-content {
        padding: 15px;
    }
    
    .category-tabs {
        padding: 0 15px 15px;
    }
    
    .tab-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.outline-item,
.todo-item,
.history-item {
    animation: fadeIn 0.3s ease;
}

/* 历史记录过滤器 */
.history-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    background: transparent;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.filter-btn:hover:not(.active) {
    border-color: #667eea;
    color: #667eea;
}

/* 待办事项样式 */
.todo-section {
    margin-bottom: 25px;
}

.todo-section h3 {
    color: #555;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.todo-section.completed h3 {
    color: #888;
}

.todo-section.overdue h3 {
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    padding: 10px 15px;
    border-radius: 8px;
    border-left: 4px solid #dc3545;
}

.category-group {
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    border-left: 4px solid #667eea;
}

.category-group.overdue {
    background: rgba(220, 53, 69, 0.05);
    border-left: 4px solid #dc3545;
}

.category-group-title {
    color: #555;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-group-title i {
    color: #667eea;
}

.category-group.overdue .category-group-title {
    color: #dc3545;
}

.category-group.overdue .category-group-title i {
    color: #dc3545;
}

/* 历史记录样式 */
.history-date-group {
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.history-date-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-category-group {
    border-bottom: 1px solid #f0f0f0;
}

.history-category-group:last-child {
    border-bottom: none;
}

.history-category-header {
    background: #f8f9fa;
    padding: 10px 16px;
    font-weight: 600;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
}

.history-items {
    padding: 0;
}

.history-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item.overdue-completed {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
}

.history-item-text {
    flex: 1;
    color: #495057;
}

.history-item-meta {
    font-size: 0.85em;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.overdue-label {
    background: #dc3545;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75em;
    font-weight: bold;
}

/* 快速创建待办模态框样式 */
.quick-todo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.quick-todo-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.quick-todo-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quick-todo-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.quick-todo-body {
    padding: 24px;
}

.outline-reference {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    border-left: 4px solid #007bff;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.todo-type-buttons {
    display: flex;
    gap: 12px;
}

.todo-type-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.todo-type-btn:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.todo-type-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-cancel, .btn-confirm {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-cancel {
    background: #6c757d;
    color: white;
}

.btn-cancel:hover {
    background: #5a6268;
}

.btn-confirm {
    background: #007bff;
    color: white;
}

.btn-confirm:hover {
    background: #0056b3;
}

.quick-todo-btn {
    background: #28a745 !important;
    color: white !important;
}

.quick-todo-btn:hover {
    background: #218838 !important;
}

/* 通知样式 */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 链接管理模态框样式 */
.link-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.link-modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.link-modal-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.link-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2em;
}

.link-modal-body {
    padding: 24px;
}

.existing-links, .add-link-section {
    margin-bottom: 24px;
}

.existing-links h4, .add-link-section h4 {
    margin: 0 0 16px 0;
    color: #333;
    font-size: 1.1em;
}

.link-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 4px solid #007bff;
}

.link-preview {
    flex: 1;
    text-decoration: none;
    color: #007bff;
    font-weight: 500;
}

.link-preview:hover {
    text-decoration: underline;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #c82333;
}

.btn-add {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-add:hover {
    background: #218838;
}

.empty-links {
    color: #6c757d;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.item-links {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.outline-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #e3f2fd;
    color: #1976d2;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85em;
    transition: background 0.3s;
}

.outline-link:hover {
    background: #bbdefb;
    text-decoration: none;
}

.link-btn {
    background: #17a2b8 !important;
    color: white !important;
    font-size: 0.8em !important;
    padding: 4px 8px !important;
}

.link-btn:hover {
    background: #138496 !important;
}

.inline-link {
    color: #007bff;
    text-decoration: underline;
}

.inline-link:hover {
    color: #0056b3;
}

.lock-option {
    margin-top: 16px;
}

.lock-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.lock-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.lock-checkbox label {
    margin: 0;
    cursor: pointer;
    color: #495057;
    font-weight: 500;
}

.history-time {
    color: #888;
    font-size: 0.9rem;
    margin-left: 10px;
}

/* 全分类视图样式 */
.category-section {
    margin-bottom: 30px;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.category-title {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-items {
    display: grid;
    gap: 10px;
}

.outline-item-display {
    background: white;
    border-radius: 10px;
    padding: 15px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.outline-item-display .item-text {
    font-weight: 500;
    color: #333;
}

.sub-items {
    margin-top: 10px;
    padding-left: 20px;
}

.sub-item {
    padding: 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.todo-item-display {
    background: white;
    border-radius: 10px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #28a745;
}

.todo-item-display.completed {
    opacity: 0.7;
    text-decoration: line-through;
}

.locked-icon {
    color: #f39c12;
}

.empty-state {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

.pending-section, .completed-section {
    margin-bottom: 20px;
}

.pending-section h4, .completed-section h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-header {
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.fullscreen-header h2 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.fullscreen-body {
    padding: 30px;
    overflow-y: auto;
    background: white;
    flex: 1;
}

.fullscreen-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fullscreen-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.fullscreen-content {
    height: calc(100% - 80px);
    padding: 20px;
    overflow: auto;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd8, #6a4190);
}

/* 历史记录：按月折叠的时间线 */
.history-container.all-history {
    position: relative;
    max-height: 520px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}

.history-scroll-hint {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 8px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f1f3ff;
    color: #5a63a8;
    font-size: 0.82rem;
    text-align: center;
}

.history-month-nav {
    position: sticky;
    top: 36px;
    z-index: 2;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 0 10px;
    margin-bottom: 4px;
    background: #fff;
}

.history-month-chip {
    flex: 0 0 auto;
    border: 1px solid #dcdff5;
    border-radius: 999px;
    background: #f7f8ff;
    color: #4a5596;
    padding: 5px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all .2s;
}

.history-month-chip:hover {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.history-month {
    border: 1px solid #e4e7f2;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    background: #fff;
}

.history-month-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    text-align: left;
}

.history-month-title {
    font-size: 1rem;
    font-weight: 600;
}

.history-month-title i {
    margin-right: 6px;
    transition: transform .2s;
}

.history-month.collapsed .history-month-title i {
    transform: rotate(-90deg);
}

.history-month-summary {
    font-size: 0.8rem;
    opacity: .9;
    white-space: nowrap;
}

.history-month.collapsed .history-month-body {
    display: none;
}

.history-month-body {
    padding: 4px 12px 12px;
}

.history-day {
    margin-top: 10px;
}

.history-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    color: #495057;
    font-size: 0.88rem;
    font-weight: 600;
    border-bottom: 1px dashed #e4e7f2;
}

.history-day-minutes {
    color: #6c757d;
    font-size: 0.78rem;
    font-weight: 400;
}

.history-month .history-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: #f8f9fa;
    border: 1px solid #eef0f5;
    border-radius: 8px;
    padding: 10px 12px;
    margin: 8px 0 0;
}

.history-month .history-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 260px;
    min-width: 0;
}

.history-category-label {
    flex: 0 0 auto;
    background: #e9ecff;
    color: #4a5596;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 0.75rem;
}

.history-month .history-text {
    color: #2c3e50;
    word-break: break-word;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.76rem;
}

.history-meta span {
    background: #eef1ff;
    color: #4a5596;
    border-radius: 999px;
    padding: 3px 9px;
    white-space: nowrap;
}

.history-meta .history-meta-date {
    background: #e3e8ff;
    color: #33408c;
    font-weight: 600;
}

/* 统计卡：近 7 天迷你趋势 */
.week-spark {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 32px;
    margin-top: 10px;
    flex: 1 1 100%;
}

.week-bar {
    flex: 1 1 0;
    min-width: 4px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, #38ef7d, #11998e);
    opacity: .55;
    transition: opacity .2s;
}

.week-bar.today {
    opacity: 1;
    box-shadow: 0 0 0 1px rgba(17, 153, 142, .35);
}

.stat-card:hover .week-bar {
    opacity: .85;
}

.stat-card:hover .week-bar.today {
    opacity: 1;
}

/* 项目目标完成百分比 */
.goal-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 100%;
    min-width: 0;
}

.goal-progress-wrap .goal-progress {
    flex: 1 1 auto;
    min-width: 0;
}

.goal-percent {
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 600;
    color: #667eea;
}

.history-meta .history-meta-minutes {
    background: #e6f7ee;
    color: #217a4b;
}

@media (max-width: 600px) {
    .history-container.all-history { max-height: 60vh; }
    .history-month-header { flex-wrap: wrap; }
    .history-month .history-item { flex-direction: column; }
}

/* ---------- 手机 / 触屏适配 ---------- */

/* 触屏没有 hover：操作按钮必须常显，点按后也不要残留位移 */
@media (hover: none), (pointer: coarse) {
    .item-actions {
        opacity: 1;
    }

    .outline-item:hover,
    .todo-item:hover {
        background: #f8f9fa;
        transform: none;
    }

    .action-btn:hover {
        background: #dee2e6;
        color: #6c757d;
    }

    .stat-card:hover {
        transform: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    .action-btn {
        width: 38px;
        height: 38px;
    }
}

/* 去掉双击缩放延迟与点按高亮 */
button,
.action-btn,
.tab-btn,
.filter-btn,
.modal-close,
.outline-item,
.todo-item,
.history-month-header {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    .container {
        padding: 10px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .header {
        padding: 18px 16px;
        border-radius: 16px;
        margin-bottom: 16px;
    }

    .header h1 {
        font-size: 1.45rem;
    }

    .header h1 i {
        margin-right: 8px;
    }

    /* 统计卡：两列紧凑，10 张卡不再拉成超长单列 */
    .stats-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 18px;
    }

    .stat-card {
        padding: 12px;
        border-radius: 14px;
        gap: 6px;
    }

    .stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 1rem;
        margin-right: 8px;
    }

    .stat-number {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.72rem;
    }

    .week-spark {
        height: 24px;
        margin-top: 6px;
    }

    /* 模块与分类标签 */
    .module {
        padding: 14px;
        border-radius: 14px;
    }

    .module-header {
        padding: 14px;
    }

    .module-header h2 {
        font-size: 1.05rem;
    }

    .module-content {
        padding: 12px;
    }

    .category-tabs {
        padding: 0 12px 10px;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex: 0 0 auto;
        min-width: 0;
        padding: 7px 12px;
        font-size: 0.82rem;
    }

    /* 项目行：按钮常显并换行，深层缩进收窄 */
    .outline-item {
        padding: 12px;
        flex-wrap: wrap;
        gap: 8px;
        align-items: flex-start;
    }

    .outline-item.level-2 { margin-left: 8px; }
    .outline-item.level-3 { margin-left: 16px; }
    .outline-item.level-4 { margin-left: 24px; }
    .outline-item.level-5 { margin-left: 32px; }

    .item-actions {
        width: 100%;
        opacity: 1;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
    }

    .action-btn {
        width: 36px;
        height: 36px;
    }

    .growth-checkin-btn,
    .growth-expand-btn {
        padding: 0 8px;
        font-size: 0.72rem;
    }

    .outline-meta {
        gap: 6px;
        margin-top: 8px;
    }

    .meta-chip {
        font-size: 0.72rem;
        padding: 2px 7px;
    }

    .goal-progress {
        min-width: 60px;
    }

    .goal-progress-wrap {
        flex-wrap: wrap;
        gap: 6px;
    }

    /* 待办 */
    .todo-item {
        padding: 12px;
        flex-wrap: wrap;
        gap: 8px;
    }

    .todo-item-display {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* 历史记录 */
    .history-filter {
        flex-wrap: wrap;
        gap: 6px;
    }

    .history-filter .filter-btn {
        flex: 1 1 auto;
        padding: 7px 10px;
        font-size: 0.8rem;
    }

    .history-container.all-history {
        max-height: 62vh;
        padding-right: 0;
    }

    .history-month .history-item {
        flex-direction: column;
        align-items: stretch;
    }

    .history-meta {
        font-size: 0.72rem;
    }

    .history-month-header {
        padding: 10px 12px;
    }

    .history-month-title {
        font-size: 0.92rem;
    }

    .history-month-summary {
        font-size: 0.72rem;
    }

    .history-month-nav {
        top: 34px;
    }

    /* 模态框：贴合窄屏，键盘弹出时从顶部开始排布 */
    .modal-overlay {
        align-items: flex-start;
        padding: 12px;
        overflow-y: auto;
    }

    .modal-overlay .modal-content,
    .modal-content {
        width: 100%;
        max-width: none;
        max-height: 86vh;
        border-radius: 14px;
        margin: 0 auto;
    }

    .modal-body {
        padding: 14px;
    }

    /* iOS 上输入框字号小于 16px 会触发聚焦自动放大 */
    input[type="text"],
    input[type="number"],
    input[type="date"],
    input[type="password"],
    textarea,
    select {
        font-size: 16px;
    }

    /* 资源侧栏改为覆盖层，不再挤压正文 */
    .container.sidebar-open {
        margin-right: 0;
    }

    .resource-sidebar {
        width: min(88vw, 360px);
        right: -100%;
    }

    .resource-sidebar.active {
        right: 0;
    }

    /* 思维导图横向滚动，避免节点被压扁 */
    .mindmap-container,
    .mindmap-branches {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mindmap-branch {
        min-width: 240px;
    }
}

@media (max-width: 420px) {
    .stats-panel {
        gap: 8px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
        margin-right: 6px;
    }

    .stat-number {
        font-size: 1.15rem;
    }

    .stat-label {
        font-size: 0.66rem;
    }

    .action-btn {
        width: 34px;
        height: 34px;
    }

    .week-spark {
        height: 20px;
    }
}
