/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-accent: #ff6d00;
  --color-dark: #0f172a;
  --color-gray-900: #1e293b;
  --color-gray-700: #334155;
  --color-gray-600: #475569;
  --color-gray-500: #64748b;
  --color-gray-400: #94a3b8;
  --color-gray-300: #cbd5e1;
  --color-gray-100: #f1f5f9;
  --color-gray-50: #f8fafc;
  --color-white: #ffffff;
  --brand-blue-light: #60a5fa;
  --brand-blue: #2563eb;
  --brand-blue-deep: #1e3a8a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  --radius-lg: 12px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--color-gray-700);
  background: var(--color-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

/* ===== Nav ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.nav.scrolled {
  border-bottom-color: var(--color-gray-100);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  padding: 6px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  display: block;
  height: 80px;
  width: auto;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 15px;
  color: var(--color-gray-700);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-primary);
}

.lang-switch {
  background: none;
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-gray-700);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.lang-switch:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
  padding: 160px 0 120px;
  text-align: center;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 40%, #f8fafc 100%);
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  color: var(--color-dark);
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 22px;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 17px;
  color: var(--color-gray-700);
  max-width: 520px;
  margin: 0 auto 40px;
}

.btn-primary {
  display: inline-block;
  padding: 14px 36px;
  background: var(--color-primary);
  color: var(--color-white);
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ===== Sections Common ===== */
section {
  padding: 100px 0;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-dark);
  text-align: center;
  margin-bottom: 56px;
  letter-spacing: -0.5px;
}

/* ===== About (merged into hero) ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-top: 64px;
  text-align: left;
}

.about-text p {
  font-size: 16px;
  color: var(--color-gray-700);
  margin-bottom: 16px;
  line-height: 1.9;
}

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.highlight {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  background: var(--color-gray-50);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--color-primary);
}

.highlight-number {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-accent);
  min-width: 64px;
  text-align: center;
}

.highlight-label {
  font-size: 15px;
  color: var(--color-gray-700);
  font-weight: 500;
}

/* ===== Services ===== */
.services {
  background: var(--color-gray-50);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-gray-100);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  color: var(--color-primary);
  margin-bottom: 24px;
}

.service-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 15px;
  color: var(--color-gray-700);
  line-height: 1.8;
}

/* ===== Contact ===== */
.contact {
  background: var(--color-white);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 64px;
  align-items: start;
}

.contact-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 16px;
  color: var(--color-gray-700);
  line-height: 1.9;
  margin-bottom: 32px;
}

.contact-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-gray-700);
  font-size: 15px;
}

.contact-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-form {
  background: var(--color-gray-50);
  padding: 32px;
  border-radius: var(--radius-lg);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-gray-700);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-dark);
  background: var(--color-white);
  border: 1px solid var(--color-gray-300);
  border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-gray-300);
}

.contact-form .btn-primary {
  width: 100%;
  text-align: center;
}

/* ===== Product Page ===== */
.page-hero {
  padding: 140px 0 60px;
  text-align: center;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 40%, #f8fafc 100%);
}

.hero-product-desc {
  max-width: 600px;
  margin: 16px auto 20px;
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-gray-700);
}

.page-placeholder {
  font-size: 17px;
  color: var(--color-gray-700);
  max-width: 520px;
  margin: 24px auto 0;
}

.contact-page-section {
  padding: 80px 0;
}

/* ===== QR Codes ===== */
.qr-section {
  display: flex;
  gap: 32px;
  margin-top: 32px;
}

.qr-item {
  text-align: center;
}

.qr-image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--color-gray-200);
  background: var(--color-white);
}

.qr-label {
  margin-top: 8px;
  font-size: 14px;
  color: var(--color-gray-700);
}

/* ===== Product Card ===== */
.products-section {
  padding: 40px 0 80px;
}

.products-section .section-title {
  margin-bottom: 32px;
}

.product-card-large {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 48px;
}

.product-card-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.product-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  object-fit: contain;
}

.product-card-header h2 {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0;
}

.product-tagline {
  font-size: 16px;
  color: var(--color-primary);
  font-weight: 500;
  margin: 4px 0 0;
}

.product-desc {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-gray-700);
  margin-bottom: 32px;
}

