@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

@font-face {
  font-family: 'Aillio Higher Frequency';
  src: url('./fonts/Aillio_Higher_Frequency.ttf') format('truetype');
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --border: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --success: #34c759;
  --error: #ff3b30;
  --warning: #ff9500;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

body[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #ffffff;
  --text-secondary: #98989d;
  --border: #38383a;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0
  }

  to {
    transform: translateY(0);
    opacity: 1
  }
}

@keyframes checkmark {
  0% {
    stroke-dashoffset: 100
  }

  100% {
    stroke-dashoffset: 0
  }
}

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

html,
body {
  height: 100%
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

body[data-theme="dark"] .section {
  background: #1c1c1e
}

body[data-theme="dark"] .meta,
body[data-theme="dark"] .fileArea,
body[data-theme="dark"] .progressBar,
body[data-theme="dark"] .log {
  background: #000000
}

body[data-theme="dark"] .btn {
  background: #ffffff;
  color: #000000
}

body[data-theme="dark"] .btn.primary {
  background: #0a84ff;
  color: #ffffff
}

body[data-theme="dark"] .btn.secondary {
  background: transparent;
  color: #0a84ff;
  border-color: #38383a
}

body[data-theme="dark"] .btn.secondary:hover {
  background: #1c1c1e
}

body[data-theme="dark"] .stepNumber {
  background: #ffffff;
  color: #000000
}

body[data-theme="dark"] .kbd {
  background: #1c1c1e;
  border-color: #38383a;
  color: #98989d
}

body[data-theme="dark"] .progressFill {
  background: #0a84ff
}

body[data-theme="dark"] .notice {
  background: #1c1c1e
}

body[data-theme="dark"] .tooltip {
  background: #2c2c2e;
  border-color: #48484a
}

body[data-theme="dark"] .statusPill {
  background: #1c1c1e
}

body[data-theme="dark"] .statusPill.success {
  background: rgba(52, 199, 89, .2)
}

body[data-theme="dark"] .statusPill.error {
  background: rgba(255, 59, 48, .2)
}

body[data-theme="dark"] h1 {
  color: #ffffff
}

body[data-theme="dark"] .headerTitle .separator {
  color: #98989d
}

body[data-theme="dark"] h2 {
  color: #ffffff
}

body[data-theme="dark"] .description {
  color: #98989d
}

body[data-theme="dark"] .statusText {
  color: #ffffff
}

body[data-theme="dark"] .statusSub {
  color: #98989d
}

body[data-theme="dark"] .helpLink {
  background: #1c1c1e;
  color: #ffffff
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 22px;
}

.themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
  display: flex;
  background: var(--surface);
  border-radius: 20px;
  padding: 2px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.themeBtn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.themeBtn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

.langToggle {
  position: absolute;
  top: 60px;
  right: 20px;
  z-index: 1000;
}

.helpLink {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 24px 22px 60px;
  background: var(--surface);
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all 0.2s ease;
}

.helpLink:hover {
  background: var(--surface);
  opacity: 0.9;
  transform: translateY(-1px);
}

.langSelector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  box-shadow: var(--shadow);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  user-select: none;
  transition: all 0.2s ease;
}

.langSelector:hover {
  background: var(--surface);
  opacity: 0.9;
}

.langDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 4px;
  min-width: 150px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.langToggle.open .langDropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.langOption {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 14px;
}

.langOption:hover {
  background: var(--bg);
}

.langOption.active {
  background: var(--bg);
  font-weight: 600;
}

.langFlag {
  font-size: 18px;
  flex: 0 0 24px;
  width: 24px;
  min-width: 24px;
  text-align: center;
  font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
}

.langName {
  flex: 1;
}

.langCheck {
  margin-left: auto;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.2s ease;
  font-weight: 700;
}

.langOption.active .langCheck {
  opacity: 1;
}

header {
  text-align: center;
  margin-top: 60px;
  margin-bottom: 60px;
  animation: fadeIn 0.6s ease-out;
}

