:root {
  --text: #6b6375;
  --text-h: #08060d;
  --bg: #fff;
  --border: #e5e4e7;
  --code-bg: #f4f3ec;
  --accent: #aa3bff;
  --accent-bg: rgba(170, 59, 255, 0.1);
  --accent-border: rgba(170, 59, 255, 0.5);
  --social-bg: rgba(244, 243, 236, 0.5);
  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --heading: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #9ca3af;
    --text-h: #f3f4f6;
    --bg: #16171d;
    --border: #2e303a;
    --code-bg: #1f2028;
    --accent: #c084fc;
    --accent-bg: rgba(192, 132, 252, 0.15);
    --accent-border: rgba(192, 132, 252, 0.5);
    --social-bg: rgba(47, 48, 58, 0.5);
    --shadow:
      rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
  }

  #social .button-icon {
    filter: invert(1) brightness(2);
  }
}

body {
  margin: 0;
}

#root {
  min-height: 100svh;
}

h1,
h2 {
  font-family: var(--heading);
  font-weight: 500;
  color: var(--text-h);
}

h1 {
  font-size: 56px;
  letter-spacing: -1.68px;
  margin: 32px 0;
  @media (max-width: 1024px) {
    font-size: 36px;
    margin: 20px 0;
  }
}
h2 {
  font-size: 24px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
  @media (max-width: 1024px) {
    font-size: 20px;
  }
}
p {
  margin: 0;
}

code,
.counter {
  font-family: var(--mono);
  display: inline-flex;
  border-radius: 4px;
  color: var(--text-h);
}

code {
  font-size: 15px;
  line-height: 135%;
  padding: 4px 8px;
  background: var(--code-bg);
}
/* PVLM Apps — iOS/Xiaomi Morph Style */

:root {
  --bg: #09090B;
  --surface: #161618;
  --card: #27272A;
  --card-hover: #2C2C30;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.1);
  --text: #FAFAFA;
  --text-2: #A1A1AA;
  --text-3: #71717A;
  --accent: #22D3EE;
  --accent-dim: rgba(34,211,238,0.12);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', 'SF Mono', monospace;
  --max-w: 1440px;
  --radius: 12px;
  --radius-lg: 16px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(700px 350px at 12% -10%, rgba(99,102,241,0.09), transparent 70%),
    radial-gradient(800px 400px at 88% 0%, rgba(34,211,238,0.07), transparent 70%),
    radial-gradient(900px 500px at 50% 110%, rgba(139,92,246,0.05), transparent 70%);
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px;
  background: rgba(9,9,11,0.55);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  gap: 4px;
  margin: 0 8px;
}

.nav-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-family: var(--font);
  cursor: pointer;
  transition: color 0.15s;
}

.nav-btn:hover { color: var(--text-2); }

.nav-btn.active { color: var(--text); }

.nav-label {
  position: relative;
  z-index: 1;
}

.nav-active {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.logo svg {
  width: 46px;
  height: 46px;
  display: block;
}

.logo img {
  height: 60px;
  width: auto;
  display: block;
  border-radius: 10px;
}

.title-group { flex: 1; }

.title-group h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text);
}

.title-group p {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.header-right { margin-left: auto; }

.search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
  min-width: 260px;
}

.search-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.search-btn span { flex: 1; text-align: left; }

.search-btn kbd {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-family: var(--mono);
}

.search-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-2);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 12vh;
}

.search-panel {
  width: 100%;
  max-width: 520px;
  max-height: 60vh;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.search-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(9,9,11,0.5);
}

.search-top svg { width: 18px; height: 18px; color: var(--text-3); flex-shrink: 0; }

.search-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
}

.search-input::placeholder { color: var(--text-3); }

.search-top kbd {
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-3);
  font-family: var(--mono);
  cursor: pointer;
}

.search-top kbd:hover { background: rgba(255,255,255,0.08); }

.search-body { flex: 1; overflow-y: auto; padding: 8px; }

.search-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.search-tags {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: 12px;
  flex-wrap: wrap;
}

.search-tag {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--font);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.search-tag:hover {
  background: var(--accent-dim);
  border-color: rgba(34,211,238,0.2);
  color: var(--accent);
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: none;
  background: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: background 0.1s;
}

.search-result:hover { background: rgba(255,255,255,0.04); }

.search-result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }
.search-result-info strong { display: block; font-size: 15px; font-weight: 500; color: var(--text); }

.search-result-cat {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
  border: 1px solid;
  font-family: var(--font);
}

