:root {
    --primary-bg: #0a1929;
    --secondary-bg: #0f2235;
    --card-bg: #162d42;
    --border-color: #254663;
    --text-primary: #e6f7ff;
    --text-secondary: #b8daff;
    --text-muted: #82b1d0;
    --accent-primary: #00d4aa;
    --accent-secondary: #00a887;
    --accent-light: #33e0bb;
    --success: #00c896;
    --warning: #ffb84d;
    --error: #ff6b6b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    color: var(--text-primary); 
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== 左侧侧边栏 ========== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 300px;
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(22, 45, 66, 0.95) 100%);
    border-right: 1px solid var(--border-color);
    padding: 24px 20px;
    transform: translateX(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
}

.sidebar.collapsed {
    transform: translateX(-300px);
    box-shadow: none;
}

.sidebar-toggle {
    position: fixed;
    left: 300px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 80px;
    background: linear-gradient(135deg, var(--card-bg), var(--accent-primary));
    border: 1px solid var(--border-color);
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: white;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
    box-shadow: 4px 0 16px rgba(0, 212, 170, 0.3);
}

.sidebar-toggle:hover {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
    width: 36px;
    box-shadow: 4px 0 24px rgba(0, 212, 170, 0.5);
}

.sidebar.collapsed + .sidebar-toggle {
    left: 0;
    border-radius: 0 12px 12px 0;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.5px;
}

.sidebar-section {
    margin-bottom: 28px;
}

.sidebar-label {
    display: block;
    margin: 0 0 10px 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.9;
}

.sidebar input, 
.sidebar select {
    width: 100%;
    padding: 14px 16px;
    background: rgba(10, 25, 41, 0.6);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.sidebar input:focus, 
.sidebar select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(10, 25, 41, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.15);
}

.sidebar input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

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

/* ========== 可搜索下拉选择框 ========== */
.searchable-select {
    position: relative;
    width: 100%;
}

#channelSearchInput {
    width: 100%;
    padding: 14px 40px 14px 16px;
    background: rgba(10, 25, 41, 0.6);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
    cursor: pointer;
    position: relative;
}

#channelSearchInput:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(10, 25, 41, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.15);
}

#channelSearchInput::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* 添加下拉箭头图标 */
.searchable-select::after {
    content: '▼';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 12px;
    pointer-events: none;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.searchable-select.active::after {
    transform: translateY(-50%) rotate(180deg);
    color: var(--accent-primary);
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--card-bg) 0%, rgba(22, 45, 66, 0.98) 100%);
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 212, 170, 0.2);
    z-index: 100;
    display: none;
    backdrop-filter: blur(20px);
}

.select-dropdown.active {
    display: block;
    animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(37, 70, 99, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(0, 212, 170, 0.1);
    color: var(--text-primary);
    padding-left: 20px;
}

.dropdown-item.active {
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 168, 135, 0.15));
    color: var(--text-primary);
    border-left: 3px solid var(--accent-primary);
}

.dropdown-item::before {
    content: '📡';
    font-size: 16px;
}

.dropdown-empty {
    padding: 20px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.channel-item {
    padding: 14px 16px;
    background: rgba(10, 25, 41, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.channel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 170, 0.1), transparent);
    transition: left 0.5s;
}

.channel-item:hover::before {
    left: 100%;
}

.channel-item:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.2);
}

.channel-item.active {
    border-color: var(--accent-primary) !important;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.2), rgba(0, 168, 135, 0.15)) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 20px rgba(0, 212, 170, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateX(0);
}

.sidebar-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    margin-top: 12px;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.sidebar-btn:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.5);
    transform: translateY(-2px);
}

.sidebar-btn:active {
    transform: translateY(0);
}

/* ========== 主内容区 ========== */
.main-container {
    min-height: 100vh;
    padding: 40px 340px 40px 340px;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-container.expanded {
    padding-left: 40px;
    padding-right: 40px;
}

.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 16px;
}

.action-bar {
    display: flex;
    gap: 16px;
    margin: 0 auto 24px;
    width: 100%;
    max-width: 850px;
    justify-content: flex-start;
}

