:root {
  --primary: #c8960c;
  --primary-light: #e8bf4a;
  --bg-dark: #09080c;
  --surface: #13110a;
  --surface-sec: #1e1a0e;
  --text-main: #f5e9b0;
  --text-sec: #a8996a;
  --success: #4caf6e;
  --border: #3a2e10;
  --gradient: linear-gradient(90deg, #c8960c, #e8bf4a);

  --font-display: "Cinzel", serif;
  --font-body: "DM Sans", sans-serif;
  --font-accent: "Cinzel Decorative", serif;

  --radius-sm: 8px;
  --radius-pill: 999px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
}
a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul {
  list-style: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-align: center;
  gap: 12px;
}

.btn-primary {
  background: var(--gradient);
  color: var(--bg-dark);
  font-weight: 700;
}
.btn-primary:hover {
  box-shadow: 0 0 15px rgba(200, 150, 12, 0.4);
  transform: translateY(-2px);
}
.btn-secondary {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--primary);
}
.btn-secondary:hover {
  background: rgba(200, 150, 12, 0.1);
  border-color: var(--primary-light);
}

.btn-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Utilities */
.text-gold {
  color: var(--primary);
}
.text-sec {
  color: var(--text-sec);
}
.text-center {
  text-align: center;
}
.bg-dark {
  background-color: var(--bg-dark);
}
.bg-surface {
  background-color: var(--surface);
}

section {
  padding: 72px 5%;
}
@media (max-width: 767px) {
  section {
    padding: 48px 5%;
  }
}

.section-header {
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 32px;
  border-left: 3px solid var(--primary);
  padding-left: 16px;
  line-height: 1.2;
}
.section-header.center h2 {
  border-left: none;
  padding-left: 0;
  text-align: center;
}

/* Navbar - Default dark for inner pages */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 5%;
  z-index: 1000;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}
.navbar.scrolled {
  padding: 12px 5%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  flex-grow: 1;
  justify-content: space-between;
  margin-left: 40px;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}
.nav-actions {
  display: flex;
  gap: 16px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}
.menu-toggle span {
  width: 25px;
  height: 2px;
  background: var(--text-main);
  transition: 0.3s;
}

/* Hero (Download Page) */
.hero {
  position: relative;
  width: 100vw;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 180px 5% 80px;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, var(--bg-dark) 40%, transparent 100%);
  z-index: -1;
}
.hero-content {
  max-width: 620px;
  z-index: 1;
  text-align: center;
}
.hero h1 {
  font-size: 42px;
  margin-bottom: 24px;
  line-height: 1.1;
}
.hero p {
  font-size: 16px;
  color: var(--text-sec);
  margin-bottom: 40px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Standard Content */
.content-p {
  font-size: 16px;
  color: var(--text-sec);
  margin-bottom: 24px;
  line-height: 1.7;
}

/* Benefits Cards Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.benefit-card {
  background: var(--surface-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
  min-height: 160px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.benefit-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}
.benefit-icon {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  margin-bottom: 16px;
}
.benefit-card h3 {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 8px;
}
.benefit-card p {
  font-size: 13px;
  color: var(--text-sec);
  flex-grow: 1;
  line-height: 1.7;
}

/* Split Section & Vertical Steps */
.split-section {
  display: grid;
  align-items: flex-start;
  gap: 48px;
}
.split-text-first {
  grid-template-columns: 6fr 4fr;
}
.split-img-first {
  grid-template-columns: 4fr 6fr;
}
.split-img {
  width: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
  position: sticky;
  top: 120px;
}

.vertical-steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.v-step-item {
  display: flex;
  position: relative;
}
.v-step-num {
  font-family: var(--font-accent);
  font-size: 24px;
  color: var(--primary);
  width: 48px;
  flex-shrink: 0;
  text-align: left;
}
.v-step-content {
  flex-grow: 1;
  padding-bottom: 16px;
}
.v-step-content h3 {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 8px;
}
.v-step-content p {
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 0;
}

.vertical-steps.desktop-divider .v-step-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 32px;
  bottom: -16px;
  width: 2px;
  border-left: 2px dashed var(--border);
}

/* Compatibility Note */
.compat-note {
  background: var(--surface-sec);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  padding: 16px;
  margin-top: 32px;
  margin-bottom: 32px;
  font-size: 13px;
  color: var(--text-sec);
}

.safari-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}
.safari-note::before {
  content: "";
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  transform: rotate(45deg);
  margin-top: 6px;
  flex-shrink: 0;
}
.safari-note span {
  font-size: 13px;
  color: var(--primary-light);
  font-weight: 500;
}

