/* ===== CSS Variables & Theme ===== */
:root {
  /* Backgrounds - warm and inviting, NOT white */
  --bg-primary: #f5f0eb;
  --bg-secondary: #ece6de;
  --bg-card: #ffffff;
  --bg-card-hover: #faf7f3;
  --bg-elevated: #ffffff;

  /* Text */
  --text-primary: #1a1a2e;
  --text-secondary: #55557a;
  --text-muted: #9999b0;

  /* Accent colors - vibrant and premium */
  --accent-1: #4361ee;
  --accent-2: #06d6a0;
  --accent-3: #ef476f;
  --accent-4: #ffd166;
  --accent-5: #7b2cbf;

  /* Gradients */
  --gradient-1: linear-gradient(135deg, #4361ee, #06d6a0);
  --gradient-2: linear-gradient(135deg, #ef476f, #7b2cbf);
  --gradient-3: linear-gradient(135deg, #ffd166, #ef476f);
  --gradient-hero: linear-gradient(135deg, #e8e0f8 0%, #dce8f8 50%, #e0f5ee 100%);

  /* Glows & Shadows */
  --glow-primary: rgba(67, 97, 238, 0.15);
  --glow-secondary: rgba(6, 214, 160, 0.15);
  --shadow-sm: 0 1px 3px rgba(26, 26, 46, 0.06), 0 1px 2px rgba(26, 26, 46, 0.04);
  --shadow-md: 0 4px 12px rgba(26, 26, 46, 0.08), 0 2px 4px rgba(26, 26, 46, 0.04);
  --shadow-lg: 0 12px 40px rgba(26, 26, 46, 0.1), 0 4px 12px rgba(26, 26, 46, 0.06);
  --shadow-xl: 0 20px 60px rgba(26, 26, 46, 0.12);

  /* Borders */
  --border-color: rgba(26, 26, 46, 0.08);
  --border-color-hover: rgba(67, 97, 238, 0.3);

  /* Layout */
  --header-height: 72px;
  --max-width: 1200px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== Subtle Background Pattern ===== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(67, 97, 238, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 20%, rgba(6, 214, 160, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(239, 71, 111, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(245, 240, 235, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: none;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-1);
  opacity: 0.6;
}

.header-inner {
  width: 100%;
  max-width: var(--max-width);
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 18px;
  border-radius: 100px;
  position: relative;
}

.header-nav a:hover {
  color: var(--accent-1);
  background: rgba(67, 97, 238, 0.06);
}

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

.header-logo svg {
  width: 36px;
  height: 36px;
}

.header-logo span {
  font-size: 22px;
  font-weight: 700;
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ===== Main Content ===== */
.main-content {
  padding-top: var(--header-height);
  min-height: calc(100vh - var(--header-height) - 200px);
  position: relative;
  z-index: 1;
}

/* ===== Hero Section ===== */
.hero {
  padding: 100px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -72px;
  left: 0;
  right: 0;
  height: calc(100% + 72px);
  background: var(--gradient-hero);
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 18px 6px 8px;
  background: rgba(67, 97, 238, 0.08);
  border: 1px solid rgba(67, 97, 238, 0.15);
  border-radius: 100px;
  font-size: 13px;
  color: var(--accent-1);
  margin-bottom: 28px;
  letter-spacing: 0.3px;
  font-weight: 500;
}

.hero-badge::before {
  content: '✨';
  font-size: 15px;
}

.hero h1 {
  font-size: clamp(2.8rem, 7vw, 4.2rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
  max-width: 700px;
}

.hero h1 .highlight {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 0 36px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

/* ===== Stats Bar ===== */
.stats-bar {
  display: flex;
  justify-content: space-around;
  gap: 16px;
  padding: 32px 40px;
  max-width: var(--max-width);
  margin: -40px auto 0;
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.stat-item {
  text-align: center;
  flex: 1;
}

.stat-item .stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-1);
  line-height: 1.2;
}

.stat-item:nth-child(2) .stat-number {
  color: var(--accent-3);
}

.stat-item:nth-child(3) .stat-number {
  color: var(--accent-2);
}

.stat-item .stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 4px;
  display: block;
}

/* ===== Tools Grid ===== */
.tools-section {
  padding: 20px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.tools-section > .section-header {
  text-align: center;
  margin-bottom: 56px;
}

.tools-section > .section-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.tools-section > .section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px 32px;
  text-align: left;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 4px;
  background: var(--gradient-1);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.tool-card:nth-child(2)::before {
  background: var(--gradient-2);
}

.tool-card:nth-child(3)::before {
  background: var(--gradient-3);
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color-hover);
  transform: scale(1.02);
}

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

.tool-icon {
  width: 60px;
  height: 60px;
  margin: 0 0 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
  transform: scale(1.1);
}

.tool-card:nth-child(1) .tool-icon {
  background: rgba(67, 97, 238, 0.1);
  color: var(--accent-1);
}

.tool-card:nth-child(2) .tool-icon {
  background: rgba(239, 71, 111, 0.1);
  color: var(--accent-3);
}

.tool-card:nth-child(3) .tool-icon {
  background: rgba(6, 214, 160, 0.1);
  color: var(--accent-2);
}

.tool-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.tool-card p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ===== Section Divider ===== */
.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section-divider hr {
  border: none;
  border-top: 1px solid var(--border-color);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  font-family: inherit;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--gradient-1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(67, 97, 238, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(67, 97, 238, 0.35);
}

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

.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(67, 97, 238, 0.06);
  color: var(--accent-1);
}

.btn-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== Footer ===== */
.footer {
  background: var(--bg-secondary);
  padding: 56px 24px 28px;
  position: relative;
  z-index: 1;
  border-top: none;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-1);
  opacity: 0.5;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-top: 12px;
  max-width: 300px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  padding: 5px 0;
  transition: color 0.3s ease;
}

.footer-col a:hover {
  color: var(--accent-1);
}

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  color: var(--text-muted);
  font-size: 13px;
}

/* ===== Page Header ===== */
.page-header {
  text-align: center;
  padding: 80px 24px 40px;
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 300px;
  background: var(--gradient-hero);
  z-index: -1;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 0 100%);
}

.page-header h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ===== Tool Page Layout ===== */
.tool-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.tool-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 40px;
  margin-bottom: 40px;
  box-shadow: var(--shadow-sm);
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group textarea,
.form-group input[type="text"] {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s ease;
  resize: vertical;
}

.form-group textarea:focus,
.form-group input[type="text"]:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px var(--glow-primary);
}

.form-group textarea {
  min-height: 100px;
}

.form-group input[type="text"] {
  min-height: 48px;
}

/* ===== Result Area ===== */
.result-area {
  display: none;
}

.result-area.show {
  display: block;
  animation: fadeUp 0.4s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 36px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.result-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text-secondary);
}

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

/* ===== Loading Spinner ===== */
.loading {
  display: none;
  text-align: center;
  padding: 60px 24px;
}

.loading.show {
  display: block;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(67, 97, 238, 0.1);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto 18px;
}

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

.loading p {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* ===== Legal Pages ===== */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 100px;
}

.legal-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-primary);
}

.legal-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 12px;
}

