:root {
  --accent: #8B5CF6;
  --accent-hover: #7C3AED;
  --text: #1F2937;
  --text-secondary: #6B7280;
  --bg: #FFFFFF;
  --bg-secondary: #F9FAFB;
  --border: #E5E7EB;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #F9FAFB;
    --text-secondary: #9CA3AF;
    --bg: #111827;
    --bg-secondary: #1F2937;
    --border: #374151;
  }
}

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

html {
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

nav {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
}

.logo img {
  border-radius: 8px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-links a:hover {
  color: var(--text);
}

.lang-switch {
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
}

/* Main */
main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  width: 100%;
}

/* Hero - Side by Side Layout */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 1rem 0 2rem;
}

.hero-info {
  text-align: left;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.hero .tagline {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-store-btn {
  display: inline-block;
}

.app-store-btn img {
  height: 44px;
}

.hero-screenshot {
  display: flex;
  justify-content: center;
}

.hero-screenshot img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  transition: transform 0.2s;
}

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

/* Subtitle */
.subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* Outline Introduction */
.outline-intro {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.outline-intro-content {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.outline-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
}

.outline-intro h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.outline-intro p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.outline-intro a {
  color: var(--accent);
  text-decoration: none;
}

.outline-intro a:hover {
  text-decoration: underline;
}

.powered-by {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.powered-by img {
  width: 20px;
  height: 20px;
}

/* Sections */
.section {
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

/* Feature Cards */
.feature-card {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1rem;
}

.feature-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.feature-icon {
  width: 40px;
  height: 40px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  color: white;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0;
  font-weight: 600;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.feature-card ul {
  margin: 0.75rem 0;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.feature-card li {
  margin-bottom: 0.5rem;
}

.feature-detail {
  font-size: 0.85rem !important;
  color: var(--text-secondary);
  opacity: 0.8;
  margin-top: 0.75rem;
  margin-bottom: 0 !important;
}

/* Mode List */
.mode-list {
  margin: 1rem 0;
}

.mode-item {
  display: flex;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.mode-item:last-child {
  border-bottom: none;
}

.mode-name {
  font-weight: 600;
  min-width: 100px;
  color: var(--text);
}

.mode-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Comparison Table */
.comparison-table-wrapper {
  overflow-x: auto;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.comparison-table th,
.comparison-table td {
  padding: 0.875rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.comparison-table th {
  font-weight: 600;
  background: var(--bg-secondary);
}

.comparison-table th:first-child {
  border-radius: 8px 0 0 0;
}

.comparison-table th:last-child {
  border-radius: 0 8px 0 0;
}

.comparison-table td:not(:first-child) {
  text-align: center;
}

.comparison-table .check {
  color: #22C55E;
  font-weight: 600;
}

.comparison-table .cross {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* Legacy Features (keep for compatibility) */
.features {
  padding: 2rem 0;
}

.features h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-secondary);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature {
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: 12px;
  text-align: center;
}

.feature h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  opacity: 0.8;
}

.lightbox-close:hover {
  opacity: 1;
}

/* Content pages */
main h1 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

main h2 {
  font-size: 1.25rem;
  margin: 2rem 0 1rem;
}

main h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.75rem;
}

main > p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

main ul, main ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

main li {
  margin-bottom: 0.5rem;
}

main a {
  color: var(--accent);
  text-decoration: none;
}

main a:hover {
  text-decoration: underline;
}

main code {
  background: var(--bg-secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-size: 0.9em;
}

main pre {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

main pre code {
  background: none;
  padding: 0;
}

main strong {
  color: var(--text);
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
  text-align: center;
}

.footer-content {
  max-width: 960px;
  margin: 0 auto;
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--text);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-info {
    text-align: center;
    order: 1;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-screenshot {
    order: 2;
  }

  .hero-screenshot img {
    max-height: 280px;
  }

  .outline-intro-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .mode-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .mode-name {
    min-width: auto;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 640px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .hero .tagline {
    font-size: 1rem;
  }

  .hero-icon {
    width: 64px;
    height: 64px;
  }

  .subtitle {
    font-size: 0.9rem;
  }

  .section h2 {
    font-size: 1.25rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .footer-nav {
    gap: 1rem;
  }
}
