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

:root {
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --secondary-color: #6b7280;
  --success-color: #10b981;
  --error-color: #ef4444;
  --bg-color: #f9fafb;
  --card-bg: #ffffff;
  --text-primary: #111827;
  --text-secondary: #6b7280;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 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);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text-primary);
}

/* 顶部 Logo 区域 */
.top-header {
  width: 100%;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.company-name {
  font-size: 24px;
  font-weight: 700;
  color: white;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 100px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 48px 40px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  position: relative;
  width: 100%;
}

.claim-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.claim-logo-image {
  width: 40%;
  max-width: 140px;
  height: auto;
  object-fit: contain;
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.subtitle {
  font-size: 15px;
  color: var(--text-secondary);
}

.step {
  display: none;
}

.step.active {
  display: block;
  animation: fadeIn 0.3s ease-in;
}

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

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 14px 18px;
  font-size: 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  outline: none;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 17px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

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

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

.btn-secondary {
  background: var(--bg-color);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
  padding: 10px 20px;
  width: auto;
  flex: 1;
}

.btn-secondary:hover {
  background: var(--border-color);
}

.btn-link {
  background: none;
  color: var(--primary-color);
  border: none;
  padding: 8px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: var(--primary-hover);
}

.agreement {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.agreement-notice {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.agreement-link {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.agreement-link:hover {
  color: var(--primary-hover);
  background: rgba(79, 70, 229, 0.08);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2000;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 12px;
}

.modal-header h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: rgba(229, 231, 235, 0.6);
  color: var(--text-primary);
}

.modal-content {
  padding: 0 24px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  max-height: 60vh;
  overflow-y: auto;
}

.agreement-intro {
  color: var(--text-primary);
  margin-bottom: 16px;
  font-weight: 500;
}

.agreement-content {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 16px 20px;
  max-height: 48vh;
  overflow-y: auto;
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.agreement-content h1,
.agreement-content h2,
.agreement-content h3,
.agreement-content h4,
.agreement-content h5,
.agreement-content h6 {
  margin: 12px 0 8px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.agreement-content p {
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.8;
  white-space: pre-line;
}

.agreement-content ul {
  margin: 8px 0 8px 18px;
  list-style: disc;
}

.agreement-content strong,
.agreement-content b {
  color: var(--primary-color);
}

.modal-content ul {
  margin: 8px 0 0 18px;
  list-style: disc;
}

.agreement-download {
  display: inline-block;
  margin-top: 16px;
  color: var(--primary-color);
  text-decoration: underline;
}

.agreement-download:hover {
  color: var(--primary-dark);
}

.agreement-modal .modal-header {
  justify-content: center;
  position: relative;
  padding: 28px 32px 16px;
}

.agreement-modal .modal-header h3 {
  color: #111827;
  font-size: 22px;
  font-weight: 700;
}

.agreement-modal .modal-close {
  position: absolute;
  right: 18px;
  top: 22px;
  color: #6b7280;
}

.agreement-modal .modal-close:hover {
  background: rgba(15, 23, 42, 0.08);
  color: #111827;
}

.agreement-modal .modal-content {
  color: #111827;
  padding: 0 32px 32px;
}

.agreement-modal .agreement-intro {
  color: #111827;
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
}

.agreement-modal .agreement-content {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: inset 0 0 0 1px #f1f5f9;
  color: #111827;
  padding: 20px 24px;
  max-height: 55vh;
  overflow-y: auto;
}

.agreement-modal .agreement-content::-webkit-scrollbar {
  width: 6px;
}

.agreement-modal .agreement-content::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 999px;
}

.agreement-modal .agreement-content p {
  color: #111827;
}

.agreement-modal .agreement-content p:first-child {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.agreement-modal .agreement-content strong,
.agreement-modal .agreement-content b {
  color: #111827;
  font-weight: 600;
}

.agreement-modal .agreement-content ul {
  color: #111827;
}

.agreement-modal .agreement-download {
  color: #1f2937;
  margin-top: 20px;
  text-align: center;
  font-weight: 500;
  text-decoration: underline;
}

.agreement-modal .agreement-download:hover {
  color: #111827;
}

.phone-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px;
  background: var(--bg-color);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.countdown {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

.success-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.claim-info {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.card-display {
  background: var(--bg-color);
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.card-code {
  font-size: 24px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  text-align: center;
  color: var(--primary-color);
  letter-spacing: 2px;
  margin-bottom: 16px;
  user-select: all;
  word-break: break-all;
}

.card-actions {
  display: flex;
  gap: 12px;
}

.error-msg {
  display: none;
  margin-top: 16px;
  padding: 12px 16px;
  background: #fee;
  border: 1px solid var(--error-color);
  color: var(--error-color);
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
}

.error-msg.show {
  display: block;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-10px); }
  75% { transform: translateX(10px); }
}

.loading {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  align-items: center;
  justify-content: center;
}

.loading.show {
  display: flex;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stats {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 4px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
}

@media (max-width: 480px) {
  .card {
    padding: 32px 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .card-code {
    font-size: 20px;
  }
}

/* 底部版权信息 */
.footer {
  width: 100%;
  padding: 25px 20px;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  text-align: center;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.copyright {
  color: rgba(255, 255, 255, 0.95);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
}

.footer-links a:hover {
  color: rgba(255, 255, 255, 1);
  background: rgba(255, 255, 255, 0.1);
}

.separator {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 5px;
}

.beian-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .top-header {
    padding: 15px 20px;
  }

  .logo-icon {
    width: 32px;
    height: 32px;
  }

  .company-name {
    font-size: 18px;
  }

  .container {
    padding: 80px 15px 15px;
  }

  .card {
    padding: 32px 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .card-code {
    font-size: 20px;
  }

  .footer {
    padding: 20px 15px;
  }

  .copyright {
    font-size: 12px;
    margin-bottom: 8px;
  }

  .footer-links {
    flex-direction: column;
    gap: 8px;
  }

  .footer-links a {
    font-size: 12px;
  }

  .separator {
    display: none;
  }
}

@media (max-width: 480px) {
  .logo-icon {
    width: 28px;
    height: 28px;
  }

  .company-name {
    font-size: 16px;
  }
}
