/* CSS Variables - 蓝色科技风格配色（浅色主题） */
:root {
  --primary-color: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #4285f4;
  --accent-color: #00bcd4;
  --background: #f0f5ff;
  --background-light: #ffffff;
  --card-bg: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --error-color: #ef4444;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --border-color: rgba(26, 115, 232, 0.15);
  --glow-color: rgba(26, 115, 232, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  background-image: 
    radial-gradient(ellipse at top, rgba(26, 115, 232, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom, rgba(0, 188, 212, 0.05) 0%, transparent 50%);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

/* Header */
.header {
  background: var(--background-light);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 1200px;
  margin: 0 auto;
}

.logo-icon {
  width: 32px;
  height: 32px;
  color: var(--primary-color);
  filter: drop-shadow(0 0 8px var(--glow-color));
}

.logo span {
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Ad Carousel */
.ad-carousel {
  max-width: 900px;
  margin: 24px auto;
  padding: 0 24px;
  position: relative;
  overflow: hidden;
}

.ad-track {
  display: flex;
  transition: transform 0.5s ease;
}

.ad-banner {
  min-width: 100%;
  height: 120px;
  border-radius: 16px;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: relative;
  overflow: hidden;
}

.ad-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* 电子签广告配色 */
.ad-banner.esign-1 {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 50%, #00bcd4 100%);
}

.ad-banner.esign-2 {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
}

/* 风控系统广告配色 */
.ad-banner.risk-1 {
  background: linear-gradient(135deg, #059669 0%, #10b981 50%, #34d399 100%);
}

.ad-banner.risk-2 {
  background: linear-gradient(135deg, #dc2626 0%, #f97316 50%, #fbbf24 100%);
}

.ad-banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.ad-banner .ad-badge {
  position: absolute;
  top: -44px;
  left: 0;
  background: rgba(255,255,255,0.25);
  color: white;
  font-size: 10px;
  padding: 3px 8px;
  border-radius: 4px;
}

.ad-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ad-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.ad-text {
  flex: 1;
}

.ad-text h3 {
  color: white;
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 4px;
}

.ad-text p {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  margin: 0;
}

.ad-cta {
  background: rgba(255,255,255,0.2);
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.ad-banner:hover .ad-cta {
  background: rgba(255,255,255,0.35);
}

/* Carousel Indicators */
.ad-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary-color);
}

/* Bottom Ad Cards */
.ad-cards {
  display: flex;
  gap: 16px;
  max-width: 520px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

.ad-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26, 115, 232, 0.15);
}

.ad-card.esign {
  border-left: 3px solid var(--primary-color);
}

.ad-card.risk {
  border-left: 3px solid var(--success-color);
}

.ad-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ad-card.esign .ad-card-icon {
  background: rgba(26, 115, 232, 0.1);
  color: var(--primary-color);
}

.ad-card.risk .ad-card-icon {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.ad-card-icon svg {
  width: 22px;
  height: 22px;
}

.ad-card-text h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.ad-card-text p {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

/* Main Container */
.main-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 24px 40px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 
    0 4px 24px rgba(26, 115, 232, 0.1),
    0 0 40px var(--glow-color);
}

/* Tab Navigation */
.tab-container {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: var(--background);
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.tab-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 12px var(--glow-color);
}


/* Form Panels */
.form-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.form-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.required {
  color: var(--error-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #ffffff;
  color: var(--text-primary);
  font-size: 15px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--glow-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-secondary);
  opacity: 0.6;
}

.form-group input.error,
.form-group textarea.error {
  border-color: var(--error-color);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.error-msg {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--error-color);
  min-height: 18px;
}

/* Primary Button */
.btn-primary {
  width: 100%;
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  margin-top: 8px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px var(--glow-color);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary svg {
  width: 18px;
  height: 18px;
}

/* Result Panel */
.result-panel {
  margin-top: 24px;
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  animation: slideUp 0.3s ease;
}

.result-panel.hidden {
  display: none;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-panel.success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.result-panel.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.result-panel.warning {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.result-panel.info {
  background: rgba(26, 115, 232, 0.1);
  border: 1px solid rgba(26, 115, 232, 0.3);
}

.result-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.result-panel.success .result-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--success-color);
}

.result-panel.error .result-icon {
  background: rgba(239, 68, 68, 0.2);
  color: var(--error-color);
}

.result-panel.warning .result-icon {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning-color);
}

.result-panel.info .result-icon {
  background: rgba(26, 115, 232, 0.2);
  color: var(--primary-color);
}

.result-message {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.result-details {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 13px;
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
  .ad-carousel {
    padding: 0 16px;
  }
  
  .ad-banner {
    height: 140px;
    padding: 0 20px;
  }
  
  .ad-banner-content {
    flex-wrap: wrap;
    gap: 12px;
  }
  
  .ad-text h3 {
    font-size: 16px;
  }
  
  .ad-text p {
    font-size: 12px;
  }
  
  .ad-cta {
    display: none;
  }
  
  .ad-cards {
    flex-direction: column;
    padding: 0 16px;
  }
  
  .main-container {
    padding: 16px;
  }
  
  .card {
    padding: 24px;
  }
  
  .header {
    padding: 12px 16px;
  }
  
  .logo span {
    font-size: 18px;
  }
}