.product-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.product-feature {
  padding: 20px;
  background: var(--color-gray-50);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-accent);
}

.product-feature h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 8px;
}

.product-feature p {
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 1.6;
  margin: 0;
}

.product-badge {
  display: inline-block;
  margin-top: 24px;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.product-badge-soon {
  background: #dbeafe;
  color: var(--brand-blue);
}

.product-card-upcoming {
  position: relative;
}

.product-card-upcoming .product-badge {
  background: #fef3c7;
  color: #92400e;
}

/* ===== Product List ===== */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-list-kpasssafe {
  background: #f0f4ff !important;
  border: 1px solid #dbeafe;
}

.product-list-happystash {
  background: #fefce8 !important;
  border: 1px solid #fef3c7;
}

.product-list-card {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-list-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.product-list-card .product-icon {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.product-list-info h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-dark);
  margin: 0 0 4px;
}

.product-list-desc {
  font-size: 14px;
  color: var(--color-gray-700);
  line-height: 1.6;
  margin: 8px 0 12px;
}

/* ===== Product Detail ===== */
.product-detail-section {
  padding: 40px 0 80px;
}

.product-detail-kpasssafe {
  background: #f0f4ff;
}

.product-detail-kpasssafe .product-feature {
  background: var(--color-white);
  border-left-color: var(--brand-blue);
}

/* Product Story */
.product-story {
  max-width: 720px;
  margin: 0 auto 48px;
}

.product-story p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--color-gray-700);
  margin-bottom: 12px;
}

.product-story ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.product-story ul li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-700);
}

.product-story ul li::before {
  content: '×';
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 18px;
}

/* Product Philosophy Cards */
.product-philosophy {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.philosophy-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.philosophy-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.philosophy-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 10px;
}

.philosophy-card p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-gray-700);
}

.philosophy-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.philosophy-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-gray-700);
}

.philosophy-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 700;
}

.philosophy-highlight {
  margin-top: 12px;
  font-weight: 700;
  color: var(--color-primary) !important;
  font-size: 16px !important;
}

@media (max-width: 768px) {
  .product-philosophy {
    grid-template-columns: 1fr;
  }
}

.product-detail-happystash {
  background: #fefce8;
}

.product-detail-happystash .product-feature {
  background: var(--color-white);
  border-left-color: #ca8a04;
}

.product-detail-section .product-card-header {
  margin-bottom: 16px;
}

.product-detail-section .product-desc {
  max-width: 680px;
}

.product-icon-lg {
  width: 72px;
  height: 72px;
}

.product-section-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 48px 0 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-gray-100);
}

.product-downloads {
  margin-top: 48px;
}

/* ===== Support Section ===== */
.support-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--color-gray-100);
}

.support-desc {
  font-size: 15px;
  color: var(--color-gray-700);
  margin-bottom: 24px;
}

.support-methods {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.support-method {
  text-align: center;
}

.support-paypal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: #ffc439;
  color: #003087;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
}

.support-paypal-btn:hover {
  background: #f0b825;
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .product-list-card {
    flex-direction: column;
    text-align: center;
    padding: 24px;
  }

  .product-list-card .product-icon {
    width: 64px;
    height: 64px;
  }

  .product-features {
    grid-template-columns: 1fr;
  }

  .product-card-large {
    padding: 24px;
  }

  .qr-section {
    flex-direction: column;
    align-items: flex-start;
  }

  .support-methods {
    flex-direction: column;
    gap: 24px;
  }
}

/* ===== AI Chat Button ===== */
.ai-chat-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 20px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background 0.2s, transform 0.2s, opacity 0.3s;
  animation: ai-pulse 2.5s ease-in-out infinite;
}

.ai-chat-btn:hover {
  background: var(--color-primary-dark);
  transform: scale(1.05);
  animation: none;
}

.ai-chat-btn.hidden {
  opacity: 0;
  pointer-events: none;
}

@keyframes ai-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
}

/* ===== AI Chat Panel ===== */
.ai-chat-panel {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 160;
  width: 380px;
  height: 520px;
  min-width: 320px;
  min-height: 400px;
  max-width: 90vw;
  max-height: 85vh;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.8) translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s, opacity 0.3s;
  transform-origin: bottom right;
}