/* 视图容器 */
.view-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.btn-primary,
.btn-danger {
    padding: 12px 24px;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 3px 12px rgba(0, 212, 170, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    box-shadow: 0 5px 18px rgba(0, 212, 170, 0.4);
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #cc5555);
    box-shadow: 0 3px 12px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff8585, #ff6b6b);
    box-shadow: 0 5px 18px rgba(255, 107, 107, 0.4);
    transform: translateY(-1px);
}

.key-list-container {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 14px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.key-list-header {
    padding: 20px 24px;
    background: rgba(10, 25, 41, 0.5);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.key-list-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.key-count {
    background: var(--accent-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.key-list-body {
    padding: 16px 20px;
    min-height: 450px;
    max-height: calc(100vh - 350px);
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state-hint {
    font-size: 14px;
    opacity: 0.7;
}

/* ========== 分页控件样式 ========== */
.pagination-container {
    margin-top: 32px;
    padding: 24px;
    background: rgba(10, 25, 41, 0.3);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-radius: 0 0 14px 14px;
}

.pagination-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-info {
    font-size: 14px;
    color: var(--text-muted);
}

.page-size-select {
    padding: 8px 16px;
    background: rgba(10, 25, 41, 0.8);
    border: 2px solid var(--accent-primary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    outline: none;
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.2);
}

.page-size-select:hover {
    border-color: var(--accent-light);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.page-size-select:focus {
    border-color: var(--accent-light);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.2);
}

.pagination-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn {
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 168, 135, 0.05));
    border: 2px solid var(--accent-primary);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 212, 170, 0.2);
}

.page-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.4);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
}

.page-number {
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 25, 41, 0.6);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-number:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.page-number.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.5);
    transform: scale(1.05);
}

.page-ellipsis {
    color: var(--text-muted);
    font-size: 14px;
    padding: 0 4px;
}

/* ========== 弹窗样式 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px;
    background: rgba(10, 25, 41, 0.5);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: var(--text-primary);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--error);
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    margin: 0 0 10px 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 18px;
    background: rgba(10, 25, 41, 0.6);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(10, 25, 41, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.15);
}

.form-textarea {
    min-height: 280px;
    resize: vertical;
    line-height: 1.6;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
}

.mode-selector {
    display: flex;
    gap: 12px;
}

.mode-option {
    flex: 1;
    padding: 14px;
    background: rgba(10, 25, 41, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-secondary);
}

.mode-option:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.mode-option.active {
    border-color: var(--accent-primary) !important;
    background: rgba(0, 212, 170, 0.15) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 16px rgba(0, 212, 170, 0.3);
}

.modal-footer {
    padding: 20px 24px;
    background: rgba(10, 25, 41, 0.3);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-btn-submit {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.3);
}

.modal-btn-submit:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    box-shadow: 0 6px 20px rgba(0, 212, 170, 0.5);
    transform: translateY(-2px);
}

/* ========== 手动同步卡片样式 ========== */
.sync-card {
    width: 100%;
    max-width: 850px;
    margin: 0 auto;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(0, 212, 170, 0.1);
    transition: all 0.3s ease;
}

.sync-card:hover {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(0, 212, 170, 0.2);
    transform: translateY(-2px);
}

.sync-card-header {
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(0, 212, 170, 0.1), rgba(0, 168, 135, 0.05));
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.sync-icon-wrapper {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
    flex-shrink: 0;
}

.sync-icon {
    font-size: 26px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.sync-header-text h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.sync-header-text p {
    color: var(--text-muted);
    font-size: 13px;
    margin: 0;
    line-height: 1.4;
}

.sync-card-body {
    padding: 24px;
}

.sync-textarea {
    width: 100%;
    min-height: 220px;
    padding: 16px;
    background: rgba(10, 25, 41, 0.6);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sync-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(10, 25, 41, 0.9);
    box-shadow: 0 0 0 4px rgba(0, 212, 170, 0.15);
}

.sync-textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.form-hint {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.label-icon {
    display: inline-block;
    margin-right: 6px;
    font-size: 14px;
}

.mode-selector {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.mode-option {
    flex: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(10, 25, 41, 0.5);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.mode-option:hover {
    border-color: var(--accent-primary);
}

.mode-option input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
    cursor: pointer;
}

.mode-option:has(input[type="radio"]:checked) {
    border-color: var(--accent-primary);
    background: rgba(0, 212, 170, 0.05);
}

.mode-option input[type="radio"]:checked + span {
    color: var(--accent-primary);
    font-weight: 700;
}

.mode-option span {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.sync-footer {
    margin-top: 24px;
}

.btn-sync-submit {
    width: 100%;
    padding: 16px 28px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0, 212, 170, 0.3);
    letter-spacing: 0.3px;
}

.btn-sync-submit:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-primary));
    box-shadow: 0 8px 24px rgba(0, 212, 170, 0.4);
    transform: translateY(-2px);
}

.btn-sync-submit:active {
    transform: translateY(0);
}

