/**
 * GetHub Accelerator
 * Developer: LSGTEAM
 * Contact: injectlib@duck.com
 * Statement: Visual styles managed by LSGTEAM.
 */
:root {
  --bg: #0b1020;
  --panel: rgba(18, 24, 38, 0.86);
  --panel-strong: rgba(30, 41, 59, 0.94);
  --text: #eef2ff;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --primary-strong: #1d4ed8;
  --accent: #93c5fd;
  --danger: #ef4444;
  --border: rgba(148, 163, 184, 0.24);
  --shadow: 0 20px 60px rgba(2, 6, 23, 0.46);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 32rem),
    radial-gradient(circle at top right, rgba(147, 197, 253, 0.10), transparent 30rem),
    linear-gradient(135deg, #0b1020 0%, #111827 48%, #0f172a 100%);
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: rgba(11, 16, 32, 0.82);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo,
.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 10px 26px rgba(1, 4, 9, 0.36);
}
.brand-logo {
  object-fit: cover;
  background: transparent;
}
.brand small { display: block; color: var(--muted); margin-top: 2px; }
.header-actions { display: flex; gap: 10px; align-items: center; }

.ghost-btn, .icon-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  transition: 0.2s ease;
}
.ghost-btn:hover, .icon-btn:hover { background: var(--panel-strong); transform: translateY(-1px); }
.nav-tab.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}
.icon-btn { width: 36px; height: 36px; padding: 0; font-size: 24px; }
.app-view {
  display: block;
}

.hero { padding: 72px 0 46px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
}
.eyebrow { color: var(--primary); text-transform: uppercase; letter-spacing: 0.16em; font-size: 13px; font-weight: 700; }
h1 { font-size: clamp(40px, 7vw, 76px); line-height: 0.98; margin: 12px 0 18px; max-width: 850px; }
.hero-desc { color: var(--muted); font-size: 18px; line-height: 1.8; max-width: 720px; }

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px 112px;
  gap: 10px;
  padding: 10px;
  margin-top: 32px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: rgba(18, 24, 38, 0.84);
  box-shadow: var(--shadow);
}
.search-box input, .search-box select, textarea {
  border: 0;
  outline: 0;
  color: var(--text);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 16px;
  padding: 14px 16px;
}
.search-box select option { color: #111827; }
.search-box button, .primary-wide, .card-btn.primary {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.22);
}

.accelerator-panel, .repo-card, .modal-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.88), rgba(15, 23, 42, 0.82));
  box-shadow: var(--shadow);
}
.accelerator-panel { padding: 26px; }
.accelerator-panel p { color: var(--muted); line-height: 1.7; }
.accelerator-panel textarea { width: 100%; resize: vertical; min-height: 110px; }
.inline-controls { display: flex; gap: 18px; margin: 16px 0; color: var(--muted); }
.primary-wide { width: 100%; }
.accelerated-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.26);
  word-break: break-all;
}
.result-note {
  margin: 10px 0 12px;
  color: #cbd5e1;
  line-height: 1.6;
  word-break: normal;
}

