:root {
  --primary-color: #00489D;
  --secondary-color: #FC8416;
  --bg-color: #f9f9f9;
  --text-color: #333;
  --border-color: #ddd;
  --input-bg: #fff;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --primary-hover: #1e3a8a;
  --secondary-hover: #2563eb;
  --destructive-color: #dc2626;
  --destructive-hover: #b91c1c;
  --background-color: #ffffff;
  --accent-color: #f1f5f9;
  --accent-foreground: #1e293b;
  --transition-all: all 0.3s ease;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --border-radius: 0.375rem;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

header {
  text-align: center;
  margin-bottom: 2rem;
}

header h1 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-family: 'KNYuanmo', sans-serif;
  font-size: 2.5rem;
}

header p {
  color: #666;
  font-family: 'KNYuanmo', sans-serif;
  font-size: 1.2rem;
}

main {
  background-color: var(--input-bg);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--primary-color);
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background-color: var(--input-bg);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0, 72, 157, 0.2);
}

.email-input-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-input-container input {
  flex: 1;
}

.at-symbol {
  display: inline-block;
  padding: 0 0.5rem;
  background-color: #f0f0f0;
  border: 1px solid var(--border-color);
  border-left: none;
  border-right: none;
  line-height: 2.75rem;
}

.email-input-container select {
  width: auto;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.file-upload-container {
  position: relative;
  margin-bottom: 1rem;
  min-height: 44px;
}

input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 44px;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.file-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background-color: var(--accent-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--accent-foreground);
  cursor: pointer;
  transition: var(--transition);
}

.file-upload-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--primary-color);
}

.file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background-color: var(--accent-color);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
}

.file-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.file-item button {
  padding: 0.25rem;
  color: var(--destructive-color);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.file-item button:hover {
  color: var(--destructive-hover);
  transform: scale(1.1);
}

/* 添加进度条样式 */
.progress-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin-top: 0.5rem;
}

.progress-bar {
  height: 0.5rem;
  background-color: var(--primary-color);
  border-radius: 0.25rem;
  transition: width 0.2s ease;
  width: 0%;
}

.progress-text {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 500;
  text-align: right;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
}

button[type="submit"] {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

button[type="submit"]:hover {
  background-color: #003d84;
}

.result-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  z-index: 100;
  max-width: 90%;
  width: 500px;
}

.result-container.hidden {
  display: none;
}

.result.success {
  color: #28a745;
}

.result.error {
  color: #dc3545;
}

#closeResultBtn {
  margin-top: 1rem;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

#closeResultBtn:hover {
  background-color: #e05e00;
}

footer {
  text-align: center;
  color: #666;
  font-size: 0.875rem;
  margin-top: 2rem;
}

.random-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  background-color: var(--accent-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  color: var(--accent-foreground);
  cursor: pointer;
  transition: var(--transition);
}

.random-btn:hover {
  background-color: var(--accent-color);
  border-color: var(--primary-color);
}

.input-with-button,
.textarea-with-button {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.input-with-button input,
.textarea-with-button textarea {
  flex: 1;
}

@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }

  main {
    padding: 1.5rem;
  }

  .email-input-container,
  .input-with-button,
  .textarea-with-button {
    flex-direction: column;
    gap: 0.75rem;
  }

  .random-btn {
    width: 100%;
  }

  .email-input-container input,
  .email-input-container select,
  .input-with-button input,
  .textarea-with-button textarea {
    width: 100%;
  }

  .at-symbol {
    display: none;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--border-radius);
  font-weight: 500;
  transition: var(--transition-all);
  cursor: pointer;
  font-size: 0.875rem;
  height: 2.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  background-color: var(--background-color);
  color: var(--accent-foreground);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  position: relative;
}

.btn:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

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

.btn-sm {
  height: 2.25rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  font-size: 0.75rem;
}

.btn-lg {
  height: 3rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  font-size: 1rem;
}

.btn-icon {
  height: 2.5rem;
  width: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
  border: none;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: var(--primary-hover);
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
  box-shadow: var(--shadow-md);
  border: none;
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-secondary:active {
  background-color: var(--secondary-hover);
  transform: translateY(0);
}

.btn-destructive {
  background-color: var(--destructive-color);
  color: white;
  box-shadow: var(--shadow-md);
  border: none;
}

.btn-destructive:hover {
  background-color: var(--destructive-hover);
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.btn-destructive:active {
  background-color: var(--destructive-hover);
  transform: translateY(0);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-color);
  box-shadow: none;
}

.btn-outline:hover {
  background-color: var(--accent-color);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.btn-outline:active {
  background-color: var(--accent-color);
  transform: translateY(0);
}

.btn-ghost {
  background-color: transparent;
  border: none;
  box-shadow: none;
}

.btn-ghost:hover {
  background-color: var(--accent-color);
}

.btn-link {
  background-color: transparent;
  border: none;
  box-shadow: none;
  color: var(--primary-color);
  text-decoration: underline;
  padding-left: 0;
  padding-right: 0;
}

.btn-link:hover {
  text-decoration: none;
  background-color: transparent;
  color: var(--primary-hover);
}

.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 1rem;
  height: 1rem;
  top: calc(50% - 0.5rem);
  left: calc(50% - 0.5rem);
  border-radius: 9999px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  animation: btn-spinner 0.6s linear infinite;
}

@keyframes btn-spinner {
  to {
    transform: rotate(360deg);
  }
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-with-icon svg {
  width: 1rem;
  height: 1rem;
}

/* 添加自定义字体 */
@font-face {
  font-family: 'KNYuanmo';
  src: url('/fonts/KNYuanmo-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
} 