.btn-sync-submit .btn-icon {
    font-size: 20px;
}

.btn-sync-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* ========== Toast 提示 ========== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 18px 56px 18px 24px;
    border-radius: 14px;
    color: white;
    font-weight: 500;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: slideInRight 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.toast.success { background: linear-gradient(135deg, #00c896, #00a87a); }
.toast.error { background: linear-gradient(135deg, #ff6b6b, #cc5555); }
.toast.warning { background: linear-gradient(135deg, #ffb84d, #cc943d); }
.toast.info { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); }

/* ========== 动画 ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(120%) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

/* ========== 自定义 Tooltip ========== */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::before,
[data-tooltip]::after {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 9999;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    background: linear-gradient(135deg, rgba(22, 45, 66, 0.98), rgba(15, 34, 53, 0.98));
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 212, 170, 0.2);
    backdrop-filter: blur(10px);
    margin-bottom: 8px;
    line-height: 1.5;
}

[data-tooltip]::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(22, 45, 66, 0.98);
    margin-bottom: 2px;
}

[data-tooltip]:hover::before,
[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

[data-tooltip]:active::before,
[data-tooltip]:active::after {
    transform: translateX(-50%) translateY(-2px);
}

/* 按钮特殊优化 */
.btn-primary[data-tooltip]:hover,
.btn-danger[data-tooltip]:hover {
    transform: translateY(-2px);
}

.btn-primary[data-tooltip]:hover::before,
.btn-danger[data-tooltip]:hover::after {
    transform: translateX(-50%) translateY(-6px);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .sidebar {
        width: 260px;
    }
    
    .sidebar-toggle {
        left: 260px;
        width: 28px;
        height: 60px;
    }
    
    .main-container {
        padding: 20px;
        padding-left: 280px;
    }
    
    .main-container.expanded {
        padding-left: 20px;
    }
    
    .modal {
        width: 95%;
        max-height: 95vh;
    }
}

/* ========== 帮助文档样式 ========== */
.help-content {
    color: var(--text-primary);
    line-height: 1.8;
}

.help-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.help-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.help-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 8px 0;
}

.help-section p {
    color: var(--text-secondary);
    margin: 8px 0;
    line-height: 1.7;
}

.help-section ol,
.help-section ul {
    margin: 12px 0;
    padding-left: 24px;
}

.help-section li {
    margin: 8px 0;
    color: var(--text-secondary);
    line-height: 1.7;
}

.help-item {
    background: rgba(10, 25, 41, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.help-item:hover {
    border-color: var(--accent-primary);
    background: rgba(10, 25, 41, 0.6);
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.1);
}

.help-tip {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(0, 212, 170, 0.08);
    border-left: 3px solid var(--accent-primary);
    border-radius: 6px;
    font-size: 14px;
}

.help-tip strong {
    color: var(--accent-primary);
    display: block;
    margin-bottom: 8px;
}

.help-tip ol,
.help-tip ul {
    margin: 8px 0;
    padding-left: 20px;
}

.help-tip li {
    margin: 6px 0;
    font-size: 13px;
}

.help-warning {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid var(--error);
    border-radius: 6px;
    font-size: 14px;
    color: var(--error);
}

.status-explanation {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(10, 25, 41, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.status-item:hover {
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.status-unused {
    background: rgba(130, 177, 208, 0.2);
    color: #82b1d0;
    border: 1px solid rgba(130, 177, 208, 0.4);
}

.status-using {
    background: rgba(0, 212, 170, 0.2);
    color: #00d4aa;
    border: 1px solid rgba(0, 212, 170, 0.4);
}

.status-invalid {
    background: rgba(255, 107, 107, 0.2);
    color: #ff6b6b;
    border: 1px solid rgba(255, 107, 107, 0.4);
}

.tips-list {
    list-style: none;
    padding: 0;
}

.tips-list li {
    position: relative;
    padding: 10px 16px 10px 40px;
    margin: 8px 0;
    background: rgba(255, 184, 77, 0.08);
    border: 1px solid rgba(255, 184, 77, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tips-list li::before {
    content: '💡';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.tips-list li:hover {
    background: rgba(255, 184, 77, 0.12);
    border-color: rgba(255, 184, 77, 0.4);
    transform: translateX(4px);
}

.faq-item {
    background: rgba(10, 25, 41, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--accent-primary);
    background: rgba(10, 25, 41, 0.6);
}

.faq-item h4 {
    color: var(--accent-primary);
    margin: 0 0 8px 0;
    font-size: 15px;
}

.faq-item p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 14px;
    line-height: 1.7;
}
