.nav-layout { display: flex; gap: 20px; }
.nav-sidebar { width: 30%; min-width: 280px; max-width: 350px; flex-shrink: 0; }
.nav-content { flex: 1; min-width: 0; }

.category-list {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.category-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.category-list-title { font-size: 16px; font-weight: 600; color: var(--text-primary); }

.category-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 5px;
}

.category-item:hover { background: rgba(102, 126, 234, 0.1); }
.category-item.active { background: rgba(102, 126, 234, 0.15); }
.category-item-icon { font-size: 18px; }

.category-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.category-item-count {
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(0,0,0,0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.links-container {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.links-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.links-category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.links-actions { display: flex; gap: 10px; }

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

.link-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.link-card:hover { background: rgba(102, 126, 234, 0.1); }

.link-card-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 8px;
}

.link-card-info { flex: 1; min-width: 0; }

.link-card-name {
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.category-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.category-card:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(0,0,0,0.15); }

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-actions { display: flex; gap: 5px; }

.action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
}

.action-btn:hover { color: var(--accent-color); }

.links-list { display: flex; flex-direction: column; gap: 10px; }

.link-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: var(--text-primary);
}

.link-item:hover { background: rgba(102, 126, 234, 0.1); }

.link-icon {
    font-size: 22px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.15);
    border-radius: 8px;
}

.link-info { flex: 1; }

.link-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-desc { font-size: 12px; color: var(--text-secondary); margin-top: 3px; }

.add-link-btn {
    width: 100%;
    padding: 12px;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.add-link-btn:hover { border-color: var(--accent-color); color: var(--accent-color); }

.edit-mode-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s;
    z-index: 50;
}