.headerTitle {
  font-family: 'Aillio Higher Frequency', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.headerTitle .separator {
  margin: 0 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

.statusPill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--surface);
  border-radius: 20px;
  font-size: 15px;
  animation: fadeIn 0.6s ease-out 0.2s backwards;
  transition: all 0.3s ease;
}

.statusPill.success {
  background: rgba(52, 199, 89, .1);
}

.statusPill.error {
  background: rgba(255, 59, 48, .1);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  transition: all 0.3s ease;
}

.dot.good {
  background: var(--success)
}

.dot.error {
  background: var(--error)
}

.statusText {
  font-weight: 500;
  color: var(--text);
}

.statusSub {
  color: var(--text-secondary);
  margin-left: 4px;
}

.container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  background: var(--surface);
  border-radius: 18px;
  padding: 30px;
  animation: fadeIn 0.6s ease-out backwards;
  transition: all 0.3s ease;
  position: relative;
}

.section:nth-child(1) {
  animation-delay: 0.3s
}

.section:nth-child(2) {
  animation-delay: 0.4s
}

.section:nth-child(3) {
  animation-delay: 0.5s
}

.sectionHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  position: relative;
}

.stepNumber {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
}

.stepNumber.complete {
  background: var(--success);
  color: white;
}

.tooltip {
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: var(--bg);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10;
  display: none;
}

h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.description {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 24px;
  line-height: 1.5;
}

body[data-theme="dark"] .description {
  color: #98989d;
}

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

.btn {
  appearance: none;
  border: none;
  background: var(--text);
  color: var(--bg);
  padding: 12px 22px;
  border-radius: 980px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  transition: all 0.2s ease;
  min-width: 120px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .3);
  transform: translate(-50%, -50%);
}

.btn:active::before {
  width: 300px;
  height: 300px;
  transition: width 0.5s, height 0.5s;
}

.btn:hover {
  opacity: 0.85;
  transform: scale(0.98);
}

.btn:active {
  transform: scale(0.96);
}

.btn.primary {
  background: var(--accent);
  color: #ffffff;
}

.btn.primary:hover {
  background: var(--accent-hover);
  opacity: 1;
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  background: var(--surface);
  opacity: 1;
}

.btn.danger {
  background: var(--error);
  color: #ffffff;
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none !important;
}

.btn .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

.meta {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 13px;
  font-family: 'SF Mono', Menlo, Monaco, monospace;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.historyList {
  margin-top: 12px;
  padding: 0;
  list-style: none;
}

.historyItem {
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.historyItem:hover {
  background: var(--surface);
}

.fileArea {
  background: var(--bg);
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  transition: all 0.2s ease;
  position: relative;
}

.fileArea.dragover {
  border-color: var(--accent);
  background: rgba(0, 113, 227, .05);
}

body[data-theme="dark"] .fileArea.dragover {
  background: rgba(10, 132, 255, .1);
}

.fileArea:hover {
  border-color: var(--accent);
}

.fileInfo {
  flex: 1;
  min-width: 0;
}

.fileName {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
}

.fileSize {
  font-size: 13px;
  color: var(--text-secondary);
}

.fileDetails {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'SF Mono', monospace;
}

.fileBtn {
  position: relative;
  overflow: hidden;
}

.fileBtn input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.progress {
  margin-top: 24px;
}

.progressHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.progressStats {
  display: flex;
  gap: 12px;
}

.progressBar {
  height: 4px;
  background: var(--bg);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.progressFill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
  position: relative;
}

.progressFill::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%)
  }

  100% {
    transform: translateX(100%)
  }
}

.logSection {
  position: relative;
}

.logHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.logToggle {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.logToggle:hover {
  background: var(--bg);
}

.logContent {
  max-height: 360px;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 1;
}

.logContent.collapsed {
  max-height: 0;
  opacity: 0;
}

.log {
  height: 360px;
  overflow: auto;
  padding: 20px;
  background: var(--bg);
  border-radius: 12px;
  font-family: 'SF Mono', Menlo, Monaco, monospace;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  white-space: pre-wrap;
  margin-top: 16px;
}

.log::-webkit-scrollbar {
  width: 6px
}

.log::-webkit-scrollbar-track {
  background: transparent
}

.log::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px
}