/* Main */
.main {
  max-width: none;
  margin: 0 auto;
  padding: 32px 32px 80px;
}

.section { margin-bottom: 56px; }

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
}

.clear-search {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: var(--font);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.15s;
}

.clear-search:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-2);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Card */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 0 0 0 transparent;
}

.card-bg {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: var(--bg);
  z-index: 0;
}

.card-thumb {
  position: relative;
  z-index: 1;
  aspect-ratio: 16/9;
  background: var(--card);
  overflow: hidden;
  border-radius: var(--radius);
}

.card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  animation: img-reveal 0.35s ease both;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes img-reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.card-body {
  position: relative;
  z-index: 1;
  padding: 12px;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.card-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.card-body h3 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-body p {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 500;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-3);
}

/* iOS-style Overlay */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
}

/* Detail Panel — iOS/Xiaomi morph */
.detail-panel {
  position: fixed;
  inset: 0;
  z-index: 210;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.detail-bg {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 0;
}

.detail-scroll {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.detail-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 480px;
  overflow: hidden;
  flex-shrink: 0;
}

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.detail-hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(9,9,11,0.3) 0%,
    transparent 30%,
    transparent 60%,
    rgba(9,9,11,0.65) 82%,
    var(--bg) 100%
  );
  pointer-events: none;
}

/* iOS-style close button */
.float-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.float-close svg { width: 12px; height: 12px; }

.float-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 300;
}

.float-close:hover {
  background: rgba(0,0,0,0.75);
}

/* Scroll top bar */
.float-controls {
  position: static;
}

.detail-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  z-index: 400;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: rgba(9,9,11,0.55);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--border);
}

.topbar-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.topbar-close svg { width: 13px; height: 13px; }

.topbar-close kbd {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 10.5px;
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-2);
  line-height: 1.4;
}

.topbar-save {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.topbar-save svg { width: 13px; height: 13px; }

.topbar-save:hover {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.13);
}

.topbar-save.saved {
  background: rgba(34,197,94,0.16);
  border-color: rgba(34,197,94,0.45);
  color: #4ADE80;
}

.topbar-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

.topbar-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.topbar-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-cat {
  align-self: flex-start;
  flex-shrink: 0;
  max-width: 100%;
  padding: 0 8px;
  border-radius: 20px;
  font-size: 9px;
  font-weight: 600;
  line-height: 14px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-content {
  max-width: 1120px;
  margin: -400px auto 0;
  padding: 28px 36px 80px;
  position: relative;
  z-index: 5;
  background: var(--bg);
  border-radius: var(--radius-lg);
  will-change: transform;
}

@media (max-width: 1024px) {
  .detail-content { margin-top: -240px; }
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  min-height: 64px;
}

.detail-avatar {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}

.detail-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-content h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.detail-tags {
  display: flex;
  gap: 6px;
  margin-top: -12px;
  margin-bottom: 0;
}

.detail-content p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  margin-bottom: 20px;
}

.detail-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.detail-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 20px;
}

.detail-stat svg {
  width: 13px;
  height: 13px;
  color: var(--text-2);
}

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  background: #238636;
  background-image: linear-gradient(-180deg, #2EA043 0%, #238636 90%);
  color: #fff;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(27,31,36,0.1), inset 0 1px 0 rgba(255,255,255,0.03);
  transition: all 0.15s;
}

.btn-primary svg { width: 16px; height: 16px; }

.btn-primary:hover {
  background-image: linear-gradient(-180deg, #2EA043 0%, #2A8A3D 90%);
  box-shadow: 0 1px 0 rgba(27,31,36,0.1), inset 0 1px 0 rgba(255,255,255,0.03);
}

.btn-primary:active {
  background-color: #1A7F26;
  box-shadow: inset 0 1px 0 rgba(27,31,36,0.1);
}

.btn-secondary {
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary svg { width: 16px; height: 16px; }

.btn-secondary:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* GitHub-style body */
.detail-body {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 28px;
  margin-top: 8px;
}

.detail-main {
  min-width: 0;
}

.detail-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.readme-section {
  margin-bottom: 28px;
}

.readme-section h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-icon {
  font-size: 13px;
  opacity: 0.55;
}

.readme-about {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.readme-about:last-child {
  margin-bottom: 0;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-2);
}

.feature-list li svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 3px;
  color: #2EA043;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
}

.shot-row img {
  width: 100%;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: zoom-in;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}

.lightbox img {
  max-width: 70vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
}

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(9,9,11,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.lightbox-btn:hover { background: rgba(24,24,27,0.85); }

.lightbox-btn svg { width: 20px; height: 20px; }

.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(9,9,11,0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
}

.lightbox-close:hover { background: rgba(24,24,27,0.85); }

.lightbox-close svg { width: 18px; height: 18px; }

.lightbox-count {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: rgba(9,9,11,0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: var(--mono);
}

.shot-landscape { aspect-ratio: 16 / 11; }
.shot-portrait { aspect-ratio: 3 / 4; }

.release-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.release-list li {
  display: grid;
  grid-template-columns: 110px 90px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.release-list li:last-child {
  border-bottom: none;
}

.release-version {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.release-date {
  font-size: 12px;
  color: var(--text-3);
}

.release-note {
  font-size: 13px;
  color: var(--text-2);
}

.repo-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.02);
}

.repo-card h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.repo-stats {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.repo-stats li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-3);
}

.repo-stats li strong {
  font-weight: 600;
  color: var(--text);
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.repo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 10px;
}

.chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.repo-facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.repo-facts li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-3);
}

