:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --success-color: #2ecc71;
  --warning-color: #fca311;
  --danger-color: #e63946;
  --border-radius: 12px;
  --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

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

body {
  font-family: "Poppins", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #ffffff;
  color: var(--dark-color);
  line-height: 1.6;
  min-height: 100vh;
  padding: 0;
  overflow-x: hidden;
}

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

/* 导航栏样式 */
.navbar {
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo i {
  font-size: 2.2rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 35px;
}

.nav-links a {
  color: var(--dark-color);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  font-size: 1.1rem;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1.05rem;
}

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

.btn-primary:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

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

.btn-lg {
  padding: 16px 36px;
  font-size: 1.2rem;
}

/* 首页样式 */
.hero {
  background: linear-gradient(135deg, #f0f4ff 0%, #e6eeff 100%);
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 60px;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

.hero-text {
  flex: 1;
}

.hero-image {
  flex: 1;
  text-align: center;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  line-height: 1.2;
  background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 40px;
  color: #555;
  max-width: 600px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.hero-image img {
  max-width: 100%;
  border-radius: 20px;
  box-shadow: var(--box-shadow);
  transform: perspective(1000px) rotateY(-10deg);
  transition: var(--transition);
}

.hero-image img:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 150px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0 0v46.29c47.79 22.2 103.59 32.17 158 28 70.36-5.37 136.33-33.31 206.8-37.5 73.84-4.36 147.54 16.88 218.2 35.26 69.27 18 138.3 24.88 209.4 13.08 36.15-6 69.85-17.84 104.45-29.34C989.49 25 1113-14.29 1200 52.47V0z" fill="white"/></svg>');
  background-size: cover;
  background-repeat: no-repeat;
}

/* 功能部分 */
.features {
  padding: 120px 0;
  background: white;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 70px;
}

.section-header h2 {
  font-size: 2.8rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.section-header p {
  font-size: 1.2rem;
  color: #666;
}

.how-it-works {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
  justify-content: center;
}

.step-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 40px 30px;
  width: 320px;
  text-align: center;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.step-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: var(--primary-color);
  z-index: -1;
  transition: var(--transition);
}

.step-card:hover {
  transform: translateY(-15px);
}

.step-card:hover::before {
  height: 100%;
}

.step-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: rgba(67, 97, 238, 0.1);
  margin-bottom: 20px;
  transition: var(--transition);
}

.step-card:hover .step-number {
  color: rgba(255, 255, 255, 0.2);
}

.step-icon {
  font-size: 3.5rem;
  margin-bottom: 25px;
  color: var(--primary-color);
  transition: var(--transition);
}

.step-card:hover .step-icon {
  color: white;
}

.step-card h3 {
  font-size: 1.7rem;
  margin-bottom: 20px;
  transition: var(--transition);
}

.step-card:hover h3 {
  color: white;
}

.step-card p {
  color: #666;
  transition: var(--transition);
}

.step-card:hover p {
  color: rgba(255, 255, 255, 0.9);
}

/* 页脚 */
.footer {
  background: #1a1a2e;
  color: #a0a0c0;
  padding: 60px 0 30px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  gap: 50px;
  margin-bottom: 40px;
}

.footer-column {
  flex: 1;
  min-width: 250px;
}

.footer-column h3 {
  color: white;
  margin-bottom: 25px;
  font-size: 1.4rem;
}

.footer-column a {
  /* 去掉下划线 */
  text-decoration: none;
  /* 继承父元素文字颜色（与页脚其他文字颜色统一） */
  color: inherit;
  /* 可选：移除链接点击后的默认颜色变化（如蓝色） */
  transition: none;
}

.footer-column a:hover {
  /* 可自定义 hover 样式，比如轻微变色/加下划线，也可留空 */
  color: white; /* 示例：hover 时变主题色 */
  text-decoration: none; /* 确保 hover 时也无下划线 */
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: #a0a0c0;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-links a:hover {
  color: white;
  transform: translateX(5px);
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #2d2d4a;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #2d2d4a;
  color: white;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  transform: translateY(-5px);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  width: 100%;
  max-width: 550px;
  padding: 40px;
  position: relative;
}

.close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 1.8rem;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.close:hover {
  color: var(--primary-color);
  background-color: rgba(0, 0, 0, 0.05);
}

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

.modal-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.modal-header p {
  color: #666;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 30px;
}

.tab {
  padding: 16px 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: #888;
  transition: var(--transition);
}

.tab.active {
  color: var(--primary-color);
  border-bottom: 4px solid var(--primary-color);
  margin-bottom: -3px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.switch-text {
  text-align: center;
  margin-top: 20px;
  color: #666;
}

.switch-text a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

/* 表单样式 */
.form-group {
  margin-bottom: 30px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

.form-group input {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-group input::placeholder {
  color: #a0a0a0;
}

/* 复选框样式 */
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.checkbox-label i {
  color: var(--primary-color);
}

/* 模态框按钮样式 */
.modal-content .btn {
  padding: 16px 32px;
  font-size: 1.1rem;
  width: 100%;
  margin-top: 10px;
}

.modal-content .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(67, 97, 238, 0.3);
}

/* 认证提示 */
.auth-cta {
  text-align: center;
  margin: 60px 0;
  padding: 40px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
  border-radius: var(--border-radius);
}

.auth-cta h3 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.auth-cta p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.auth-cta .btn {
  display: inline-block;
  width: auto;
  margin: 0 10px;
}

/* 邮箱订阅部分样式 */
.email-subscription {
  text-align: center;
  margin: 80px 0;
  padding: 60px 40px;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e7f1 100%);
  border-radius: var(--border-radius);
}

.subscription-content {
  max-width: 700px;
  margin: 0 auto;
}

.email-subscription h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.email-subscription p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  color: #555;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.subscription-form {
  display: flex;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto 40px;
  align-items: flex-start;
}

.subscription-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.subscription-form input {
  width: 100%;
  padding: 18px 24px;
  font-size: 1.1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background-color: white;
  transition: all 0.3s ease;
}

.subscription-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.subscription-form .btn-lg {
  padding: 18px 36px;
  white-space: nowrap;
}

.error-message {
  color: var(--danger-color);
  font-size: 0.9rem;
  margin-top: 8px;
  text-align: left;
  min-height: 20px;
}

.subscription-info {
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

.subscription-info p {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  margin-bottom: 10px;
  color: #666;
}

.subscription-info i {
  color: var(--success-color);
}

/* 响应式设计 */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero p {
    max-width: 100%;
  }

  .section-header h2 {
    font-size: 2.4rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  .step-card {
    width: 100%;
    max-width: 400px;
  }

  .auth-cta {
    padding: 30px 20px;
  }

  .email-subscription {
    padding: 40px 20px;
    margin: 60px 0;
  }

  .email-subscription h2 {
    font-size: 2rem;
  }

  .email-subscription p {
    font-size: 1.1rem;
  }

  .subscription-form {
    flex-direction: column;
    gap: 15px;
  }

  .subscription-form input,
  .subscription-form .btn {
    width: 100%;
  }

  .subscription-info {
    text-align: center;
  }

  .subscription-info p {
    justify-content: center;
  }
}

/* 订阅页面样式 */
.subscription-header {
  text-align: center;
  margin: 60px 0 40px;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e6eeff 100%);
  border-radius: var(--border-radius);
}

.subscription-header h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.subscription-header p {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 20px;
}

.token-status {
  display: inline-block;
  padding: 12px 24px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-weight: 500;
  margin-top: 20px;
}

.pricing-plans {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 60px 0;
}

.plan-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 40px;
  width: 350px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  border: 2px solid #e1e5e9;
}

.plan-card.popular {
  border-color: var(--primary-color);
  transform: scale(1.05);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-color);
  color: white;
  padding: 6px 20px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.plan-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.plan-header h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--dark-color);
}

