:root {
  --bg: #fafafa;
  --bg-card: #fff;
  --text: #1a1a1a;
  --text-secondary: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --border-light: #eee;
  --badge-bg: #f0f0f0;
  --badge-text: #555;
  --accent: #1a1a1a;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 28px;
  --shadow-card: 0 4px 24px rgba(0,0,0,.06);
  --shadow-icon: 0 8px 32px rgba(0,0,0,.12);
  --max-width: 720px;
  --max-width-narrow: 640px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
}

/* Header */
.site-header {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text);
  text-decoration: none;
}

.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: border-color .2s;
}

.lang-btn:hover {
  border-color: var(--text-muted);
}

.lang-btn svg {
  width: 16px;
  height: 16px;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
  min-width: 160px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 100;
  padding: 4px;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}

[dir="rtl"] .lang-option {
  text-align: right;
}

.lang-option:hover {
  background: var(--badge-bg);
}

.lang-option.active {
  font-weight: 600;
  background: var(--badge-bg);
}

/* Hero / Brand section */
.brand-hero {
  text-align: center;
  padding: 48px 24px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand-hero h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.brand-hero .tagline {
  margin-top: 8px;
  font-size: 15px;
  color: var(--text-secondary);
  font-style: italic;
}

.brand-story {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 24px 24px 40px;
  text-align: center;
}

.brand-story p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Section titles */
.section-title {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 16px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* App cards */
.apps {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: box-shadow .2s;
  text-decoration: none;
  color: inherit;
}

.app-card:hover {
  box-shadow: var(--shadow-card);
}

.app-icon-sm {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-lg);
  flex-shrink: 0;
  overflow: hidden;
}

.app-icon-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-info {
  flex: 1;
  min-width: 0;
}

.app-info h2 {
  font-size: 18px;
  font-weight: 600;
}

.app-info .card-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.app-info .platforms {
  margin-top: 8px;
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--badge-bg);
  color: var(--badge-text);
}

.app-arrow {
  flex-shrink: 0;
  color: #ccc;
}

.app-arrow svg {
  width: 20px;
  height: 20px;
}

/* App detail hero */
.app-hero {
  padding: 48px 24px 40px;
  text-align: center;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.app-icon-lg {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-xl);
  margin: 0 auto 24px;
  overflow: hidden;
  box-shadow: var(--shadow-icon);
}

.app-icon-lg img {
  width: 100%;
  height: 100%;
}

.app-hero h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.app-hero .tagline {
  font-size: 17px;
  color: var(--text-secondary);
  margin-top: 8px;
}

.badge-row {
  margin-top: 24px;
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.store-badge {
  height: 44px;
  border-radius: 10px;
  background: var(--badge-bg);
  color: var(--text-muted);
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: default;
  border: 1px solid var(--border);
}

/* Features */
.features {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.features h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
  text-align: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.feature .icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.feature h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Support section */
.support-section {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 0 24px 64px;
  text-align: center;
}

.support-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

.support-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
}

.support-section a {
  color: var(--text);
  font-weight: 500;
}

/* Back link */
.back-link {
  display: inline-block;
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text-secondary);
  text-decoration: none;
}

.back-link:hover {
  color: var(--text);
}

/* Content pages (privacy, terms) */
.content-page {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.content-page h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.content-page .updated {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.content-page h2 {
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 12px;
}

.content-page p,
.content-page li {
  font-size: 15px;
  color: #444;
  margin-bottom: 16px;
  line-height: 1.7;
}

.content-page ul {
  padding-left: 20px;
}

[dir="rtl"] .content-page ul {
  padding-left: 0;
  padding-right: 20px;
}

.content-page a {
  color: var(--text-secondary);
  text-decoration: none;
}

.content-page a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 32px 24px;
  font-size: 13px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-light);
}

.site-footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-sep {
  color: var(--border);
}

/* Responsive */
@media (min-width: 600px) {
  .brand-hero {
    padding-top: 56px;
  }
  .brand-hero h1 {
    font-size: 42px;
  }
  .app-card {
    padding: 28px;
  }
  .app-icon-sm {
    width: 80px;
    height: 80px;
  }
}

@media (max-width: 480px) {
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .app-hero h1 {
    font-size: 28px;
  }
}

/* RTL adjustments */
[dir="rtl"] .app-arrow svg {
  transform: scaleX(-1);
}

[dir="rtl"] .back-link {
  direction: rtl;
}