.legal-content ul,
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-content strong {
  color: var(--text-primary);
}

.legal-content .last-updated {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

/* Data collection table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0 32px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.data-table th,
.data-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9rem;
}

.data-table th {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  color: var(--text-secondary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(67, 97, 238, 0.02);
}

/* ===== Contact Page ===== */
.contact-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 60px 24px 100px;
  text-align: center;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-2xl);
  padding: 60px 40px;
  box-shadow: var(--shadow-sm);
}

.contact-icon {
  font-size: 52px;
  margin-bottom: 20px;
}

.contact-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-card p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.contact-email {
  display: inline-block;
  padding: 14px 36px;
  background: var(--gradient-1);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(67, 97, 238, 0.2);
}

.contact-email:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(67, 97, 238, 0.3);
}

/* ===== Grid Utilities ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.usecases-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

/* ===== Utilities ===== */
.gradient-text {
  background: var(--gradient-1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== Blog Styles ===== */
.blog-page .blog-hero {
  text-align: center;
  padding: 60px 24px 40px;
  position: relative;
}

.blog-page .blog-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 280px;
  background: var(--gradient-hero);
  z-index: -1;
}

.blog-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.blog-hero p {
  color: var(--text-secondary);
  margin-bottom: 32px;
}

.blog-search {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.blog-search input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.blog-search input:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px var(--glow-primary);
}

.blog-search .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.4;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.blog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-color-hover);
  transform: translateY(-3px);
}

.blog-card .card-tag {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(67, 97, 238, 0.08);
  color: var(--accent-1);
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 14px;
  align-self: flex-start;
}

.blog-card h3 {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card .excerpt {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blog-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px 80px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
}

.pagination button {
  padding: 10px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
}

.pagination button:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

.pagination button.active {
  background: var(--gradient-1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
}

.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.no-results {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-muted);
  font-size: 1rem;
  grid-column: 1 / -1;
}

/* ===== Article Page ===== */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.article-page h1 {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.article-page .article-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}
.article-page h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 40px 0 16px;
  color: var(--text-primary);
}
.article-page h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--text-primary);
}
.article-page p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
}
.article-page ul, .article-page ol {
  padding-left: 24px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.85;
}
.article-page li {
  margin-bottom: 8px;
}
.article-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-1);
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 24px;
  font-weight: 500;
}
.article-page .back-link:hover {
  text-decoration: underline;
}

