:root {
  --primary: #635BFF;
  --primary-hover: #524bd9;
  --primary-light: #EEF2FF;
  --bg: #FAFAFA;
  --surface: #FFFFFF;
  --surface-2: #F7F7F8;
  --border: #E5E7EB;
  --text: #18181B;
  --text-muted: #71717A;
  --text-light: #A1A1AA;
  --dark-bg: #1F1742;
  --dark-surface: #18181B;
  --dark-border: #27272A;
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
  --max-width: 1200px;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { scroll-behavior: smooth; }

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: var(--surface-2); border-color: var(--text-light); }

.btn-lg { padding: 12px 24px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-full { width: 100%; justify-content: center; }

/* Navigation */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(250,250,250,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
}

.nav-logo-img { width: 28px; height: 28px; border-radius: 6px; }

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
}

.lang-option {
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s;
  cursor: pointer;
}

.lang-option.active {
  background: var(--primary);
  color: #fff;
}

.lang-sep { opacity: 0.4; }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
}

.nav-mobile {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.nav-mobile a {
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 0;
}

.nav-mobile.open { display: flex; }

/* Hero */
.hero {
  position: relative;
  padding: 140px 0 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: -200px; right: -200px;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(99,91,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.badge-dot {
  width: 8px; height: 8px;
  background: var(--primary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.hero-title {
  font-size: 56px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero-title-accent {
  color: var(--primary);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.feature-section.alt {
  background: var(--surface);
}

.feature-content {
  max-width: 640px;
  margin-bottom: 48px;
}

.feature-number {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  font-family: var(--font-mono);
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.feature-content h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.feature-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* App Screenshot - Exact replica of real app */
.app-screenshot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.app-screenshot:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* App Shell (from real app styles.css) */
.app-shell {
  display: grid;
  grid-template-rows: 48px 44px minmax(0, 1fr) 26px;
  background: #fafafa;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #18181b;
  font-size: 13px;
}

.app-shell * { box-sizing: border-box; }

.app-shell button, .app-shell input, .app-shell textarea, .app-shell select { font: inherit; }
.app-shell button { cursor: default; }

.topbar, .filterbar, .statusbar {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e4e4e7;
  background: #fff;
}

.topbar { gap: 18px; padding: 0 12px; }

.brand, .toolbar, .button, .search, .filter-toggle, .panel-heading, .tags, .statusbar span {
  display: flex;
  align-items: center;
}

.brand { gap: 7px; min-width: 132px; letter-spacing: -.02em; }
.brand span { color: #71717a; font-size: 12px; }
.brand-mark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: #635bff;
}

.toolbar { gap: 2px; }
.toolbar.right { margin-left: auto; }

.separator { width: 1px; height: 20px; margin: 0 6px; background: #e4e4e7; }

.button, .icon-button {
  gap: 6px;
  border: 0;
  border-radius: 6px;
  color: #52525b;
  background: transparent;
}

.button {
  height: 30px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.button-dirty {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #f59e0b;
}

.button:hover, .icon-button:hover { background: #f4f4f5; color: #18181b; }
.button.primary { color: #fff; background: #635bff; }
.button.primary:hover { background: #534adf; }
.button.soft { color: #5145cd; background: #eef2ff; }

.icon-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
}

.filterbar { gap: 8px; padding: 6px 12px; background: #fafafa; }

.search {
  gap: 7px;
  width: 360px;
  height: 31px;
  padding: 0 9px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  color: #a1a1aa;
  background: #fff;
  display: flex;
  align-items: center;
}

.search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: #27272a;
  background: transparent;
  font-size: 12px;
}

.filter-toggle {
  height: 31px;
  border: 1px solid #e4e4e7;
  border-radius: 6px;
  color: #52525b;
  background: #fff;
  font-size: 12px;
  gap: 6px;
  padding: 0 9px;
  display: flex;
  align-items: center;
}

.filter-toggle.active {
  border-color: #c7d2fe;
  color: #5145cd;
  background: #eef2ff;
}

.filter-result {
  margin-left: auto;
  color: #71717a;
  font-size: 12px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 318px;
  min-height: 0;
}

.matrix-wrap {
  min-width: 0;
  overflow-x: auto;
  overflow-y: auto;
  border-right: 1px solid #e4e4e7;
  background: #fff;
}

.matrix {
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.matrix th, .matrix td {
  border-right: 1px solid #f0f0f2;
  border-bottom: 1px solid #ededf0;
  text-align: left;
}

.matrix th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 34px;
  padding: 0 10px;
  color: #71717a;
  background: #fafafa;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.matrix td {
  height: 48px;
  padding: 0;
  background: #fff;
  vertical-align: middle;
}

.matrix .source-col {
  position: sticky;
  left: 0;
  z-index: 1;
  padding: 0 12px;
  background: #fff;
}

.matrix th.source-col { z-index: 3; background: #fafafa; }

.source-col strong {
  display: block;
  overflow: hidden;
  color: #27272a;
  font-size: 12px;
  font-weight: 560;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-col small {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #a1a1aa;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.translation-cell { position: relative; }

.translation-cell input {
  width: 100%;
  height: 47px;
  padding: 0 18px 0 10px;
  border: 1px solid transparent;
  outline: 0;
  color: #3f3f46;
  background: transparent;
  font-size: 12px;
}

.translation-cell input::placeholder { color: #c4c4cb; font-style: italic; }

.translation-cell:hover { background: #fafafa; }

.translation-cell.changed::before {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f59e0b;
  content: "";
}

.multi-selected-cell {
  background: #f7f8ff !important;
  box-shadow: inset 0 0 0 1px #c7d2fe;
}

.translation-cell.selected-cell {
  background: #f1f3ff;
  box-shadow: inset 0 0 0 2px #635bff;
}

.word-tag-markers {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  display: flex;
  gap: 2px;
}

.word-tag-markers i {
  width: 3px;
  height: 11px;
  border-radius: 2px;
}

.selected-row .source-col { background: #fafafe; }

.tag-cell { position: relative; }

.tag-input {
  width: 100%;
  height: 47px;
  padding: 0 8px;
  border: 1px solid transparent;
  outline: 0;
  color: #5145cd;
  background: transparent;
  font-size: 11px;
  font-weight: 600;
}

.tags {
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 8px;
  display: flex;
  align-items: center;
}

.tags span {
  padding: 2px 5px;
  border-radius: 4px;
  color: #5145cd;
  background: #eef2ff;
  font-size: 10px;
  font-weight: 600;
}

.detail-panel {
  overflow-y: auto;
  padding: 14px;
  background: #fafafa;
}

.detail-panel > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 12px;
}

.detail-panel > header span, .field-label {
  color: #a1a1aa;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-panel h2 {
  margin: 4px 0 0;
  color: #27272a;
  font-size: 15px;
}

.field-label {
  display: block;
  margin: 14px 0 6px;
}

.source-preview {
  color: #27272a;
  font-size: 14px;
  font-weight: 560;
  line-height: 1.45;
}

code {
  display: block;
  overflow: hidden;
  color: #71717a;
  font-size: 11px;
  text-overflow: ellipsis;
}

.translation-area, .text-input {
  width: 100%;
  border: 1px solid #dedee3;
  border-radius: 6px;
  outline: 0;
  color: #27272a;
  background: #fff;
}

.translation-area {
  min-height: 112px;
  padding: 9px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.5;
}

.text-input {
  height: 34px;
  padding: 0 9px;
}

.ai-panel, .stats {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e4e4e7;
}

.panel-heading {
  justify-content: space-between;
  color: #52525b;
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
}

.panel-heading span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ai-usage-hint {
  display: block;
  margin-top: 4px;
  color: #a1a1aa;
  font-size: 10px;
  line-height: 1.4;
}

.ai-panel p {
  min-height: 42px;
  margin: 10px 0;
  color: #71717a;
  font-size: 12px;
  line-height: 1.5;
}

.stats { margin-top: 18px; }

.stat { margin-top: 12px; }

.stat div:first-child {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #52525b;
  font-size: 11px;
}

.stat b { color: #27272a; }

.progress {
  overflow: hidden;
  height: 4px;
  border-radius: 2px;
  background: #e4e4e7;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #635bff;
}

.stat small {
  display: block;
  margin-top: 4px;
  color: #a1a1aa;
  font-size: 10px;
}

.tag-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e4e4e7;
}

.tag-summary span {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 5px;
  color: #71717a;
  font-size: 11px;
  font-weight: 650;
}

.tag-summary small {
  padding: 2px 5px;
  border-radius: 4px;
  color: #5145cd;
  background: #eef2ff;
  font-size: 10px;
}

.never-edited-badge {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 4px;
  color: #71717a;
  background: #f4f4f5;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.statusbar {
  justify-content: space-between;
  padding: 0 10px;
  border-top: 1px solid #e4e4e7;
  border-bottom: 0;
  color: #71717a;
  font-size: 11px;
  display: flex;
  align-items: center;
}

.statusbar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.statusbar i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.saved { background: #22c55e; }
.unsaved { background: #f59e0b; }
.failed { background: #ef4444; }

.empty-detail {
  padding: 40px 20px;
  text-align: center;
}

.empty-detail p {
  color: #a1a1aa;
  font-size: 14px;
}

/* Download */
.download {
  padding: 100px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.section-header p {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.download-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.download-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.download-card-highlight {
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--surface) 0%, var(--primary-light) 100%);
}

.download-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.download-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: var(--radius);
}

.download-card h3 {
  font-size: 18px;
  font-weight: 600;
  flex: 1;
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.download-list {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}

.download-list li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.download-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

/* Tech */
.tech {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

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

.tech-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tech-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tech-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  font-family: var(--font-mono);
}

/* CTA */
.cta {
  padding: 100px 0;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--primary-light) 100%);
}

.cta h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Footer */
.footer {
  padding: 64px 0 32px;
  background: var(--dark-bg);
  color: rgba(255,255,255,0.7);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 2fr;
  gap: 64px;
  margin-bottom: 48px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.footer-brand-text {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.footer-brand-accent { color: #a5a0ff; }

.footer-brand-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
  max-width: 280px;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 14px;
  padding: 6px 0;
  transition: color 0.15s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* Responsive */
@media (max-width: 1024px) {
  .tech-grid { grid-template-columns: repeat(2, 1fr); }
  .workspace { grid-template-columns: 1fr; }
  .detail-panel { display: none; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-actions .btn { display: none; }
  .nav-mobile-toggle { display: block; }

  .hero { padding: 120px 0 60px; }
  .hero-title { font-size: 36px; }
  .hero-subtitle { font-size: 16px; }

  .feature-section { padding: 60px 0; }
  .feature-content h2 { font-size: 24px; }

  .download-cards { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr 1fr; }

  .footer-main { grid-template-columns: 1fr; gap: 40px; }
  .footer-links { grid-template-columns: 1fr; gap: 24px; }

  .app-shell { font-size: 12px; }
  .search { width: 200px; }
  .matrix th, .matrix td { padding: 6px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 28px; }
  .section-header h2 { font-size: 24px; }
  .cta h2 { font-size: 28px; }
  .tech-grid { grid-template-columns: 1fr; }

  .topbar { gap: 8px; padding: 0 8px; }
  .brand { min-width: auto; }
  .brand strong { display: none; }
  .toolbar { gap: 0; }
  .button { padding: 0 6px; font-size: 11px; }
  .search { width: 140px; }
}
