/* 全局样式 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 50%, #e2e8f0 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

/* 背景动画 */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(102, 126, 234, 0.08) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(139, 92, 246, 0.06) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(59, 130, 246, 0.05) 0%,
      transparent 50%
    );
  z-index: -1;
  animation: backgroundShift 25s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.1) rotate(1deg);
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 主计算器区域 */
.main-calculator {
  padding: 60px 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
}

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

.header h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.subtitle {
  font-size: 1.2rem;
  color: #a0a0a0;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.calculator-wrapper {
  display: flex;
  justify-content: center;
  align-items: start;
}

.calculator-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 50px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  width: 100%;
  max-width: 600px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  justify-self: center;
}

.result-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 50px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  width: 100%;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-height: 400px;
}

.calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
}

.form-section {
  margin-bottom: 40px;
}

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

.form-group label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: #2d3748;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.form-group input {
  width: 100%;
  padding: 20px 24px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #ffffff;
  color: #2d3748;
  font-weight: 500;
}

.form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1),
    0 8px 25px rgba(102, 126, 234, 0.15);
  transform: translateY(-2px);
}

.btn-calculate {
  width: 100%;
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.btn-calculate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-calculate:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.1);
}

.btn-calculate:hover::before {
  left: 100%;
}

.btn-calculate:active {
  transform: translateY(-1px);
}

/* 结果区域 */
.result-section {
  border-top: 1px solid #e2e8f0;
  padding-top: 40px;
  margin-top: 20px;
}

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

.hidden {
  display: none !important;
}

.result-header h3 {
  color: #2d3748;
  margin-bottom: 25px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
}

.result-main {
  display: grid;
  gap: 16px;
  margin-bottom: 30px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.result-item:hover {
  background: #f1f5f9;
  transform: translateX(4px);
}

.result-item.highlight {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 600;
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.25);
  border: none;
}

.result-item.highlight:hover {
  transform: translateX(4px) translateY(-2px);
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.35);
}

.result-item .label {
  font-weight: 500;
  font-size: 1rem;
}

.result-item .value {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.result-details {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  padding: 25px;
  border-radius: 16px;
  font-size: 0.95rem;
  color: #4a5568;
  border: 1px solid #e2e8f0;
}

/* 政策信息区域 */
.policy-info {
  background: rgba(255, 255, 255, 0.4);
  padding: 80px 0;
  backdrop-filter: blur(10px);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.info-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.info-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.info-icon {
  font-size: 3rem;
  margin-bottom: 20px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.info-card h3 {
  color: #2d3748;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 700;
}

.info-card ul {
  list-style: none;
  text-align: left;
}

.info-card li {
  padding: 8px 0;
  color: #4a5568;
  position: relative;
  padding-left: 25px;
  font-weight: 500;
}

.info-card li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.1rem;
}

/* FAQ区域 */
.faq-section {
  background: rgba(255, 255, 255, 0.3);
  padding: 80px 0;
  backdrop-filter: blur(10px);
}

.faq-section h2 {
  text-align: center;
  color: #2d3748;
  margin-bottom: 50px;
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 25px 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  color: #2d3748;
}

.faq-question:hover {
  background: rgba(102, 126, 234, 0.05);
}

.faq-icon {
  font-size: 1.3rem;
  font-weight: bold;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #667eea;
}

.faq-answer {
  padding: 0 30px 30px;
  color: #4a5568;
  display: none;
  line-height: 1.7;
}

.faq-answer.active {
  display: block;
  animation: fadeInDown 0.3s ease;
}

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

.faq-answer ul {
  margin-top: 15px;
  padding-left: 20px;
}

.faq-answer li {
  margin-bottom: 8px;
  color: #4a5568;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  color: #764ba2;
}

/* 详细计算说明样式 */
.detail-item {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  padding: 25px;
  border-radius: 12px;
  border-left: 4px solid #667eea;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.detail-item strong {
  color: #2d3748;
  display: block;
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.detail-item p {
  margin: 8px 0;
  line-height: 1.6;
  color: #4a5568;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2.5rem;
  }

  .calculator-card {
    padding: 30px 25px;
    margin: 0 10px;
    border-radius: 20px;
  }

  .main-calculator {
    padding: 40px 0;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .result-item {
    padding: 16px 20px;
  }

  .result-item .value {
    font-size: 1.2rem;
  }

  .faq-question {
    padding: 20px 25px;
  }

  .faq-answer {
    padding: 0 25px 25px;
  }

  .policy-info,
  .faq-section {
    padding: 60px 0;
  }
}

@media (max-width: 480px) {
  .header h1 {
    font-size: 2rem;
  }

  .calculator-card {
    padding: 25px 20px;
  }

  .form-group input {
    padding: 16px 20px;
  }

  .btn-calculate {
    padding: 16px;
    font-size: 1.1rem;
  }
}

/* 庆祝消息样式 */
.celebration-message {
  margin-bottom: 25px;
  text-align: center;
}

.celebration-text {
  font-size: 1.3rem;
  font-weight: 600;
  padding: 15px 25px;
  border-radius: 12px;
  margin-bottom: 15px;
  animation: celebrationPulse 2s ease-in-out infinite;
}

.celebration-text.level-1 {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border: 2px solid #f59e0b;
}

.celebration-text.level-2 {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border: 2px solid #3b82f6;
}

.celebration-text.level-3 {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #166534;
  border: 2px solid #10b981;
}

.celebration-text.level-4 {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
  color: #be185d;
  border: 2px solid #ec4899;
}

.celebration-text.level-5 {
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
  color: #7c3aed;
  border: 2px solid #8b5cf6;
}

@keyframes celebrationPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 礼炮特效 */
.confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #f39c12;
  animation: confetti-fall 3s ease-in forwards;
  z-index: 9999;
  pointer-events: none;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg) scale(0.8);
    opacity: 0;
  }
}

/* 移动端适配 */
@media (max-width: 768px) {
  .result-card {
    min-height: 300px;
  }

  .celebration-text {
    font-size: 1.1rem;
    padding: 12px 20px;
  }

  .btn-recalculate {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}
/* 结果操作按钮 */
.result-actions {
  margin-top: 30px;
  text-align: center;
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-share {
  padding: 15px 30px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-recalculate {
  padding: 15px 30px;
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-share::before,
.btn-recalculate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s;
}

.btn-share:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.btn-recalculate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 116, 139, 0.3);
}

.btn-share:hover::before,
.btn-recalculate:hover::before {
  left: 100%;
}

.btn-share:active,
.btn-recalculate:active {
  transform: translateY(0);
}