/* ===== Shared Guide Card & FAQ Styles ===== */
.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  border-left: 3px solid var(--accent-1);
}

.guide-card:nth-of-type(2) {
  border-left-color: var(--accent-2);
}

.guide-card:nth-of-type(3) {
  border-left-color: var(--accent-3);
}
.guide-card h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}
.guide-card p,
.guide-card li {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}
.guide-card ul {
  padding-left: 20px;
}
.faq-item {
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-q {
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-primary);
  padding: 4px 0;
  transition: color 0.3s;
}
.faq-q:hover {
  color: var(--accent-1);
}
.faq-q::after {
  content: '+';
  font-size: 20px;
  color: var(--accent-1);
  font-weight: 300;
  transition: transform 0.3s;
}
.faq-q.open::after {
  content: '−';
  transform: rotate(180deg);
}
.faq-a {
  max-height: 0 !important;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  padding-top: 0;
}
.faq-a.open {
  max-height: 500px !important;
  padding-top: 12px;
}

/* ===== Smart Q&A Styles ===== */
.qa-page .qa-chat {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  max-height: 520px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
}

.qa-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  max-width: 80%;
}

.qa-user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.qa-bot {
  align-self: flex-start;
}

.qa-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
}

.qa-user .qa-avatar {
  background: var(--accent-1);
  border-color: var(--accent-1);
}

.qa-bubble {
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: 4px 16px 16px 16px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  word-break: break-word;
}

.qa-user .qa-bubble {
  background: var(--accent-1);
  border-color: var(--accent-1);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}

.qa-bubble strong {
  color: var(--text-primary);
}

.qa-user .qa-bubble strong {
  color: #fff;
}

.qa-input-area {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.qa-input-area textarea {
  flex: 1;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 15px;
  font-family: inherit;
  resize: none;
  transition: all 0.3s;
  min-height: 52px;
  box-shadow: var(--shadow-sm);
}

.qa-input-area textarea:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px var(--glow-primary);
}

.qa-input-area .btn {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

/* ===== Game Page Styles ===== */
.game-mode-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.game-mode-btn {
  flex: 1;
  padding: 18px 16px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
}

.game-mode-btn:hover {
  border-color: var(--accent-2);
  background: rgba(6, 214, 160, 0.04);
  transform: translateY(-2px);
}

.game-mode-btn.active {
  border-color: var(--accent-2);
  background: rgba(6, 214, 160, 0.08);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(6, 214, 160, 0.15);
}

.game-mode-btn .mode-icon {
  font-size: 28px;
  display: block;
  margin-bottom: 6px;
}

.game-mode-btn .mode-label {
  font-weight: 600;
  font-size: 15px;
  display: block;
  margin-bottom: 4px;
}

.game-mode-btn .mode-desc {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
}

.game-status-bar {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.status-item {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.status-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  font-weight: 600;
}

.status-value {
  display: block;
  font-size: 26px;
  font-weight: 800;
}

.status-item:nth-child(1) .status-value {
  color: var(--accent-1);
}
.status-item:nth-child(2) .status-value {
  color: var(--accent-3);
}
.status-item:nth-child(3) .status-value {
  color: var(--accent-2);
}

.game-area {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 20px;
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
  box-shadow: var(--shadow-sm);
  background-image: radial-gradient(circle at 20% 30%, rgba(67,97,238,0.02) 0%, transparent 50%);
}

.game-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chain-hint {
  width: 100%;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 40px 0;
}

.chain-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 15px;
}

.chain-player {
  background: rgba(67, 97, 238, 0.08);
  border: 1px solid rgba(67, 97, 238, 0.2);
}

.chain-ai {
  background: rgba(6, 214, 160, 0.08);
  border: 1px solid rgba(6, 214, 160, 0.2);
}

.chain-ai-surrender {
  background: rgba(239, 71, 111, 0.08);
  border: 1px solid rgba(239, 71, 111, 0.2);
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}

.chain-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.chain-player .chain-label {
  color: var(--accent-1);
}

.chain-ai .chain-label {
  color: var(--accent-2);
}

.chain-word {
  font-weight: 600;
  color: var(--text-primary);
}

.chain-arrow {
  color: var(--text-muted);
  font-size: 16px;
  margin: 0 4px;
}

.game-input-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 28px;
}

.game-input-wrap {
  flex: 1;
}

