* {
  margin: 0;
  padding: 0;
}

body {
  background: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}

header p {
  font-size: 16px;
  color: #7f8c8d;
  max-width: 95%;
  margin: 0 auto;
}

.main-tool {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
}

.upload-section {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.result-section {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 1.4rem;
  color: #2c3e50;
}

.upload-area {
  border: 2px dashed #3498db;
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background-color: #f8fafc;
  margin-bottom: 20px;
}

.upload-area:hover {
  background-color: #e8f4fe;
  border-color: #2980b9;
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  color: #3498db;
}

.upload-text {
  margin-bottom: 15px;
  color: #7f8c8d;
}

.or-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  color: #95a5a6;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e0e7ee;
}

.or-divider span {
  padding: 0 15px;
}

.paste-hint {
  background: #f0f7ff;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  margin-bottom: 20px;
}

.preview-container {
  margin-top: 20px;
  text-align: center;
}

#imagePreview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin: 15px auto;
  display: none;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

button {
  padding: 15px 20px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-recognize {
  background: #3498db;
  color: white;
}

.btn-recognize:hover {
  background: #2980b9;
}

.btn-reset {
  background: #ecf0f1;
  color: #7f8c8d;
}

.btn-reset:hover {
  background: #d5dbdb;
}

.result-format {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.format-option {
  flex: 1;
  padding: 15px;
  border: 2px solid #e0e7ee;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  user-select: none;
  /* 防止双击选中文字 */
}

.format-option.active {
  border-color: #3498db;
  background: #f0f7ff;
  font-weight: bold;
  transition: all 0.2s ease;
}

.format-icon {
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.result-textarea {
  width: 100%;
  height: 400px;
  padding: 15px;
  border: 1px solid #e0e7ee;
  border-radius: 8px;
  resize: none;
  font-family: monospace;
  font-size: 1rem;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.result-textarea:focus {
  outline: none;
  border-color: #3498db;
}

.btn-copy {
  background: #2ecc71;
  color: white;
}

.btn-copy:hover {
  background: #27ae60;
}

.info-sections {
  display: flex;
  gap: 25px;
  margin-bottom: 25px;
}

.info-box {
  flex: 1;
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-box h2 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.4rem;
}

.step {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
}

.step-number {
  background: #3498db;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3{
  font-size: 1.1rem;
  margin-bottom: 5px;
}


.faq-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.faq-item:last-child {
  margin-bottom: 0px;
  border-bottom: none;
  padding-bottom: 0px;
}

.faq-question {
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 0.95rem;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.notice.show {
  opacity: 1;
}

.progress-container {
  height: 6px;
  background: #ecf0f1;
  border-radius: 3px;
  margin: 20px 0;
  overflow: hidden;
  display: none;
}

.progress-bar {
  height: 100%;
  background: #3498db;
  width: 0%;
  transition: width 0.3s;
}

footer {
  text-align: center;
  color: #7f8c8d;
  font-size: 0.9rem;
}

.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.status-text {
  text-align: center;
  color: #7f8c8d;
  margin: 10px 0;
  font-size: 0.9rem;
}

.process-mode {
  display: flex;
  gap: 10px;
  margin: 20px 0;
}

.mode-option {
  flex: 1;
  padding: 12px;
  border: 2px solid #e0e7ee;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  user-select: none;
}

.mode-option.active {
  border-color: #3498db;
  background: #f0f7ff;
  font-weight: bold;
}

.mode-icon {
  font-size: 1.5rem;
  margin-bottom: 5px;
}