.edit-mode-btn:hover { transform: scale(1.1); }
.edit-mode-btn.active { background: var(--error-color); }

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: toastSlideIn 0.3s ease-out;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toast-success { background: linear-gradient(135deg, #52c41a, #389e0d); }
.toast-error { background: linear-gradient(135deg, #ff4d4f, #cf1322); }
.toast-info { background: linear-gradient(135deg, #1890ff, #096dd9); }
.toast-warning { background: linear-gradient(135deg, #faad14, #d48806); }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.add-btn, .submit-btn {
    background: white;
    color: var(--accent-color);
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
}

.add-btn:hover, .submit-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stats-bar { display: flex; gap: 20px; margin-bottom: 30px; }

.stat-card {
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex: 1;
    text-align: center;
}

.stat-value { font-size: 32px; font-weight: bold; color: var(--accent-color); }
.stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 5px; }

.memo-list { display: flex; flex-direction: column; gap: 15px; }

.memo-item {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s;
}

.memo-item:hover { transform: translateX(5px); }

.memo-checkbox {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
}

.memo-checkbox.completed {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.memo-content { flex: 1; }

.memo-title { font-size: 16px; font-weight: 500; color: var(--text-primary); margin-bottom: 5px; }
.memo-item.completed .memo-title { text-decoration: line-through; color: var(--text-secondary); }
.memo-time { font-size: 12px; color: var(--text-secondary); }

.memo-actions { display: flex; gap: 10px; opacity: 0; transition: opacity 0.3s; }
.memo-item:hover .memo-actions { opacity: 1; }

.form-textarea { height: 120px; resize: vertical; }

.filter-tabs { display: flex; gap: 10px; margin-bottom: 20px; }

.filter-tab {
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-tab.active { background: white; color: var(--accent-color); }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stats-grid .stat-card { background: var(--card-bg); padding: 25px; border-radius: 15px; box-shadow: var(--shadow); }
.stats-grid .stat-icon { font-size: 32px; margin-bottom: 10px; }
.stats-grid .stat-value { font-size: 36px; font-weight: bold; color: var(--accent-color); }
.stats-grid .stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 5px; }

.chart-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.chart-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; }

.bar-chart { display: flex; align-items: flex-end; gap: 15px; height: 200px; }

.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }

.bar {
    width: 100%;
    background: linear-gradient(180deg, var(--accent-color), #a855f7);
    border-radius: 8px 8px 0 0;
    transition: height 0.5s ease;
}

.bar-label { font-size: 12px; color: var(--text-secondary); text-align: center; }
.bar-value { font-size: 14px; font-weight: 600; color: var(--text-primary); }

.top-links {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.top-links-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin-bottom: 20px; }

.link-rank {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.link-rank:last-child { border-bottom: none; }

.rank-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.rank-number.top3 { background: #f59e0b; }
.rank-number.top2 { background: #9ca3af; }
.rank-number.top1 { background: #fbbf24; }

.link-clicks { font-size: 16px; font-weight: bold; color: var(--accent-color); }

.category-tabs { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; }

.category-tab {
    padding: 10px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-tab.active { background: white; color: var(--accent-color); }

.link-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0;
}

.link-item:hover .link-add-btn { opacity: 1; }
.link-add-btn:hover { transform: scale(1.1); }

.login-hint { text-align: center; color: rgba(255,255,255,0.8); margin-bottom: 30px; }

.login-btn {
    background: white;
    color: var(--accent-color);
    border: none;
    padding: 10px 24px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
}

.profile-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
}

.profile-info h2 { font-size: 20px; color: var(--text-primary); margin-bottom: 5px; }
.profile-info p { font-size: 14px; color: var(--text-secondary); }

.section-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-bottom: 15px; }

.theme-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 20px; }

.theme-option {
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.theme-option:hover { border-color: var(--accent-color); }
.theme-option.active { border-color: var(--accent-color); background: rgba(102, 126, 234, 0.1); }

.theme-icon { font-size: 24px; margin-bottom: 8px; }
.theme-name { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.search-engine-list { display: flex; flex-direction: column; gap: 10px; }

.search-engine-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.search-engine-item:hover { border-color: var(--accent-color); }
.search-engine-item.active { border-color: var(--accent-color); background: rgba(102, 126, 234, 0.1); }

.engine-icon { font-size: 20px; }
.engine-info { flex: 1; }
.engine-name { font-size: 14px; color: var(--text-primary); font-weight: 500; }

.danger-section { margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border-color); }

.danger-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.danger-btn:hover { background: rgba(255, 77, 79, 0.1); }

/* ========== 首页补充样式 ========== */

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 16px;
}

.modal-body {
    padding: 10px 0;
}

.settings-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.settings-section:last-child {
    border-bottom: none;
}

/* 公告样式 */
.announcement-bar {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.9), rgba(255, 152, 0, 0.9));
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(255, 193, 7, 0.3);
}

.announcement-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.announcement-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s;
}

.announcement-close:hover {
    background: rgba(255,255,255,0.4);
}

/* 消息中心样式 */
.message-container {
    max-height: 500px;
    overflow-y: auto;
    padding: 10px;
}

.message-item {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.message-item:hover {
    transform: translateX(5px);
}

.message-item.unread {
    border-left-color: var(--accent-color);
    background: rgba(102, 126, 234, 0.1);
}

.message-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.message-preview {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.message-detail-content {
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.8;
}

.message-detail-time {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

/* 隐私分类样式 */
.private-category {
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.lock-icon {
    font-size: 12px;
    margin-left: 5px;
    opacity: 0.7;
}

.private-hint {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.private-hint:hover {
    color: var(--accent-color);
    transform: scale(1.02);
}

/* 图标选择器样式 */
.icon-picker {
    display: none;
    margin-top: 10px;
    background: var(--card-bg);
    border-radius: 10px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.icon-picker.show {
    display: block;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
}

.icon-item {
    font-size: 24px;
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
}

.icon-item:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.2);
}

/* 徽章样式 */
.badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--error-color);
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav-grid { grid-template-columns: 1fr; }
    .nav-layout { flex-direction: column; }
    .nav-sidebar { width: 100%; min-width: auto; max-width: none; }
    .links-grid { grid-template-columns: 1fr; }
}
