:root {
  /* 主色调 - 天蓝色系 */
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #7dd3fc;
  
  /* 辅助色 - 翠绿色 */
  --success: #10b981;
  --success-dark: #059669;
  
  /* 中性色 */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  
  /* 警告和错误 */
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", 
               "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem 1rem;
  color: var(--text-primary);
}

.container {
  max-width: 1500px;
  margin: 0 auto;
}

.main-card {
  background: var(--bg-card);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
}

.title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.form-label {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-label.required::after {
  content: " *";
  color: var(--danger);
}

.form-control,
.form-select {
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
  outline: none;
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.input-group {
  display: flex;
  gap: 0.5rem;
}

.input-group .form-control {
  flex: 0 0 200px;
}

.input-group .form-select {
  flex: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  border-radius: 8px;
  padding: 0.875rem 2rem;
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(14, 165, 233, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.alert {
  border-radius: 8px;
  border: none;
  padding: 1.25rem;
  animation: slideDown 0.3s ease-in-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: var(--success-dark);
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

.form-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.draft-info {
  color: var(--success);
  font-weight: 500;
}

.restore-info {
  color: var(--primary);
  font-weight: 500;
}

.footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--border);
  text-align: center;
}

#resultContent {
  font-family: 'Courier New', monospace;
  background: rgba(255, 255, 255, 0.5);
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.d-none {
  display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
  body {
    padding: 1rem 0.5rem;
  }

  .main-card {
    padding: 1.5rem;
    border-radius: 12px;
  }

  .title {
    font-size: 1.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  .input-group .form-control,
  .input-group .form-select {
    flex: 1;
  }
}

/* 加载动画 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-border {
  animation: spin 0.75s linear infinite;
}