.ai-chat-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.ai-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--color-primary);
  color: var(--color-white);
}

.ai-chat-header-title {
  font-size: 16px;
  font-weight: 700;
}

.ai-chat-close {
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.ai-chat-close:hover {
  opacity: 1;
}

.ai-chat-resize {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 20px;
  height: 20px;
  cursor: nwse-resize;
  z-index: 5;
}

.ai-chat-resize::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 4px;
  width: 10px;
  height: 10px;
  border-left: 2px solid var(--color-gray-400);
  border-bottom: 2px solid var(--color-gray-400);
  opacity: 0.5;
  transition: opacity 0.2s;
}

.ai-chat-resize:hover::before {
  opacity: 1;
}

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--color-gray-50);
}

.ai-chat-msg {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.7;
  word-break: break-word;
  position: relative;
}

.ai-chat-msg p {
  margin: 0 0 8px 0;
}

.ai-chat-msg p:last-child {
  margin-bottom: 0;
}

.ai-chat-msg ul,
.ai-chat-msg ol {
  margin: 8px 0;
  padding-left: 20px;
}

.ai-chat-msg li {
  margin-bottom: 4px;
}

.ai-chat-msg strong {
  font-weight: 600;
  color: inherit;
}

.ai-chat-msg-bot {
  align-self: flex-start;
  background: var(--color-white);
  color: var(--color-gray-700);
  border-bottom-left-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ai-chat-msg-bot::before {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 12px;
  width: 12px;
  height: 12px;
  background: var(--color-white);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
  transform: rotate(-45deg);
}

.ai-chat-msg-user {
  align-self: flex-end;
  background: var(--color-primary);
  color: var(--color-white);
  border-bottom-right-radius: 6px;
}

.ai-chat-msg-user::before {
  content: '';
  position: absolute;
  bottom: -6px;
  right: 12px;
  width: 12px;
  height: 12px;
  background: var(--color-primary);
  transform: rotate(45deg);
}

.ai-chat-msg-bot-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-chat-bot-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ai-chat-bot-avatar svg {
  width: 14px;
  height: 14px;
  fill: var(--color-white);
}

.ai-chat-bot-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-gray-600);
}

.ai-chat-loading .ai-chat-dots span {
  animation: ai-dot-blink 1.4s infinite;
  font-size: 20px;
  font-weight: 700;
}

.ai-chat-loading .ai-chat-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.ai-chat-loading .ai-chat-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ai-dot-blink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}

.ai-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--color-gray-100);
  background: var(--color-white);
}

.ai-chat-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  border: 1px solid var(--color-gray-300);
  border-radius: 20px;
  outline: none;
  color: var(--color-dark);
  transition: border-color 0.2s;
}

.ai-chat-input:focus {
  border-color: var(--color-primary);
}

.ai-chat-input::placeholder {
  color: var(--color-gray-400);
}

.ai-chat-send {
  padding: 10px 18px;
  background: var(--color-primary);
  color: var(--color-white);
  border: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}

.ai-chat-send:hover {
  background: var(--color-primary-dark);
}

@media (max-width: 480px) {
  .ai-chat-panel {
    width: calc(100vw - 16px);
    height: calc(100vh - 80px);
    bottom: 8px;
    right: 8px;
  }
}

/* ===== Legal & Manual Pages ===== */
.page-hero-legal {
  background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
  color: #fff;
}

.page-hero-legal .section-title {
  color: #fff;
}

.page-hero-legal .hero-product-desc {
  color: rgba(255, 255, 255, 0.9);
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.hero-badge {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.legal-page-section {
  padding: 48px 0 80px;
  background: #f8fafc;
}

.legal-page-content {
  max-width: 960px;
}

.legal-section {
  margin-bottom: 48px;
}

.legal-section h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-dark);
  border-bottom: 3px solid var(--color-primary);
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.legal-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-dark);
  margin: 20px 0 10px;
}

.legal-section p {
  font-size: 15px;
  color: var(--color-gray-700);
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 20px;
  list-style: disc;
  color: var(--color-gray-700);
  font-size: 15px;
  margin-bottom: 12px;
}

.legal-section ol {
  list-style: decimal;
}

