:root {
  --primary: #25AB9F;
  --primary-dark: #1E8E84;
  --primary-light: #E6F7F5;
  --bg: #F6F7F9;
  --surface: #FFFFFF;
  --text: #1A1A2E;
  --text-muted: #6B7280;
  --radius: 12px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Header */

.header {
  background: var(--surface);
  border-bottom: 1px solid #E5E7EB;
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
}

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

.header-nav a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.header-nav a:hover {
  color: var(--primary-dark);
  text-decoration: none;
}

/* Hero */

.hero {
  text-align: center;
  padding: 80px 0 60px;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text);
}

.hero h1 span {
  color: var(--primary);
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
}

.store-badges {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: #fff;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.store-badge:hover {
  opacity: 0.85;
  text-decoration: none;
  color: #fff;
}

/* Features */

.features {
  padding: 40px 0 80px;
}

.features h2 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 40px;
  color: var(--text);
}

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

.feature-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  border: 1px solid #E5E7EB;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.feature-card .icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Footer */

.footer {
  margin-top: auto;
  background: var(--surface);
  border-top: 1px solid #E5E7EB;
  padding: 24px 0;
}

.footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--primary-dark);
}

/* Legal Content */

.legal-page {
  padding: 40px 0 60px;
}

.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.legal-content {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid #E5E7EB;
  padding: 40px;
  line-height: 1.7;
}

.legal-content h1 {
  font-size: 1.5rem;
  margin: 32px 0 16px;
}

.legal-content h1:first-child {
  margin-top: 0;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin: 28px 0 12px;
}

.legal-content h3 {
  font-size: 1.1rem;
  margin: 24px 0 8px;
}

.legal-content p {
  margin-bottom: 12px;
}

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

.legal-content li {
  margin-bottom: 4px;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
  overflow-x: auto;
  display: block;
}

.legal-content thead {
  background: var(--primary-light);
}

.legal-content th,
.legal-content td {
  border: 1px solid #E5E7EB;
  padding: 10px 14px;
  text-align: left;
}

.legal-content th {
  font-weight: 600;
}

.legal-content tbody tr:nth-child(even) {
  background: var(--bg);
}

.legal-content a {
  color: var(--primary-dark);
  text-decoration: underline;
}

.legal-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 8px 16px;
  margin: 16px 0;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.legal-content strong {
  font-weight: 600;
}

/* Locale Switcher */

.locale-switcher {
  display: inline-flex;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  overflow: hidden;
}

.locale-switcher button {
  padding: 6px 16px;
  border: none;
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.locale-switcher button:not(:last-child) {
  border-right: 1px solid #E5E7EB;
}

.locale-switcher button.active {
  background: var(--primary);
  color: #fff;
}

.locale-switcher button:hover:not(.active) {
  background: var(--primary-light);
  color: var(--primary-dark);
}

/* Error Page */

.error-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
}

.error-container .error-code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-container h1 {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.error-container p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

.error-container .btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  transition: background 0.2s;
}

.error-container .btn:hover {
  background: var(--primary-dark);
  text-decoration: none;
}

/* Loading state */

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

/* Responsive */

@media (max-width: 768px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

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

  .footer .container {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .legal-content {
    padding: 24px 16px;
  }

  .legal-content table {
    font-size: 0.8rem;
  }

  .legal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-nav {
    gap: 16px;
  }
}
