/*
Theme Name: imToken SEO Theme
Theme URI: https://example.com
Description: 专为 imToken 钱包 SEO 优化设计的 WordPress 主题，支持简体中文和香港繁体中文
Version: 1.0
Author: Your Name
Text Domain: imtoken-seo
*/

/* ===== Reset & Base ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --secondary: #34a853;
  --danger: #ea4335;
  --warning: #fbbc04;
  --text: #202124;
  --text-light: #5f6368;
  --bg: #ffffff;
  --bg-gray: #f8f9fa;
  --bg-dark: #1a1a2e;
  --border: #dadce0;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.15);
  --font: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-hk: 'PingFang HK', 'Microsoft JhengHei', 'Noto Sans TC', sans-serif;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
}

.lang-hk body {
  font-family: var(--font-hk);
}

/* ===== Layout ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  background: var(--bg-dark);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.site-logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.site-logo span {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.3px;
}

.site-nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
}

.lang-switcher {
  display: flex;
  gap: 4px;
  margin-left: 16px;
  border-left: 1px solid rgba(255,255,255,0.2);
  padding-left: 16px;
}

.lang-switcher a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.lang-switcher a:hover,
.lang-switcher a.active {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
}

/* ===== Hero Section ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #ffffff;
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(26,115,232,0.15) 0%, transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(52,168,83,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(52,168,83,0.15);
  border: 1px solid rgba(52,168,83,0.3);
  color: #4ade80;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '✓';
  width: 16px;
  height: 16px;
  background: #34a853;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.hero h1 em {
  font-style: normal;
  color: #60a5fa;
}

.hero p.subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(26,115,232,0.4);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,115,232,0.5);
}

.btn-success {
  background: var(--secondary);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(52,168,83,0.4);
}

.btn-success:hover {
  background: #2d9248;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.4);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}

.btn-lg {
  padding: 18px 36px;
  font-size: 18px;
  border-radius: 12px;
}

/* ===== Trust Bar ===== */
.trust-bar {
  background: var(--bg-gray);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.trust-bar .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-light);
  font-weight: 500;
}

.trust-item .icon {
  font-size: 20px;
}

.trust-item strong {
  color: var(--text);
}

/* ===== Section ===== */
.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-gray);
}

.section-dark {
  background: var(--bg-dark);
  color: #ffffff;
}

.section-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-light);
  margin-bottom: 48px;
  max-width: 560px;
}

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

/* ===== Download Cards ===== */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.download-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.download-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

.download-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}

.download-card:hover::before {
  opacity: 1;
}

.download-card .platform-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.download-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.download-card p {
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.5;
}

.download-card .btn {
  width: 100%;
  justify-content: center;
}

.download-card .store-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 12px;
}

.download-card .store-badge::before {
  content: '✓';
  color: var(--secondary);
  font-weight: 700;
}

/* ===== Security Warning Box ===== */
.security-box {
  background: linear-gradient(135deg, #fff8e1, #fff3cd);
  border: 1px solid #ffc107;
  border-left: 4px solid #ff9800;
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 32px 0;
}

.security-box.danger {
  background: linear-gradient(135deg, #fce8e6, #fde8e8);
  border-color: #ea4335;
  border-left-color: #c62828;
}

.security-box.success {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-color: #34a853;
  border-left-color: #1b5e20;
}

.security-box-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.security-box ul {
  list-style: none;
  padding: 0;
}

.security-box ul li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
}

.security-box ul li::before {
  position: absolute;
  left: 0;
  font-weight: 700;
}

.security-box.danger ul li::before {
  content: '✗';
  color: var(--danger);
}

.security-box.success ul li::before {
  content: '✓';
  color: var(--secondary);
}

.security-box ul li::before {
  content: '⚠';
  color: #ff9800;
}

/* ===== Steps ===== */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.step-item {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
}

.step-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

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

.step-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-content p {
  color: var(--text-light);
  line-height: 1.6;
}

.step-content code {
  background: var(--bg-gray);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 14px;
  color: var(--primary-dark);
}

/* ===== Feature Grid ===== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: all 0.3s;
}

.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--primary);
}

.feature-card .feature-icon {
  font-size: 36px;
  margin-bottom: 16px;
  display: block;
}

.feature-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== FAQ ===== */
.faq-list {
  list-style: none;
  padding: 0;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  transition: background 0.2s;
  user-select: none;
}

.faq-question:hover {
  background: var(--bg-gray);
}

.faq-question::after {
  content: '+';
  font-size: 24px;
  color: var(--primary);
  font-weight: 300;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq-item.open .faq-question::after {
  transform: rotate(45deg);
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s;
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.7;
  background: var(--bg-gray);
}

.faq-item.open .faq-answer {
  max-height: 400px;
  padding: 20px 24px;
}

/* ===== Comparison Table ===== */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 15px;
}

.comparison-table thead {
  background: var(--bg-dark);
  color: #ffffff;
}

.comparison-table thead th {
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.comparison-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}

.comparison-table tbody tr:hover {
  background: var(--bg-gray);
}

.comparison-table tbody td {
  padding: 14px 20px;
  vertical-align: middle;
}

.comparison-table tbody td:first-child {
  font-weight: 600;
}

.check {
  color: var(--secondary);
  font-weight: 700;
}

.cross {
  color: var(--danger);
}

/* ===== Alert / Notice ===== */
.notice {
  background: #e8f0fe;
  border: 1px solid #4285f4;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 14px;
  color: #1a73e8;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 24px 0;
}

.notice-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-light);
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
}

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

.breadcrumb span {
  margin: 0 6px;
  color: var(--border);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255,255,255,0.7);
  padding: 60px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  font-size: 14px;
  line-height: 1.7;
  margin-top: 16px;
  max-width: 280px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  font-size: 13px;
}

.footer-disclaimer {
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 32px;
  color: rgba(255,255,255,0.5);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .site-nav {
    display: none;
  }

  .hero {
    padding: 48px 0 40px;
  }

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

  .btn-lg {
    width: 100%;
    max-width: 320px;
    justify-content: center;
  }

  .trust-bar .container {
    gap: 20px;
  }

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

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

  .comparison-table {
    font-size: 13px;
  }

  .comparison-table thead th,
  .comparison-table tbody td {
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
