/* Anki统一导出弹窗样式 — 使用主题变量，黑白灰简约 */
.anki-export-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.anki-export-overlay.active {
    display: flex;
}

.anki-export-modal {
    background: var(--t-bg-card, #fff);
    border-radius: 14px;
    width: 400px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: anki-modal-in 0.25s ease;
}
@keyframes anki-modal-in {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.anki-export-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 10px;
}
.anki-export-header h3 {
    margin: 0;
    color: var(--t-text);
    font-size: 16px;
    font-weight: 600;
}
.anki-export-close {
    background: var(--t-bg-hover);
    border: none;
    color: var(--t-text-muted);
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.anki-export-close:hover {
    background: var(--t-bg-active);
    color: var(--t-text);
}

.anki-export-body {
    padding: 6px 20px 18px;
}

/* 工具栏 */
.anki-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.anki-select-all-btn {
    background: var(--t-bg-hover);
    border: none;
    color: var(--t-text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.15s;
}
.anki-select-all-btn:hover {
    background: var(--t-bg-active);
    color: var(--t-text);
}
.anki-selected-count {
    color: var(--t-text-dimmer);
    font-size: 11px;
}

/* 条目列表 */
.anki-item-list {
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--t-bg-active) transparent;
}
.anki-item-list::-webkit-scrollbar { width: 4px; }
.anki-item-list::-webkit-scrollbar-track { background: transparent; }
.anki-item-list::-webkit-scrollbar-thumb { background: var(--t-bg-active); border-radius: 3px; }

.anki-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 3px;
    background: var(--t-bg-hover);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.anki-item:hover {
    background: var(--t-bg-active);
}
.anki-item.selected {
    background: var(--t-bg-active);
}

.anki-item-checkbox {
    width: 16px; height: 16px;
    border-radius: 4px;
    border: 1.5px solid var(--t-text-dimmer);
    flex-shrink: 0;
    margin-top: 1px;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.anki-item-checkbox.checked {
    background: var(--t-text);
    border-color: var(--t-text);
}
.anki-item-checkbox.checked::after {
    content: '✓';
    color: var(--t-bg);
    font-size: 10px;
    font-weight: bold;
}

.anki-item-info {
    flex: 1;
    min-width: 0;
}
.anki-item-text {
    color: var(--t-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.anki-item-detail {
    color: var(--t-text-dimmer);
    font-size: 10px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anki-loading {
    text-align: center;
    color: var(--t-text-dimmer);
    padding: 30px 0;
    font-size: 12px;
}

/* 导出按钮 */
.anki-export-btn {
    width: 100%;
    padding: 11px;
    margin-top: 12px;
    background: var(--t-text);
    color: var(--t-bg);
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.anki-export-btn:hover {
    opacity: 0.85;
}
.anki-export-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* 进度状态 */
.anki-export-progress {
    display: none;
    text-align: center;
    padding: 20px 0 8px;
}
.anki-export-progress.active { display: block; }
.anki-export-progress-ring {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    position: relative;
}
.anki-export-progress-ring svg { transform: rotate(-90deg); }
.anki-export-progress-ring circle { fill: none; stroke-width: 4; }
.anki-export-progress-ring .bg { stroke: var(--t-bg-hover); }
.anki-export-progress-ring .fg { stroke: var(--t-text); stroke-linecap: round; transition: stroke-dashoffset 0.3s; }
.anki-export-progress-text {
    color: var(--t-text);
    font-size: 13px; font-weight: 500; margin-bottom: 4px;
}
.anki-export-progress-detail {
    color: var(--t-text-dimmer);
    font-size: 11px;
}

/* 成功状态 */
.anki-export-success {
    display: none;
    text-align: center;
    padding: 20px 0 8px;
}
.anki-export-success.active { display: block; }
.anki-export-success-icon {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    background: var(--t-bg-hover);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    color: var(--t-text);
    animation: anki-success-pop 0.4s ease;
}
@keyframes anki-success-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}
.anki-export-success-text {
    color: var(--t-text);
    font-size: 14px; font-weight: 600; margin-bottom: 4px;
}
.anki-export-success-detail {
    color: var(--t-text-dimmer);
    font-size: 12px; margin-bottom: 14px;
}
.anki-export-done-btn {
    width: 100%;
    padding: 10px;
    background: var(--t-bg-hover);
    color: var(--t-text);
    border: none;
    border-radius: 10px;
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}
.anki-export-done-btn:hover {
    background: var(--t-bg-active);
}