.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.toolbar h2 { margin: 0 0 6px; font-size: 30px; }
.toolbar p, .status-line { color: var(--muted); }
.language-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.language-tabs button {
  border: 1px solid var(--border);
  color: var(--muted);
  background: var(--panel);
  border-radius: 999px;
  padding: 9px 14px;
}
.language-tabs button.active { color: #ffffff; background: linear-gradient(135deg, var(--primary), var(--primary-strong)); border-color: transparent; }

.status-line { min-height: 24px; margin-bottom: 16px; }
.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 46px;
}
.repo-card { padding: 20px; display: flex; flex-direction: column; min-height: 310px; position: relative; }
.repo-top { display: flex; gap: 12px; align-items: center; padding-right: 44px; }
.favorite-star {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: #64748b;
  background: rgba(30, 41, 59, 0.72);
  font-size: 19px;
  line-height: 1;
  transition: 0.2s ease;
}
.favorite-star:hover {
  color: #facc15;
  border-color: rgba(250, 204, 21, 0.42);
  transform: translateY(-1px) scale(1.04);
}
.favorite-star.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 12px 28px rgba(250, 204, 21, 0.22);
}
.avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--panel-strong); }
.repo-name {
  font-size: 18px;
  font-weight: 800;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.repo-owner {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.repo-desc {
  color: var(--muted);
  line-height: 1.65;
  min-height: 78px;
  max-height: calc(1.65em * 3);
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 18px; }
.meta { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--muted); font-size: 13px; }
.card-actions { margin-top: auto; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.card-btn {
  border: 1px solid var(--border);
  background: rgba(30, 41, 59, 0.72);
  color: var(--text);
  border-radius: 14px;
  padding: 10px;
  text-align: center;
}
.card-btn.danger { color: var(--danger); }

.pagination { display: flex; justify-content: center; gap: 10px; padding-bottom: 60px; }
.pagination button { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; background: var(--panel); color: var(--text); }

.wallhaven-section {
  padding: 12px 0 66px;
}
.wallhaven-panel {
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.82), rgba(15, 23, 42, 0.7));
  box-shadow: var(--shadow);
}
.wallhaven-head {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
}
.wallhaven-head h2 {
  margin: 8px 0 10px;
  font-size: 32px;
}
.wallhaven-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}
.wallhaven-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(11, 16, 32, 0.52);
}
.wallhaven-search input {
  border: 0;
  outline: 0;
  color: var(--text);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 14px;
  padding: 12px 14px;
}
.wallhaven-search button[type="submit"] {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}
.wallhaven-controls {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
}
.wallhaven-control-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.wallhaven-control-group span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-right: 2px;
}
.wallhaven-control-group button {
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(30, 41, 59, 0.62);
  transition: 0.2s ease;
}
.wallhaven-control-group button:hover,
.wallhaven-control-group button.active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}
.wallhaven-purity-group {
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.26);
}
.wallhaven-purity-group span::after {
  content: ' · 18+';
  color: var(--danger);
}
.wallhaven-purity-group button[data-wallhaven-purity="110"].active,
.wallhaven-purity-group button[data-wallhaven-purity="111"].active {
  background: linear-gradient(135deg, #f97316, #dc2626);
}
.wallhaven-status {
  min-height: 24px;
  margin: 12px 0 16px;
  color: var(--muted);
}
.wallhaven-empty {
  margin: 18px 0;
}
.empty-card {
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.72);
  color: var(--text);
  text-align: center;
}
.empty-card strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}
.empty-card p {
  max-width: 620px;
  margin: 0 auto 16px;
  color: var(--muted);
  line-height: 1.7;
}
.empty-actions {
  display: flex;
  justify-content: center;
}
.wallpaper-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.wallpaper-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.28);
}
.wallpaper-thumb {
  width: 100%;
  display: block;
  border: 0;
  padding: 0;
  background: #111827;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}
.wallpaper-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.24s ease;
}
.wallpaper-card:hover .wallpaper-thumb img {
  transform: scale(1.045);
}
.wallpaper-info {
  padding: 13px 14px 8px;
}
.wallpaper-info > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
}
.wallpaper-info span,
.wallpaper-tags {
  color: var(--muted);
  font-size: 13px;
}
.wallpaper-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.wallpaper-tags span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}
.wallpaper-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 14px 14px;
}
.modal-card.wallpaper-card-modal {
  width: min(980px, 100%);
}
.wallpaper-detail img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  display: block;
  border-radius: 20px;
  background: #020617;
}
.wallpaper-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.wallpaper-detail > .card-btn {
  display: inline-block;
  margin-top: 4px;
}