.legal-section li {
  margin-bottom: 6px;
  line-height: 1.7;
}

.legal-section strong {
  color: var(--color-dark);
}

.legal-section a {
  color: var(--color-primary);
}

.legal-section a:hover {
  text-decoration: underline;
}

.info-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-100);
  padding: 20px 24px;
  margin-bottom: 20px;
}

.info-card h3 {
  margin-top: 0;
}

.highlight-box {
  background: #eff6ff;
  border-left: 4px solid var(--color-primary);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--color-gray-700);
}

.highlight-box strong {
  color: var(--color-primary);
}

.warn-box {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--color-gray-700);
}

.warn-box strong {
  color: #d97706;
}

.danger-box {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 15px;
  color: var(--color-gray-700);
}

.danger-box strong {
  color: #dc2626;
}

.last-updated {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 16px 24px;
  margin-bottom: 40px;
  border: 1px solid var(--color-gray-100);
  text-align: center;
  color: var(--color-gray-500);
  font-size: 15px;
}

.ad-provider {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.ad-provider-card {
  flex: 1;
  min-width: 240px;
  background: var(--color-white);
  border-radius: var(--radius);
  border: 1px solid var(--color-gray-100);
  padding: 20px;
}

.ad-provider-card h4 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.ad-provider-card p {
  font-size: 14px;
  color: var(--color-gray-700);
  margin-bottom: 4px;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-gray-100);
}

.legal-links a {
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 500;
}

.legal-links a:hover {
  text-decoration: underline;
}

/* Manual page specific */
.toc {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 40px;
  border: 1px solid var(--color-gray-100);
}

.toc h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--color-primary);
}

.toc ol {
  padding-left: 20px;
  columns: 2;
  list-style: decimal;
}

.toc li {
  margin-bottom: 8px;
  font-size: 14px;
  break-inside: avoid;
  color: var(--color-gray-700);
}

.toc a {
  color: var(--color-primary);
}

.toc a:hover {
  text-decoration: underline;
}

.feature-row {
  display: flex;
  gap: 32px;
  align-items: center;
  margin-bottom: 40px;
}

.feature-row.reverse {
  flex-direction: row-reverse;
}

.feature-text {
  flex: 1;
}

.feature-text h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--color-dark);
}

.feature-text p {
  color: var(--color-gray-700);
  font-size: 15px;
  margin-bottom: 12px;
}

.feature-text ul {
  padding-left: 18px;
  color: var(--color-gray-700);
  font-size: 14px;
  list-style: disc;
}

.feature-text ul li {
  margin-bottom: 4px;
}

.feature-img {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.screenshot-img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.2s;
}

.screenshot-img:hover {
  transform: scale(1.02);
}

.step-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-100);
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 16px;
}

.step-num {
  width: 40px;
  height: 40px;
  background: var(--color-primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.step-content h4 {
  font-size: 17px;
  margin-bottom: 6px;
  color: var(--color-dark);
}

.step-content p {
  color: var(--color-gray-700);
  font-size: 14px;
}

.step-content ul {
  padding-left: 18px;
  list-style: disc;
  color: var(--color-gray-700);
  font-size: 14px;
}

.step-content li {
  margin-bottom: 4px;
}

/* Screenshot language switching */
html[lang="zh-CN"] .screenshot-en { display: none; }
html[lang="en"] .screenshot-zh { display: none; }

@media (max-width: 768px) {
  .feature-row {
    flex-direction: column !important;
  }

  .feature-img {
    min-height: auto;
  }

  .toc ol {
    columns: 1;
  }

  .step-card {
    flex-direction: column;
  }

  .ad-provider {
    flex-direction: column;
  }
}

/* ===== Footer ===== */
.footer {
  padding: 32px 0;
  text-align: center;
  background: var(--color-dark);
  color: var(--color-gray-400);
  font-size: 14px;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--color-dark);
  color: var(--color-white);
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 200;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero {
    padding: 120px 0 80px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 18px;
  }

  .hero-desc {
    font-size: 15px;
  }

  section {
    padding: 64px 0;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 40px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-100);
    padding: 16px 24px;
    gap: 4px;
    transform: translateY(-100%);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
    pointer-events: none;
    z-index: 99;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .logo img {
    height: 56px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}