* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

/* A) Global Safety Rules */
img, svg, video, canvas {
  max-width: 100%;
  height: auto;
  display: block;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Background Gradients */
body::before {
  content: "";
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background: 
    radial-gradient(1200px 700px at 15% 20%, rgba(53,208,200,.12), transparent 55%),
    radial-gradient(1000px 600px at 85% 30%, rgba(106,168,255,.10), transparent 60%);
  pointer-events: none;
}

/* Layout */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.2; }
a { color: inherit; text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }
.mono { font-family: var(--font-mono); }

/* Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: #000;
}
.btn-secondary {
  background: var(--panel);
  border: 1px solid var(--line);
  color: #fff;
}
.btn-secondary:hover {
  background: var(--panel-hover);
}

.card {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px;
  margin-bottom: 20px;
  transition: transform .2s;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  background: rgba(5,9,13,.7);
}
.topbar-inner {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}
.logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
}
.nav-link {
  color: var(--muted);
}
.nav-link.active, .nav-link:hover {
  color: #fff;
}

/* Lang Toggle */
.lang-toggle {
  display: flex;
  background: var(--panel);
  border-radius: 99px;
  padding: 2px;
  margin-left: 10px;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 99px;
  cursor: pointer;
}
.lang-btn.active {
  background: var(--line);
  color: #fff;
}

/* Language Visibility Logic */
[data-lang-root="en"] .zh { display: none !important; }
[data-lang-root="zh-hant"] .en { display: none !important; }

/* Hero */
.hero {
  text-align: center;
  padding: 80px 20px 60px;
}
.hero h1 {
  font-size: 48px;
  background: linear-gradient(to right, #fff, #bbb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 20px;
}
.hero p {
  font-size: 20px;
  color: var(--muted);
  max-width: 600px;
  margin: 0 auto 40px;
}
.btn-row {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-left: 8px;
  vertical-align: middle;
}
.status-beta { background: rgba(53,208,200,.2); color: var(--accent); }
.status-soon { background: rgba(255,255,255,.1); color: var(--muted); }

/* Product Page Specific */
.product-hero {
  text-align: center;
  padding: 60px 20px 40px;
}
.product-hero h1 {
  font-size: 40px;
  margin-bottom: 10px;
}
.product-hero p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 24px;
}
.product-hero .btn-row {
  justify-content: center;
}
.badge-disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* 3. Screenshot Showcase (Grid + Lightbox) */
.ss-section {
  text-align: center;
  margin: 0 auto;
  width: 100%;
  max-width: 100%;
}

.ss-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
}

.ss-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: .2s;
}

.ss-tab.active {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* Grid Layout */
.ss-grid {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 10px;
}

/* iPhone Grid: 4-6 cols */
.ss-grid[data-device="iphone"] {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

/* iPad Grid: 2-3 cols */
.ss-grid[data-device="ipad"] {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ss-item {
  position: relative;
  cursor: pointer;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .2s, opacity .2s;
  background: rgba(255,255,255,0.05);
}

.ss-item:hover {
  transform: translateY(-4px);
  opacity: 0.9;
}

.ss-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Lightbox Overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
  opacity: 0;
  transition: opacity .3s;
}
.lightbox.open {
  display: flex;
  opacity: 1;
}

/* Lightbox Content Wrapper */
.lightbox-content {
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Device Frames in Lightbox */
.lb-frame {
  position: relative;
  background: #111;
  border: 4px solid #333;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* iPhone Frame Style */
.lb-frame.iphone {
  border-radius: 32px;
  aspect-ratio: 9 / 19.5;
  height: 80vh; /* Base height reference */
  max-height: 800px;
  width: auto;
}
/* Notch simulation */
.lb-frame.iphone::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 24px;
  background: #000;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  z-index: 10;
}

/* iPad Frame Style */
.lb-frame.ipad {
  border-radius: 24px;
  aspect-ratio: 4 / 3;
  width: 80vw;
  max-width: 1000px;
  height: auto;
  max-height: 80vh;
}

/* Image inside frame */
.lb-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #000;
}

/* Lightbox Controls */
.lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255,255,255,0.2);
  border: none;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  z-index: 2010;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  z-index: 2010;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.lb-nav:hover {
  background: rgba(255,255,255,0.3);
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }

@media (max-width: 768px) {
  .ss-grid[data-device="iphone"] {
    grid-template-columns: repeat(3, 1fr);
  }
  .ss-grid[data-device="ipad"] {
    grid-template-columns: repeat(2, 1fr);
  }
  .lb-nav { display: none; } /* Use swipe or tap edges */
  .lb-frame.iphone {
    height: 70vh;
  }
}

.features-list {
  margin-top: 16px;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.faq-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.faq-card {
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 18px;
  font-size: 14px;
}
.faq-card h3 {
  font-size: 15px;
  margin-bottom: 8px;
}

/* FAQ Details/Summary Styles */
.faq-group {
  margin-bottom: 32px;
}
.faq-group h2 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--accent2);
}
.faq-item {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px;
  cursor: pointer;
  font-weight: 500;
  list-style: none; /* Hide default triangle */
  position: relative;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 16px;
  color: var(--muted);
  font-weight: 300;
}
.faq-item[open] summary::after {
  content: '-';
}
.faq-answer {
  padding: 0 16px 16px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  border-top: 1px solid var(--line);
  margin-top: -8px; /* Visual tweak */
  padding-top: 16px;
}
.faq-answer a {
  color: var(--accent);
  text-decoration: underline;
}

:root {
  --bg: #05090d;
  --panel: rgba(255, 255, 255, .06);
  --panel-hover: rgba(255, 255, 255, .10);
  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .68);
  --line: rgba(255, 255, 255, .14);
  --accent: #35d0c8;
  --accent2: #6aa8ff;
  --shadow: 0 18px 60px rgba(0, 0, 0, .55);
  --radius: 18px;
  --max: 1080px;
  --font-sans: "Inter", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Support Page Overrides */
.support-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 120px 24px 60px;
}
.support-header {
  margin-bottom: 60px;
}
.support-header h1 {
  font-size: 42px;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.support-header p {
  font-size: 18px;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.support-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
}
.support-card h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--text);
}
.support-list {
  padding-left: 20px;
  margin-bottom: 20px;
}
.support-list li {
  margin-bottom: 10px;
  color: var(--muted);
}
@media (max-width: 768px) {
  .support-header h1 {
    font-size: 32px;
  }
  .support-container {
    padding-top: 100px;
  }
}