.game-input-wrap input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s;
  box-shadow: var(--shadow-sm);
  min-height: 52px;
}

.game-input-wrap input:focus {
  outline: none;
  border-color: var(--accent-1);
  box-shadow: 0 0 0 4px var(--glow-primary);
}

.game-input-row .btn {
  flex-shrink: 0;
  min-width: 100px;
  justify-content: center;
}

/* ===== Extract Page Styles ===== */
.json-result-container {
  text-align: left;
}

.json-output {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--accent-1);
  overflow-x: auto;
  white-space: pre;
  max-height: 400px;
  overflow-y: auto;
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-grid > .footer-brand {
    grid-column: 1 / -1;
  }
  .steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats-bar {
    gap: 32px;
  }
}

@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .header-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(245, 240, 235, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid var(--border-color);
  }

  .header-nav.active {
    display: flex;
  }

  .header-nav a {
    padding: 12px 16px;
    font-size: 15px;
  }

  .hamburger {
    display: flex;
  }

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

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

  .tool-form {
    padding: 24px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .usecases-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar {
    flex-wrap: wrap;
    gap: 16px;
    padding: 24px 20px;
  }
  .stat-item {
    min-width: calc(33% - 16px);
  }

  /* Mobile spacing */
  .page-header {
    padding: 60px 20px 24px;
  }
  .page-header h1 {
    font-size: 2rem;
  }
  .page-header p {
    font-size: 1rem;
  }
  .tool-page {
    padding: 24px 16px 60px;
  }
  .guide-card {
    padding: 20px;
  }
  .result-card {
    padding: 24px;
  }
  .tools-section {
    padding: 20px 16px 60px;
  }
  .hero {
    padding: 80px 20px 60px;
  }
  .hero::before {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
  }

  /* Q&A mobile */
  .qa-message {
    max-width: 95%;
  }
  .qa-chat {
    max-height: 400px;
    padding: 16px;
  }
  .qa-input-area {
    flex-direction: column;
  }
  .qa-input-area .btn {
    width: 100%;
    justify-content: center;
  }

  /* Game mobile */
  .game-status-bar {
    flex-wrap: wrap;
  }
  .status-item {
    min-width: calc(50% - 12px);
  }
  .game-input-row {
    flex-wrap: wrap;
  }
  .game-input-wrap {
    flex: 0 0 100%;
    margin-bottom: 10px;
  }
  .game-input-row .btn {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }

  /* Extract mobile */
  .json-output {
    font-size: 12px;
    padding: 16px;
  }

  /* Article mobile */
  .article-page {
    padding: 24px 16px 60px;
  }
  .article-page h1 {
    font-size: 1.6rem;
  }
  .article-page h2 {
    font-size: 1.2rem;
  }

  /* Contact mobile */
  .contact-page {
    padding: 40px 16px 60px;
  }

  /* Blog mobile */
  .blog-page .blog-hero {
    padding: 40px 16px 30px;
  }
  .blog-hero h1 {
    font-size: 1.8rem;
  }
}

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

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

  .hero {
    padding: 60px 16px 40px;
  }
  .hero h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
  }
  .hero p {
    font-size: 0.95rem;
  }
  .hero::before {
    left: -5%;
    right: -5%;
  }

  .tool-page {
    padding: 16px 12px 40px;
  }
  .tool-form {
    padding: 16px;
  }
  .guide-card {
    padding: 16px;
  }
  .result-card {
    padding: 16px;
  }
  .result-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .page-header {
    padding: 50px 16px 20px;
  }
  .page-header h1 {
    font-size: 1.6rem;
  }

  .legal-content {
    padding: 24px 16px 60px;
  }
  .contact-card {
    padding: 40px 20px;
  }
  .stats-bar {
    gap: 12px;
    padding: 20px 16px;
    margin-top: -30px;
  }
  .stat-item {
    min-width: 100%;
  }
  .stat-item .stat-number {
    font-size: 1.6rem;
  }
  .tool-card {
    padding: 28px 22px;
  }

  /* Game mobile small */
  .status-item {
    min-width: 100%;
  }
  .game-chain {
    flex-direction: column;
    align-items: flex-start;
  }
  .chain-arrow {
    transform: rotate(90deg);
  }

  /* Blog page */
  .blog-grid {
    padding: 0 16px;
    gap: 12px;
  }
  .blog-card {
    padding: 20px;
  }

  /* Article */
  .article-page {
    padding: 16px 12px 40px;
  }
}

@media (max-width: 380px) {
  .tools-grid {
    gap: 16px;
  }
  .tool-card {
    padding: 24px 18px;
  }
  .tool-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
    margin-bottom: 16px;
  }
}