/* Anki统一导出弹窗样式 */
.anki-export-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}
.anki-export-overlay.active {
    display: flex;
}

.anki-export-modal {
    background: linear-gradient(135deg, #1e1e24, #14141a);
    border-radius: 16px;
    width: 420px;
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    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: 20px 24px 12px;
}
.anki-export-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
}
.anki-export-close {
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.anki-export-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.anki-export-body {
    padding: 8px 24px 20px;
}

/* 工具栏 */
.anki-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.anki-select-all-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.7);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.anki-select-all-btn:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}
.anki-selected-count {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* 条目列表 */
.anki-item-list {
    max-height: 360px;
    overflow-y: auto;
    margin-bottom: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.anki-item-list::-webkit-scrollbar {
    width: 5px;
}
.anki-item-list::-webkit-scrollbar-track {
    background: transparent;
}
.anki-item-list::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.anki-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
    background: rgba(255,255,255,0.04);
    border: 1.5px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}
.anki-item:hover {
    background: rgba(255,255,255,0.07);
}
.anki-item.selected {
    border-color: rgba(76, 175, 80, 0.5);
    background: rgba(76, 175, 80, 0.08);
}

.anki-item-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid rgba(255,255,255,0.25);
    flex-shrink: 0;
    margin-top: 1px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.anki-item-checkbox.checked {
    background: #4CAF50;
    border-color: #4CAF50;
}
.anki-item-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: bold;
}

.anki-item-info {
    flex: 1;
    min-width: 0;
}
.anki-item-text {
    color: white;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.anki-item-detail {
    color: rgba(255,255,255,0.45);
    font-size: 11px;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.anki-loading {
    text-align: center;
    color: rgba(255,255,255,0.5);
    padding: 30px 0;
    font-size: 13px;
}

/* 导出按钮 */
.anki-export-btn {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.anki-export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
}
.anki-export-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 进度状态 */
.anki-export-progress {
    display: none;
    text-align: center;
    padding: 20px 0 8px;
}
.anki-export-progress.active {
    display: block;
}
.anki-export-progress-ring {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    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: rgba(255,255,255,0.1);
}
.anki-export-progress-ring .fg {
    stroke: #4CAF50;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s;
}
.anki-export-progress-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}
.anki-export-progress-detail {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
}

/* 成功状态 */
.anki-export-success {
    display: none;
    text-align: center;
    padding: 20px 0 8px;
}
.anki-export-success.active {
    display: block;
}
.anki-export-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #4CAF50;
    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: white;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}
.anki-export-success-detail {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    margin-bottom: 16px;
}
.anki-export-done-btn {
    width: 100%;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}
.anki-export-done-btn:hover {
    background: rgba(255,255,255,0.15);
}