/* Comparison Table (Desktop) */
.comparison-container {
  max-width: 860px;
  margin: 0 auto;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.comparison-table th,
.comparison-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.comparison-table th {
  background: var(--surface-sec);
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-main);
}
.comparison-table tr:nth-child(even) td {
  background: var(--surface);
}
.comparison-table tr:nth-child(odd) td {
  background: var(--bg-dark);
}
.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td:nth-child(1) {
  color: var(--text-sec);
  font-size: 14px;
  width: 40%;
}
.comparison-table td:nth-child(2) {
  color: var(--text-main);
  font-size: 14px;
  width: 30%;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
.comparison-table td:nth-child(3) {
  color: var(--text-sec);
  font-size: 14px;
  width: 30%;
}

.check-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  color: var(--success);
  margin-right: 8px;
  vertical-align: text-bottom;
}
.check-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}
.dash-icon {
  display: inline-block;
  width: 12px;
  height: 2px;
  background-color: var(--text-sec);
  margin-right: 8px;
  vertical-align: middle;
}

/* System Requirements */
.sys-req-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.sys-req-card {
  background: var(--surface-sec);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 24px;
}
.sys-req-card h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--text-main);
  margin-bottom: 16px;
}
.sys-req-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--text-sec);
  line-height: 1.8;
}
.sys-req-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  transform: rotate(45deg);
}

/* FAQ */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 18px;
  text-align: left;
}
.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: var(--primary);
  transition: var(--transition);
}
.faq-icon::before {
  top: 9px;
  left: 0;
  width: 20px;
  height: 2px;
}
.faq-icon::after {
  top: 0;
  left: 9px;
  width: 2px;
  height: 20px;
}
.faq-item.active .faq-icon::after {
  transform: rotate(90deg);
  opacity: 0;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--text-sec);
  font-size: 15px;
  line-height: 1.7;
}
.faq-answer-inner {
  padding-bottom: 24px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: -8px;
}

/* Footer */
footer {
  background: var(--surface);
  padding: 60px 5% 24px;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary);
}
.footer-col p {
  font-size: 14px;
  color: var(--text-sec);
  margin-bottom: 16px;
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-sec);
  transition: color 0.2s;
}
.footer-links a:hover {
  color: var(--primary);
}
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-sec);
}
.license-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--border);
  border: 1px solid var(--primary);
  color: var(--primary-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Floating CTA */
.floating-cta {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}
.floating-cta.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Responsive */
@media (max-width: 1023px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sys-req-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .menu-toggle {
    display: flex;
  }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    margin-left: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 24px 5%;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
  }
  .navbar.menu-open .nav-menu {
    display: flex;
  }
  .nav-links {
    flex-direction: column;
    width: 100%;
    text-align: center;
    gap: 20px;
    margin-bottom: 24px;
  }
  .nav-actions {
    flex-direction: column;
    width: 100%;
    gap: 16px;
  }
  .nav-actions .btn {
    width: 100%;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .hero h1 {
    font-size: 26px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .split-text-first .split-img,
  .split-img-first .split-img {
    order: -1;
    position: static;
    max-height: 240px;
  }
  .vertical-steps.desktop-divider .v-step-item:not(:last-child)::before {
    display: none;
  }

  .sys-req-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile Comparison Table (Card Style) - FIXED */
  .comparison-table,
  .comparison-table tbody,
  .comparison-table tr {
    display: block;
    width: 100%;
  }
  .comparison-table thead {
    display: none;
  }
  .comparison-table tr {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    background: var(--surface-sec) !important;
  }

  /* 強制覆寫 Desktop 的欄寬設定 */
  .comparison-table td,
  .comparison-table td:nth-child(1),
  .comparison-table td:nth-child(2),
  .comparison-table td:nth-child(3) {
    display: block;
    width: 100%;
    padding: 8px 0;
    border: none !important;
    background: transparent !important;
  }

  .comparison-table td:nth-child(1) {
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--text-main);
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 12px;
  }

  /* 使用 Flexbox 確保標籤與內容對齊不擠壓 */
  .comparison-table td:nth-child(2),
  .comparison-table td:nth-child(3) {
    display: flex;
    align-items: flex-start;
  }

  .comparison-table td:nth-child(2)::before {
    content: "App: ";
    font-weight: 500;
    color: var(--text-sec);
    display: inline-block;
    width: 75px;
    flex-shrink: 0;
  }
  .comparison-table td:nth-child(3)::before {
    content: "Browser: ";
    font-weight: 500;
    color: var(--text-sec);
    display: inline-block;
    width: 75px;
    flex-shrink: 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .floating-cta .btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }
  .floating-cta .btn::after {
    content: "↑";
    font-size: 20px;
    color: var(--bg-dark);
  }
}