.notice {
  margin-top: 30px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 3px solid var(--error);
  font-size: 15px;
  line-height: 1.5;
  animation: fadeIn 0.6s ease-out 0.6s backwards;
}

.notice strong {
  font-weight: 600;
  color: var(--text);
}

.kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: 'SF Mono', Menlo, Monaco, monospace;
  font-size: 12px;
  font-weight: 500;
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text);
  color: var(--bg);
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast.success {
  background: var(--success);
  color: white;
}

.toast.error {
  background: var(--error);
  color: white;
}

/* Fix flag/text vertical alignment (Windows "US" fallback) */
.langSelector .langFlag,
.langOption .langFlag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  /* never grow or shrink — always exactly 24px */
  width: 24px;
  min-width: 24px;
  height: 18px;
  line-height: 1;
  font-size: 16px;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", monospace;
  position: relative;
  top: -1px;
}

/* Keep the language name centered too */
.langSelector .langName {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* ===== Top pills: keep same size (Language + Light/Dark + Help) ===== */
:root {
  --pill-h: 36px;
  --pill-r: 999px;
  --pill-pad-x: 14px;
}

/* Make the pill containers the same height */
.themeToggle,
.langSelector,
.helpLink {
  height: var(--pill-h);
  border-radius: var(--pill-r);
  display: inline-flex;
  align-items: center;
}

/* Segmented control container has inner padding, so buttons must be shorter */
.themeToggle {
  padding: 2px;
}

/* Theme buttons: remove vertical padding, match height */
.themeBtn {
  height: calc(var(--pill-h) - 4px);
  /* 36 - (2px*2) */
  padding: 0 var(--pill-pad-x);
  display: inline-flex;
  align-items: center;
  line-height: 1;
}

/* Language pill: remove vertical padding, match height */
.langSelector {
  padding: 0 var(--pill-pad-x);
  gap: 10px;
  line-height: 1;
}

/* Help pill: remove vertical padding, match height */
.helpLink {
  padding: 0 16px;
}


@media (max-width: 768px) {
  h1 {
    font-size: 36px
  }

  .subtitle {
    font-size: 19px
  }

  .app {
    padding: 40px 16px
  }

  .section {
    padding: 24px
  }
}


/* ================= Restart Modal ================= */
.modalOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(11, 16, 32, .35);
  backdrop-filter: blur(8px);
  z-index: 9999;
}

.modalOverlay.open {
  display: flex;
}

.modalCard {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface2);
}

.modalHeader h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: .2px;
}

.iconBtn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .08s ease, background .2s ease;
}

.iconBtn:hover {
  background: rgba(109, 40, 217, .08);
}

.iconBtn:active {
  transform: scale(.98);
}

.modalBody {
  padding: 16px 18px 8px;
}

.modalText {
  margin: 0 0 10px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.modalSteps {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
}

.modalSteps li {
  margin: 6px 0;
}

.modalActions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--border);
}

@media (max-width: 420px) {
  .modalActions {
    flex-direction: column;
  }

  .modalActions .btn {
    width: 100%;
  }
}


/* ================= Web Sync ================= */
.webSync {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 14px;
}

.webSyncLabel {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.webSyncControls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.select {
  flex: 1;
  min-width: 200px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

.select:focus {
  box-shadow: 0 0 0 3px rgba(109, 40, 217, .18);
  border-color: rgba(109, 40, 217, .45);
}

.webSyncHint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.35;
}

#webSync {
  margin-bottom: 16px;
}

/* Help page styles (moved from help.html) */
:root {
  --bg: #ffffff;
  --surface: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #86868b;
  --border: #d2d2d7;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --success: #34c759;
  --shadow: 0 2px 12px rgba(0, 0, 0, .08);
}

