/* styles.css */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  color: #333;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 40px;
  color: white;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  background: white;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

section {
  margin-bottom: 30px;
}

section h3 {
  color: #4a5568;
  margin-bottom: 15px;
  font-size: 1.3rem;
}

/* 卡密输入区域样式 */
.card-key-section {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

.card-key-input {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 15px;
}

.card-key-input input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  font-size: 16px;
  font-family: 'Courier New', monospace;
  background: white;
  transition: border-color 0.2s;
}

.card-key-input input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.card-key-input input::placeholder {
  font-family: inherit;
  color: #6c757d;
}

.card-info {
  padding: 10px 15px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
}

.card-info.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.card-info.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.card-info.warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}



/* 上传区域样式 */
.upload-area {
  border: 3px dashed #cbd5e0;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f7fafc;
}

.upload-area:hover {
  border-color: #667eea;
  background: #edf2f7;
}

.upload-area.dragover {
  border-color: #667eea;
  background: #e6fffa;
  transform: scale(1.02);
}

.upload-content .upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.upload-content p {
  color: #718096;
  font-size: 1.1rem;
}

.file-info {
  margin-top: 15px;
  padding: 12px;
  background: #e6fffa;
  border-radius: 8px;
  border-left: 4px solid #38b2ac;
}

.file-info p {
  color: #2d3748;
  font-weight: 500;
}

/* 批量文件列表样式 */
.batch-files {
  margin-top: 20px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.batch-files h4 {
  margin-bottom: 15px;
  color: #2d3748;
  font-size: 1.1rem;
}

.file-list {
  max-height: 300px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: white;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.file-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-item.processing {
  border-color: #667eea;
  background: #edf2f7;
}

.file-item.success {
  border-color: #48bb78;
  background: #f0fff4;
}

.file-item.error {
  border-color: #f56565;
  background: #fed7d7;
}

.file-item-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.file-item-name {
  font-weight: 500;
  color: #2d3748;
}

.file-item-status {
  font-size: 0.9rem;
  color: #718096;
}

.file-item-result {
  font-size: 0.85rem;
  color: #4a5568;
  margin-top: 4px;
}

.file-item-actions {
  display: flex;
  gap: 8px;
}

.file-item-actions button {
  padding: 4px 8px;
  border: none;
  border-radius: 4px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-remove {
  background: #fed7d7;
  color: #c53030;
}

.btn-remove:hover {
  background: #feb2b2;
}

.batch-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-outline {
  background: transparent;
  border: 2px solid #e2e8f0;
  color: #4a5568;
}

.btn-outline:hover {
  border-color: #cbd5e0;
  background: #f7fafc;
}

/* 按钮样式 */
.actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn {
  padding: 12px 30px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

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

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

/* 加载动画 */
.loading {
  text-align: center;
  padding: 30px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading p {
  color: #718096;
  font-size: 1.1rem;
}

/* 结果显示样式 */
.result-card {
  background: #f7fafc;
  border-radius: 12px;
  padding: 25px;
  border: 1px solid #e2e8f0;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #e2e8f0;
}

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

.result-item label {
  font-weight: 600;
  color: #2d3748;
  min-width: 80px;
}

.result-item span {
  color: #4a5568;
  font-size: 1.1rem;
  text-align: right;
  flex: 1;
}

/* 错误信息样式 */
.error {
  margin-top: 20px;
}

.error-message {
  background: #fed7d7;
  border: 1px solid #feb2b2;
  border-radius: 8px;
  padding: 15px;
  color: #c53030;
  font-weight: 500;
}




/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  header h1 {
    font-size: 2rem;
  }

  main {
    padding: 20px;
  }

  .actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 200px;
  }

  .card-key-input {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .card-key-input input {
    width: 100%;
  }

  .card-key-input .btn {
    width: 100%;
    max-width: none;
  }

}

/* 批量文件管理样式 */
.batch-files {
  margin-top: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.batch-files h4 {
  margin: 0 0 15px 0;
  color: #495057;
  font-size: 1.1rem;
}

.file-list {
  max-height: 400px;
  overflow-y: auto;
  margin-bottom: 15px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  margin-bottom: 10px;
  background: white;
  border-radius: 8px;
  border: 1px solid #dee2e6;
  transition: all 0.2s ease;
}

.file-item:hover {
  border-color: #667eea;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.file-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-name {
  font-weight: 500;
  color: #2d3748;
  font-size: 0.95rem;
}

.file-details {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  color: #718096;
}

.file-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
}

.status-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.pending {
  background-color: #fbbf24;
}

.status-indicator.processing {
  background-color: #3b82f6;
  animation: pulse 1.5s infinite;
}

.status-indicator.success {
  background-color: #10b981;
}

.status-indicator.error {
  background-color: #ef4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.file-result {
  margin-top: 8px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.85rem;
  border-left: 3px solid #10b981;
}

.file-result.error {
  border-left-color: #ef4444;
  background: #fef2f2;
  color: #dc2626;
}



.batch-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.work-history ul {
  list-style-type: none;
}

.education-history ul {
  list-style-type: none;
}

/* 模态弹窗样式 */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h3 {
  margin: 0 0 20px 0;
  color: #e74c3c;
  text-align: center;
  font-size: 1.2em;
}

.batch-stats {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.batch-stats p {
  margin: 5px 0;
  font-weight: 500;
}

.new-card-input {
  margin-bottom: 20px;
}

.new-card-input p {
  margin-bottom: 10px;
  font-weight: 500;
}

.new-card-input input {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
}

.new-card-input input:focus {
  outline: none;
  border-color: #3498db;
}

.modal-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.modal-actions .btn {
  flex: 1;
  max-width: 150px;
}

/* 文件状态样式扩展 */
.file-item.paused {
  border-left: 4px solid #f39c12;
  background-color: #fef9e7;
}

.file-item.cancelled {
  border-left: 4px solid #95a5a6;
  background-color: #f8f9fa;
  opacity: 0.7;
}

.status-indicator.paused {
  background-color: #f39c12;
}

.status-indicator.cancelled {
  background-color: #95a5a6;
}

/* 作者信息样式 */
.author-footer {
  margin-top: 0px;
  padding: 20px 0;
  text-align: center;
}

.author-info p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin: 0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.author-info p:hover {
  color: white;
  transition: color 0.3s ease;
}

/* 导出确认弹窗特定样式 */
#export-confirm-modal .modal-content {
  padding: 40px 30px;
}

#export-confirm-modal .modal-content h3 {
  margin-bottom: 25px;
}

#export-confirm-modal .modal-content p {
  margin-bottom: 30px;
  font-size: 1.1rem;
  line-height: 1.5;
  color: #495057;
  text-align: center;
}

#export-confirm-modal .modal-actions {
  margin-top: 20px;
}



