* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  background: #fff;
  color: #111;
  line-height: 1.5;
}

/* 右上角语言切换（默认英文） */
.lang-switch {
  position: fixed;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(14px, env(safe-area-inset-right, 0px));
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 24px rgba(0, 0, 0, 0.06);
  backdrop-filter: blur(8px);
}

.lang-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #5c5c5c;
  padding: 4px 8px;
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.lang-btn:hover {
  color: #111;
  background: rgba(0, 0, 0, 0.04);
}

.lang-btn--active {
  color: #0a0a0a;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.06);
}

.lang-sep {
  color: #c8c8c8;
  user-select: none;
  font-weight: 300;
  padding: 0 1px;
}

/* Notepad++ 式：左侧栏 + 黑色竖线 + 右侧主内容 */
.layout {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.sidebar {
  flex: 0 0 340px;
  max-width: 390px;
  width: 36%;
  min-width: 300px;
  background: #fff;
  border-right: 2px solid #000;
  padding: 38px 26px 54px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #111;
  margin-bottom: 28px;
}

.brand:hover .brand-name {
  text-decoration: underline;
}

.brand-logo-img {
  display: block;
  width: 100px;
  height: 100px;
  flex-shrink: 0;
}

.brand:hover .brand-logo-img {
  opacity: 0.92;
}

.brand-name {
  font-size: 1.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #111;
}

/* 类似 Notepad++「Current Version」链接 */
.version-link {
  font-weight: 700;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 1.1rem;
  margin-bottom: 24px;
}

.version-link:hover {
  color: #333;
}

.sidebar-tagline {
  margin: 0 0 16px;
  font-size: 0.95rem;
  color: #555;
  max-width: 14.5em;
}

.sidebar-nav {
  font-size: 1.02rem;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.sidebar-nav:hover {
  color: #333;
}

.main {
  flex: 1;
  min-width: 0;
  background: #fff;
}

.content {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 46px 56px 72px;
}

.content h1 {
  margin: 0 0 16px;
  font-size: 2.05rem;
  font-weight: 700;
}

.content p {
  margin: 0 0 12px;
  font-size: 1.03rem;
}

.actions {
  margin: 20px 0 16px !important;
}

.actions--ubuntu {
  margin-top: 12px !important;
}

.platform-title {
  margin: 0 0 8px;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.platform-title--spaced {
  margin-top: 28px;
}

.platform-desc {
  margin: 0 0 4px;
  color: #333;
  font-size: 1.06rem;
}

.btn-disabled {
  pointer-events: none;
  opacity: 0.55;
  cursor: default;
}

.muted {
  color: #555;
  font-size: 0.98rem;
}

.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 4px;
  background: #1a56c4;
  color: #fff;
  text-decoration: none;
  margin: 0 10px 10px 0;
  font-weight: 600;
  font-size: 1.03rem;
  border: 2px solid #1a56c4;
}

.btn:hover {
  background: #1547a3;
  border-color: #1547a3;
}

.btn.secondary {
  background: #fff;
  color: #111;
  border-color: #000;
}

.btn.secondary:hover {
  background: #f3f3f3;
}

code {
  background: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.88em;
}

/* —— 「什么是 Logpad」+ 亮点 + 截图区 —— */
.about {
  padding-top: 8px;
  border-top: 1px solid #ddd;
  max-width: 920px;
}

.about h2 {
  margin: 0 0 14px;
  font-size: 1.5rem;
}

.about-sub {
  margin: 22px 0 8px;
  font-size: 1.1rem;
}

.highlights {
  margin: 0 0 24px;
  padding-left: 1.2em;
  color: #222;
}

.highlights li {
  margin-bottom: 6px;
}

.hero-shot {
  margin: 0;
  padding: 0;
}

.hero-image {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.12);
}

.hero-caption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.45;
}

/* 与桌面端 +layout 色板对齐的界面示意（无实机图时展示） */
.ui-mock {
  --m-bg: #1e1e1e;
  --m-surface: #252526;
  --m-border: #3c3c3c;
  --m-text: #d4d4d4;
  --m-muted: #858585;
  --m-accent: #569cd6;
  --m-accent2: #4ec9b0;
  --m-warn: #dcdcaa;
  --m-err: #f48771;
  max-width: 920px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #333;
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
  font-family: "Segoe UI", "Microsoft YaHei", ui-monospace, monospace;
  font-size: 11px;
}

.ui-mock-inner {
  background: var(--m-bg);
  color: var(--m-text);
}

.mock-titlebar {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding: 0 10px;
  background: var(--m-surface);
  border-bottom: 1px solid var(--m-border);
}

.mock-traffic {
  display: flex;
  gap: 5px;
}

.mock-traffic i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #5a5a5a;
}

.mock-traffic i:first-child {
  background: #ff5f57;
}

.mock-traffic i:nth-child(2) {
  background: #febc2e;
}

.mock-traffic i:nth-child(3) {
  background: #28c840;
}

.mock-title {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--m-muted);
  margin-right: 48px;
}

.mock-menubar {
  padding: 4px 10px 6px;
  background: var(--m-surface);
  border-bottom: 1px solid var(--m-border);
  color: var(--m-text);
  letter-spacing: 0.02em;
}

.mock-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  background: #1f1f1f;
  border-bottom: 1px solid var(--m-border);
}

.mock-toolbar span {
  width: 18px;
  height: 14px;
  border-radius: 2px;
  background: #3c3c3c;
}

.mock-toolbar .mock-tb-wide {
  width: 56px;
  margin-left: 4px;
  background: #454545;
}

.mock-body {
  display: flex;
  min-height: 200px;
}

.mock-sidebar {
  width: 118px;
  flex-shrink: 0;
  padding: 8px;
  background: #1a1a1a;
  border-right: 1px solid var(--m-border);
  color: var(--m-muted);
}

.mock-side-h {
  font-weight: 600;
  color: var(--m-text);
  margin: 6px 0 4px;
  font-size: 10px;
}

.mock-pill {
  display: inline-block;
  padding: 2px 6px;
  margin: 2px 0;
  border-radius: 3px;
  background: #2a2a2a;
  color: var(--m-accent);
  font-size: 10px;
}

.mock-pill.dim {
  color: var(--m-muted);
}

.mock-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #3d3a1f;
  color: #f5d76e;
  font-size: 10px;
}

.mock-editor {
  flex: 1;
  padding: 8px 10px 12px;
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.45;
}

.mock-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mock-line.dim {
  color: var(--m-muted);
}

.ln {
  display: inline-block;
  width: 1.6em;
  margin-right: 6px;
  color: var(--m-muted);
  text-align: right;
  user-select: none;
}

.code-date {
  color: var(--m-accent2);
}

.code-info {
  color: var(--m-accent);
  margin-left: 4px;
}

.code-warn {
  color: var(--m-warn);
  margin-left: 4px;
}

.code-err {
  color: var(--m-err);
  margin-left: 4px;
}

.code-txt {
  color: #cecece;
  margin-left: 4px;
}

.mock-badge {
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #264f78;
  color: #9cdcfe;
  font-size: 10px;
}

.mock-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 5px 10px;
  background: #007acc;
  color: #fff;
  font-size: 10px;
}

.mock-foot-accent {
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

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

  .sidebar {
    width: 100%;
    max-width: none;
    border-right: none;
    border-bottom: 2px solid #000;
    padding: 24px 16px;
  }
}