.plan-price {
  margin-bottom: 10px;
}

.price {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-color);
}

.period {
  font-size: 1.2rem;
  color: #666;
}

.plan-savings {
  color: var(--success-color);
  font-weight: 600;
  margin: 10px 0;
}

.plan-description {
  color: #666;
  font-size: 1rem;
}

.plan-features {
  margin: 30px 0;
}

.plan-features ul {
  list-style: none;
}

.plan-features li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.plan-features i {
  font-size: 1.1rem;
}

.plan-features .fa-check {
  color: var(--success-color);
}

.plan-features .fa-times {
  color: #ccc;
}

.plan-select-btn {
  width: 100%;
  margin-top: 20px;
}

.payment-section {
  margin: 60px auto;
  max-width: 800px;
  padding: 40px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.payment-header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.payment-header h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--primary-color);
}

.payment-header p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 10px;
}

.payment-methods {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.payment-method {
  flex: 1;
  min-width: 300px;
  padding: 30px;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  text-align: center;
}

.method-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.method-header i {
  font-size: 2.5rem;
  color: var(--primary-color);
}

.method-header h3 {
  font-size: 1.5rem;
}

.payment-method p {
  color: #666;
  margin-bottom: 25px;
}

.payment-note {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #888;
}

.payment-terms {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid #eee;
}

.payment-terms p {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  color: #666;
}

.already-subscribed,
.error-section {
  margin: 60px auto;
  max-width: 600px;
  padding: 50px 40px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  text-align: center;
}

.already-subscribed i,
.error-section i {
  font-size: 4rem;
  margin-bottom: 30px;
}

.already-subscribed i {
  color: var(--success-color);
}

.error-section i {
  color: var(--warning-color);
}

.already-subscribed h2,
.error-section h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
  color: var(--dark-color);
}

