/* 响应式设计 */

/* 平板设备 */
@media (max-width: 1024px) {
  .container {
    padding: 30px;
    max-width: 100%;
  }

  header h1 {
    font-size: 2em;
  }

  .config-section {
    grid-template-columns: 1fr;
  }

  .config-panel {
    max-height: none;
    position: static;
  }

  .csv-section {
    grid-template-columns: 1fr;
  }
}

/* 手机设备 */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .container {
    padding: 20px;
    border-radius: 15px;
  }

  header h1 {
    font-size: 1.6em;
  }

  header p {
    font-size: 1em;
  }

  /* 进度步骤 */
  .progress-steps {
    margin-bottom: 30px;
  }

  .step-number {
    width: 35px;
    height: 35px;
    font-size: 0.9em;
  }

  .step-label {
    font-size: 0.75em;
  }

  /* 上传区域 */
  .upload-section {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .drop-zone {
    padding: 30px 20px;
  }

  .upload-icon {
    font-size: 2.5em;
  }

  /* 配置面板 */
  .config-panel {
    padding: 20px;
  }

  .input-row {
    flex-wrap: wrap;
  }

  .input-row label {
    min-width: 100%;
    margin-bottom: 5px;
  }

  /* 格式选择 */
  .format-options {
    grid-template-columns: 1fr;
  }

  /* 按钮 */
  .button-group {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }

  .btn-large {
    padding: 15px 30px;
    font-size: 1.1em;
  }

  /* CSV表格 */
  #csvPreviewTable {
    max-height: 300px;
    font-size: 0.9em;
  }

  .preview-table th,
  .preview-table td {
    padding: 8px 5px;
    font-size: 0.85em;
  }

  .csv-stats {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* 小屏手机 */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.4em;
  }

  .step-content h2 {
    font-size: 1.4em;
  }

  .drop-zone {
    padding: 20px 15px;
  }

  .drop-zone p {
    font-size: 0.9em;
  }

  .format-card {
    padding: 20px;
  }

  .format-icon {
    font-size: 2.5em;
  }

  .config-panel h3,
  .format-selection h3 {
    font-size: 1.1em;
  }
}

/* 打印样式 */
@media print {
  body {
    background: white;
    padding: 0;
  }

  .container {
    box-shadow: none;
    border-radius: 0;
  }

  .progress-steps,
  .button-group,
  .btn-remove,
  header p {
    display: none;
  }
}

/* 无障碍和深色模式支持 */
@media (prefers-color-scheme: dark) {
  /* 可选：添加深色模式支持 */
  /* 这里暂时留空，可以根据需要添加深色主题 */
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .drop-zone {
    min-height: 150px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-remove {
    min-height: 44px;
    padding: 12px 20px;
  }

  .format-card {
    min-height: 160px;
  }
}