.repo-facts li strong {
  font-weight: 600;
  color: var(--text);
}

.repo-verify {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

.btn-done {
  background: #22C55E;
  color: #fff;
}

.btn-done:hover {
  opacity: 1;
}

/* Install States */
.btn-installing {
  pointer-events: none;
  min-width: 160px;
  justify-content: center;
}

.install-progress {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0,0,0,0.25);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #4ADE80, #22C55E);
  animation: progress 4s ease-in-out forwards;
}

@keyframes progress {
  0% { width: 0; }
  50% { width: 60%; }
  100% { width: 100%; }
}

.install-done {
  display: flex;
  align-items: center;
  gap: 6px;
}

.install-done svg { width: 16px; height: 16px; }

/* No Results */
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}

.no-results svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.2; }
.no-results p { font-size: 14px; }

/* Responsive */
@media (max-width: 1024px) {
  .search-panel { max-width: 460px; }
}

@media (max-width: 768px) {
  .header { flex-wrap: wrap; padding: 10px 16px; gap: 8px 10px; }
  .title-group h1 { font-size: 16px; }
  .title-group p { display: none; }
  .nav { order: 3; width: 100%; margin: 2px -16px 0; padding: 2px 16px; overflow-x: auto; justify-content: flex-start; }
  .nav-btn { padding: 8px 12px; font-size: 12px; white-space: nowrap; }
  .search-btn { min-width: 40px; width: 40px; justify-content: center; padding: 8px; flex-shrink: 0; }
  .search-btn span, .search-btn kbd { display: none; }
  .main { padding: 20px 16px 60px; }
  .section-head { margin-bottom: 14px; }
  .detail-hero {
    height: auto;
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
  .detail-content { margin-top: -80px; padding: 24px 20px 64px; }
  .detail-content h2 { font-size: 22px; }
  .detail-header { flex-wrap: wrap; }
  .detail-stats { margin-bottom: 20px; }
  .btn-primary, .btn-secondary { flex: 1; justify-content: center; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-side { flex-direction: row; flex-wrap: wrap; }
  .repo-card { flex: 1 1 240px; }
  .release-list li { grid-template-columns: 1fr; gap: 2px; }
  .release-list li { padding: 12px 0; }
  .detail-topbar { padding: 0 10px; }
  .topbar-close-text, .topbar-close kbd { display: none; }
  .topbar-close { width: 32px; padding: 0; justify-content: center; }
  .topbar-save { padding: 0 10px; }
  .search-overlay { padding-top: 0; align-items: stretch; }
  .search-panel {
    max-width: none;
    max-height: none;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    border-top: 1px solid var(--border-hover);
  }
  .search-body { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .lightbox img { max-width: 94vw; max-height: 82vh; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: max(14px, env(safe-area-inset-top)); right: 14px; }
}

@media (max-width: 480px) {
  .title-group { display: block; flex: 0 1 auto; min-width: 0; }
  .title-group h1 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .title-group p { display: block; font-size: 9.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav { gap: 2px; }
  .shot-row { grid-template-columns: 1fr; }
  .detail-header { flex-wrap: nowrap; }
  .detail-actions { flex-wrap: wrap; gap: 8px; }
  .detail-actions .detail-size { width: 100%; text-align: center; }
  .detail-stat { font-size: 11.5px; padding: 5px 10px; }
}

/* Bottom install bar */
.detail-size {
  align-self: center;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-3);
  font-family: var(--mono);
}

/* Scrollbar */
* {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
::selection { background: rgba(34,211,238,0.2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}