.already-subscribed p,
.error-section p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 15px;
}

.subscribed-actions,
.error-actions {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-top: 40px;
  flex-wrap: wrap;
}

/* 响应式设计：订阅页面 */
@media (max-width: 992px) {
  .pricing-plans {
    flex-direction: column;
    align-items: center;
  }

  .plan-card {
    width: 100%;
    max-width: 400px;
  }

  .plan-card.popular {
    transform: none;
  }
}

@media (max-width: 768px) {
  .subscription-header h1 {
    font-size: 2.5rem;
  }

  .subscription-header p {
    font-size: 1.1rem;
  }

  .payment-methods {
    flex-direction: column;
  }

  .payment-method {
    min-width: 100%;
  }

  .subscribed-actions,
  .error-actions {
    flex-direction: column;
  }

  .subscribed-actions .btn,
  .error-actions .btn {
    width: 100%;
  }
}

/* 功能页面样式 */
.app-header {
  margin: 20px 0 30px;
  padding: 20px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e6eeff 100%);
  border-radius: var(--border-radius);
}

.user-welcome h1 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: var(--primary-color);
}

#user-greeting {
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 20px;
}

.subscription-status {
  display: inline-block;
  padding: 12px 24px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  font-weight: 500;
}

.app-main {
  margin-bottom: 80px;
}

.two-column-layout {
  display: flex;
  gap: 20px;
}

.left-column {
  flex: 0 0 25%;
}

.right-column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.right-column .result-section {
  margin-bottom: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.right-column .result-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.right-column .preview-container {
  flex: 1;
  min-height: 0; /* 允许收缩 */
}

.right-column .code-container {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.right-column .code-content {
  flex: 1;
  overflow: auto;
}

.right-column .tab-content.active {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.input-section,
.result-section,
.history-section {
  background: white;
  border-radius: var(--border-radius);
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: var(--box-shadow);
}

.section-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-header p {
  color: #666;
  font-size: 1.1rem;
}

.input-form .form-group {
  margin-bottom: 25px;
}

.input-form label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  font-size: 1.1rem;
}

.input-form textarea,
.input-form input,
.input-form select {
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  border: 2px solid #e1e5e9;
  border-radius: 12px;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

.input-form textarea:focus,
.input-form input:focus,
.input-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

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

.form-hint {
  margin-top: 10px;
  padding: 12px 16px;
  background: #f0f7ff;
  border-radius: 8px;
  color: #4361ee;
  font-size: 0.95rem;
}

.form-hint i {
  margin-right: 8px;
}

#generate-btn {
  margin-top: 20px;
  width: 100%;
}

.result-tabs {
  display: flex;
  border-bottom: 2px solid #eee;
  margin-bottom: 30px;
}

.result-tabs .tab {
  padding: 16px 30px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  color: #888;
  transition: var(--transition);
}

.result-tabs .tab.active {
  color: var(--primary-color);
  border-bottom: 4px solid var(--primary-color);
  margin-bottom: -3px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.preview-container,
.code-container {
  border: 1px solid #e1e5e9;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.preview-header,
.code-header {
  background: #f8f9fa;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e1e5e9;
}

.preview-title,
.code-title {
  font-weight: 600;
  color: #333;
}

.page-preview {
  width: 100%;
  height: 100%;
  border: none;
  background: white;
}

.code-content {
  margin: 0;
  padding: 0;
  background: #1a1a2e;
  color: #f8f9fa;
  max-height: 1100px;
  max-width: 1350px;
  overflow: auto;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre;
}

.result-actions {
  display: flex;
  gap: 20px;
  margin-top: 40px;
  justify-content: center;
}

.history-empty {
  text-align: center;
  padding: 60px 40px;
  color: #888;
}

.history-empty i {
  font-size: 4rem;
  margin-bottom: 20px;
  color: #ddd;
}

.history-empty p {
  font-size: 1.2rem;
}

/* 响应式设计：功能页面 */
@media (max-width: 768px) {
  .two-column-layout {
    flex-direction: column;
    gap: 20px;
  }

  .left-column {
    flex: 0 0 auto;
  }

  .right-column {
    flex: 1;
  }

  .app-header {
    padding: 15px 10px;
    margin: 15px 0 20px;
  }

  .user-welcome h1 {
    font-size: 2.2rem;
  }

  .input-section,
  .result-section,
  .history-section {
    padding: 30px 20px;
    margin-bottom: 20px;
  }

  .section-header h2 {
    font-size: 1.7rem;
  }

  .result-tabs {
    flex-direction: column;
  }

  .result-tabs .tab {
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  .result-tabs .tab.active {
    border-bottom: 4px solid var(--primary-color);
  }

  .page-preview {
    height: 100%;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }
}

/* Paddle overlay checkout 增强样式 */
.checkout-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 10px 15px;
  background-color: rgba(67, 97, 238, 0.1);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--primary-color);
  font-size: 14px;
  animation: fadeIn 0.3s ease;
}

.checkout-status i {
  font-size: 16px;
}

.checkout-error {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 12px 15px;
  background-color: rgba(230, 57, 70, 0.1);
  color: var(--danger-color);
  border-radius: var(--border-radius);
  border-left: 4px solid var(--danger-color);
  font-size: 14px;
  animation: fadeIn 0.3s ease;
}

.checkout-error i {
  font-size: 16px;
}

#paddle-overlay-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  backdrop-filter: blur(5px);
}

#paddle-overlay-loader > div {
  text-align: center;
  max-width: 400px;
  padding: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#paddle-overlay-loader i {
  font-size: 3rem;
  margin-bottom: 20px;
  color: var(--accent-color);
}

#paddle-overlay-loader p {
  margin-top: 15px;
  font-size: 1.1rem;
  opacity: 0.9;
}