body[data-theme="dark"] {
  --bg: #000000;
  --surface: #1c1c1e;
  --text: #ffffff;
  --text-secondary: #98989d;
  --border: #38383a;
  --accent: #0a84ff;
  --accent-hover: #409cff;
  --shadow: 0 2px 12px rgba(0, 0, 0, .5);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px)
  }

  to {
    opacity: 1;
    transform: translateY(0)
  }
}

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

html,
body {
  height: 100%
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.47059;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

body[data-theme="dark"] .section {
  background: #1c1c1e
}

body[data-theme="dark"] .linkCard {
  background: #1c1c1e;
  border-color: #38383a
}

body[data-theme="dark"] .linkCard:hover {
  border-color: #0a84ff
}

body[data-theme="dark"] h1 {
  color: #ffffff
}

body[data-theme="dark"] h2 {
  color: #ffffff
}

body[data-theme="dark"] h3 {
  color: #ffffff
}

.app {
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 22px;
}

.themeBtn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.themeBtn.active {
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
}

header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeIn 0.6s ease-out;
}

.headerTitle {
  font-family: 'Aillio Higher Frequency', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
  margin-bottom: 12px;
}

.headerTitle .separator {
  margin: 0 16px;
  color: var(--text-secondary);
  font-weight: 400;
}

.subtitle {
  font-size: 21px;
  font-weight: 400;
  color: var(--text-secondary);
}

.container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.section {
  background: var(--surface);
  border-radius: 18px;
  padding: 30px;
  animation: fadeIn 0.6s ease-out backwards;
  transition: all 0.3s ease;
}

.section:nth-child(1) {
  animation-delay: 0.1s
}

.section:nth-child(2) {
  animation-delay: 0.2s
}

.section:nth-child(3) {
  animation-delay: 0.3s
}

.section:nth-child(4) {
  animation-delay: 0.4s
}

h3 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 24px 0 12px;
  color: var(--text);
}

h3:first-child {
  margin-top: 0
}

p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.6;
}

ul,
ol {
  margin: 0 0 16px 20px;
  color: var(--text-secondary);
  line-height: 1.8;
}

li {
  margin-bottom: 8px
}

strong {
  color: var(--text);
  font-weight: 600
}

.linkCard {
  display: block;
  padding: 20px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

.linkCard:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.linkTitle {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.linkDesc {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0;
}

.linkIcon {
  font-size: 20px
}

.btn {
  appearance: none;
  border: none;
  background: var(--accent);
  color: white;
  padding: 14px 28px;
  border-radius: 980px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  margin-top: 8px;
}

.btn:hover {
  background: var(--accent-hover);
  transform: scale(0.98);
}

.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn.secondary:hover {
  background: var(--surface)
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(0, 113, 227, .1);
  color: var(--accent);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 8px;
}

body[data-theme="dark"] .badge {
  background: rgba(10, 132, 255, .2)
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

code {
  background: var(--surface);
  padding: 3px 8px;
  border-radius: 6px;
  font-family: 'SF Mono', Monaco, monospace;
  font-size: 14px;
  color: var(--accent);
}

body[data-theme="dark"] code {
  background: #000000
}

img {
  display: block;
  margin: 0 auto
}

.alert {
  padding: 16px 20px;
  background: rgba(52, 199, 89, .1);
  border-left: 3px solid var(--success);
  border-radius: 8px;
  margin: 20px 0;
}

.alert p {
  margin: 0;
  color: var(--text)
}

footer {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 768px) {
  .headerTitle {
    font-size: 36px
  }

  .app {
    padding: 40px 16px
  }

  .section {
    padding: 24px
  }

  .grid {
    grid-template-columns: 1fr
  }
}

/* Top controls (match updater alignment) */
.topControls {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1100;
  display: flex;
  align-items: center;
  gap: 12px;
}

.topControls .langToggle {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
}

.topControls .themeToggle {
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  bottom: auto;
}




/* Help page: fix language + theme controls at top (match index layout) */
body.helpPage .langToggle {
  position: absolute;
  top: 60px;
  right: 20px;
  left: auto;
  bottom: auto;
  z-index: 1100;
}

body.helpPage .themeToggle {
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto;
  bottom: auto;
  z-index: 1100;
}