.site-proxy-section {
  padding: 12px 0 66px;
}
.site-proxy-panel {
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(18, 24, 38, 0.84), rgba(15, 23, 42, 0.74));
  box-shadow: var(--shadow);
}
.site-proxy-head {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 16px;
}
.site-proxy-head h2 {
  margin: 8px 0 10px;
  font-size: 32px;
}
.site-proxy-head p,
.site-proxy-status {
  color: var(--muted);
  line-height: 1.7;
}
.site-proxy-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(11, 16, 32, 0.52);
}
.site-proxy-form input {
  border: 0;
  outline: 0;
  color: var(--text);
  background: rgba(30, 41, 59, 0.72);
  border-radius: 14px;
  padding: 12px 14px;
}
.site-proxy-form button {
  border: 0;
  color: #ffffff;
  font-weight: 800;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
}
.site-proxy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 8px 0 14px;
}
.site-proxy-actions .card-btn {
  min-width: 116px;
}
.site-proxy-status {
  min-height: 24px;
  margin-bottom: 14px;
}
.site-proxy-frame {
  width: 100%;
  min-height: 72vh;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: #020617;
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.28);
}
.civitai-controls {
  margin: 6px 0 14px;
}
.civitai-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0 20px;
}
.civitai-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.78);
  box-shadow: 0 16px 44px rgba(2, 6, 23, 0.28);
}
.civitai-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  background: #111827;
  overflow: hidden;
}
.civitai-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.24s ease;
}
.civitai-card:hover .civitai-thumb img {
  transform: scale(1.045);
}
.civitai-card-body {
  padding: 14px;
}
.civitai-card-title {
  min-height: 48px;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.4;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.civitai-card-meta,
.civitai-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}
.civitai-card-meta span,
.civitai-stats span {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
}
.civitai-card p {
  min-height: 70px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.6;
  overflow: hidden;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
.civitai-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: auto;
  padding: 0 14px 14px;
}
.civitai-access-tip {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px dashed rgba(147, 197, 253, 0.28);
  border-radius: 12px;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.08);
  font-size: 12px;
  line-height: 1.55;
}
.danger-text {
  color: #fecaca !important;
  background: rgba(239, 68, 68, 0.18) !important;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0,0,0,0.78);
}
.modal-card {
  width: min(900px, 100%);
  max-height: 84vh;
  overflow: hidden;
  color: #f8fbff;
  background: #0f172a;
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.78);
}
.modal-card.sponsor-card {
  width: min(490px, 100%);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
  background: #111827;
}
.modal-header h3 { margin: 0; }
.modal-body { padding: 22px; overflow: auto; max-height: calc(84vh - 74px); }
.release-item, .favorite-item {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 18px;
  background: #1e293b;
  margin-bottom: 12px;
}
.modal .repo-owner,
.modal .release-item p,
.modal .favorite-item p {
  color: #cbd5e1;
}
.release-assets { display: grid; gap: 8px; margin-top: 12px; }
.asset-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }

.site-footer {
  margin-top: 28px;
  padding: 42px 0 34px;
  border-top: 1px solid var(--border);
  background: rgba(11, 16, 32, 0.72);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 28px;
}
.footer-title {
  font-size: 20px;
  font-weight: 900;
  margin-bottom: 10px;
}
.site-footer h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.site-footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}
.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.friend-links a {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 12px;
  color: #d8e6f8;
  background: rgba(255,255,255,0.06);
  transition: 0.2s ease;
}
.friend-links a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  border-color: transparent;
  transform: translateY(-1px);
}
.copyright { margin-top: 10px !important; }
.float-menu {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 45;
  display: grid;
  gap: 10px;
}
.float-btn {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 16px;
  color: #ffffff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  box-shadow: 0 14px 36px rgba(0,0,0,0.32);
  transition: 0.2s ease;
}
.float-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 44px rgba(59, 130, 246, 0.28);
}
.analytics-placeholder {
  display: none;
}
.sponsor-modal {
  text-align: center;
}
.sponsor-modal p {
  margin: 0 0 16px;
  color: #cbd5e1;
  line-height: 1.75;
}
.sponsor-qr {
  width: min(320px, 86vw);
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 24px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.28);
}
.sponsor-tip {
  font-size: 14px;
}
.sponsor-tip code {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 8px;
  padding: 2px 6px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 80;
  padding: 13px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #ffffff;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.toast.error { background: var(--danger); color: white; }
.hidden { display: none !important; }

@media (max-width: 920px) {
  .hero-grid, .repo-grid, .footer-grid { grid-template-columns: 1fr; }
  .toolbar { align-items: flex-start; flex-direction: column; }
  .wallhaven-head, .wallhaven-search, .site-proxy-head, .site-proxy-form { grid-template-columns: 1fr; }
  .wallpaper-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .civitai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .header-inner { height: auto; padding: 14px 0; flex-direction: column; align-items: flex-start; gap: 12px; }
  .header-actions { width: 100%; flex-wrap: wrap; }
  .search-box { grid-template-columns: 1fr; }
  .hero { padding-top: 42px; }
  .card-actions { grid-template-columns: 1fr; }
  .asset-row { grid-template-columns: 1fr; }
  .wallhaven-panel { padding: 18px; }
  .wallpaper-grid { grid-template-columns: 1fr; }
  .civitai-grid, .civitai-actions { grid-template-columns: 1fr; }
  .float-menu { right: 14px; bottom: 72px; }
  .float-btn { width: 42px; height: 42px; border-radius: 14px; }
}