/* 支付按钮加载状态 */
.btn-loading {
  position: relative;
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

/* 支付区域增强 */
.payment-method {
  position: relative;
  transition: var(--transition);
}

.payment-method.processing {
  opacity: 0.7;
  pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .checkout-status,
  .checkout-error {
    padding: 10px 12px;
    font-size: 13px;
  }

  #paddle-overlay-loader > div {
    padding: 30px 20px;
    margin: 0 20px;
  }

  #paddle-overlay-loader i {
    font-size: 2.5rem;
  }

  #paddle-overlay-loader p {
    font-size: 1rem;
  }
}

/* 订阅加载弹窗样式 */
.loading-progress {
  margin: 30px 0;
}

.progress-bar {
  height: 10px;
  background-color: #f0f0f0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 5px;
  transition: width 0.3s ease;
}

/* 第1行：给 同时拥有 .progress-fill 和 .pulsing 类的元素 设置样式
意思：只有当进度条（.progress-fill）同时加上 pulsing 这个类时，下面的动画才会生效。 */
.progress-fill.pulsing {
  /* 第2行：使用名为 pulse 的动画，1.5秒完成一次，无限循环
  拆解：
pulse = 动画名字（下面会定义）
1.5s = 一次动画花 1.5 秒
infinite = 无限循环（一直闪）
infinite 是 animation 的官方固定关键字，意思是：无限循环播放 */
  animation: pulse 1.5s infinite;
}

/* 第4行：定义一个叫 pulse 的动画
@keyframes = 定义动画的 “剧本 / 关键帧”
这段代码就是让进度条：
正常显示 →
微微变浅 →
又变回正常 →
一直循环，看起来像呼吸 / 闪烁。 */
@keyframes pulse {
  /* 第5行：动画开始时（0%进度）透明度是 1（完全不透明） */
  0% {
    opacity: 1;
  }
  /* 第7行：动画到中间时（50%进度）透明度变成 0.8（稍微变浅） */
  50% {
    opacity: 0.8;
  }
  /* 第9行：动画结束时（100%）透明度变回 1（恢复正常） */
  100% {
    opacity: 1;
  }
}

.progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  font-size: 1rem;
}

#subscription-status-text {
  font-weight: 600;
  color: var(--dark-color);
}

#subscription-retry-count {
  font-size: 0.9rem;
  color: #666;
}

.loading-details {
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent-color);
  font-size: 0.95rem;
  color: #555;
}

.loading-details i {
  margin-right: 8px;
  color: var(--accent-color);
}

.loading-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.modal-body {
  padding: 0 20px 30px;
}

/* App page full-width layout */
.app-page .container {
  max-width: none;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  margin: 0;
}
