:root {
  --bg: #000000;
  --bg-2: #05070a;
  --surface: rgba(0, 0, 0, 0.58);
  --surface-strong: rgba(0, 0, 0, 0.78);
  --panel: rgba(0, 0, 0, 0.68);
  --border: rgba(255, 255, 255, 0.08);
  --text: #d7dee7;
  --muted: #b8c2cd;
  --accent: #d7dee7;
  --accent-2: #d7dee7;
  --purple: #aeb8c4;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { scrollbar-width: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; width: 0; height: 0; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  background: #000;
  color: var(--text);
  font-size: 1.08rem;
  position: relative;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; }

#floating-logos {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
  opacity: 1;
  background: #000;
}

.logo-float {
  position: absolute;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  box-shadow: inset 0 0 28px rgba(255,255,255,0.04), 0 18px 32px rgba(0,0,0,0.28);
  backdrop-filter: blur(6px);
  animation: driftDown linear infinite;
  transform: translate3d(0, -20vh, 0);
}

.logo-float img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(0,0,0,0.58));
}

@keyframes driftDown {
  0% {
    transform: translate3d(0, -20vh, 0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 0.9;
  }
  100% {
    transform: translate3d(26px, 118vh, 0) rotate(12deg);
    opacity: 0;
  }
}

.site-header,
.hero,
.page-shell {
  position: relative;
  z-index: 1;
}

.site-header {
  max-width: 1280px;
  margin: 0 auto;
  padding: 26px 20px 0;
  display: flex;
  justify-content: flex-end;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 18px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(10px);
}

.top-nav a {
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 600;
}

.top-nav a:hover { color: var(--text); }

.hero {
  max-width: 1100px;
  margin: 74px auto 30px;
  text-align: center;
  padding: 80px 20px 40px;
}

.hero-badge,
.eyebrow {
  display: inline-flex;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.86rem;
  font-weight: 700;
}

.hero h1,
.section-heading h2 {
  margin: 22px auto 16px;
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(3.4rem, 8vw, 7rem);
}

.hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--text);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.8;
}

.cta-row {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-btn,
.secondary-btn,
.action-btn,
.copy-btn,
.back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-weight: 700;
  border: 1px solid var(--text);
  font-size: 1.08rem;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.action-btn {
  background: rgba(0, 0, 0, 0.68);
  color: var(--text);
  padding: 15px 24px;
  box-shadow: 0 0 0 1px rgba(215, 222, 231, 0.14), 0 18px 40px rgba(0, 0, 0, 0.42);
}

.secondary-btn,
.back-btn,
.copy-btn {
  background: rgba(0, 0, 0, 0.58);
  color: var(--text);
  padding: 15px 22px;
}

.primary-btn:hover,
.secondary-btn:hover,
.action-btn:hover,
.copy-btn:hover,
.back-btn:hover {
  transform: translateY(-1px);
  border-color: #ffffff;
  box-shadow: 0 0 18px rgba(215, 222, 231, 0.18);
}

.page-shell {
  max-width: 1180px;
  margin: 0 auto 72px;
  padding: 0 20px;
}

.section-heading {
  margin-bottom: 28px;
  text-align: center;
}

.section-heading h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}

.card-grid,
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.category-card,
.app-card,
.app-detail-card {
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.category-card {
  padding: 22px;
}

.category-card .icon-wrap,
.app-card .app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.category-card .icon-wrap img,
.app-card .app-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.category-card h3,
.app-card h3 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.category-card p,
.app-card p,
.app-detail-card p {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.7;
}

.card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.app-card {
  padding: 22px;
}

.app-card .app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.badge {
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(120, 240, 198, 0.08);
  border: 1px solid rgba(120, 240, 198, 0.2);
}

.app-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

.detail-shell { padding-bottom: 70px; }
.app-detail-card { padding: 26px; }
.detail-intro {
  margin: 12px 0 18px;
}
.detail-intro h2 {
  margin: 10px 0 0;
  font-size: clamp(2.1rem, 4vw, 3rem);
  letter-spacing: -0.05em;
}
.app-detail-header {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.large-icon {
  width: 96px;
  height: 96px;
  border-radius: 28px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
}

.large-icon img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.app-detail-header h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.2rem);
  letter-spacing: -0.05em;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0 18px;
}

.code-block {
  background: rgba(0, 0, 0, 0.68);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  margin-top: 20px;
}

.code-block header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 12px 18px;
}

.code-block h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.code-block pre {
  margin: 0;
  padding: 18px;
  overflow-x: auto;
  line-height: 1.8;
  color: #d9f7ff;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: 'SFMono-Regular', Consolas, Menlo, monospace;
  font-size: 1rem;
}

.copy-group {
  margin-top: 20px;
  display: grid;
  gap: 16px;
}

.support-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.support-modal.active {
  display: flex;
}

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
}

.support-modal-card {
  position: relative;
  width: min(92vw, 560px);
  background: rgba(15, 18, 22, 0.98);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.7);
  padding: 28px 24px 22px;
  z-index: 1;
}

.support-modal-card h2 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.05em;
}

.support-text {
  color: var(--muted);
  margin: 0 0 18px;
  line-height: 1.7;
}

.support-actions {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.support-action {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0, 0, 0, 0.58);
  color: var(--text);
  padding: 16px 18px;
  border-radius: 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.support-action.secondary {
  background: rgba(0, 0, 0, 0.58);
}

.support-action.done {
  border-color: var(--text);
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
}

.close-modal {
  position: absolute;
  top: 12px;
  right: 14px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 2rem;
  cursor: pointer;
}

.support-continue {
  width: 100%;
  border: 0;
  opacity: 0.5;
  cursor: not-allowed;
}

.support-continue.enabled {
  opacity: 1;
  cursor: pointer;
}

.signin-shell,
.support-shell {
  min-height: 78vh;
  display: grid;
  place-items: center;
}

.signin-panel,
.support-panel {
  width: min(100%, 650px);
  padding: 42px;
  text-align: center;
  background: rgba(0, 0, 0, 0.58);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.signin-panel h1,
.support-panel h1 {
  margin: 20px 0 12px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

.signin-panel p:not(.eyebrow),
.support-panel p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }

.github-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 24px;
  padding: 15px 22px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.68);
  box-shadow: 0 0 0 1px rgba(215, 222, 231, 0.14);
  font-weight: 800;
}

.support-status {
  margin: 22px 0;
  color: var(--accent-2);
  min-height: 24px;
}

.support-panel .support-actions {
  display: grid;
  gap: 12px;
  text-align: left;
}

.support-panel .support-action {
  display: grid;
  grid-template-columns: 34px 1fr 24px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 16px;
}

.support-action-icon { font-size: 1.4rem; color: var(--accent-2); }
.support-action strong,
.support-action small { display: block; }
.support-action small { margin-top: 4px; color: var(--muted); font-weight: 400; }
.support-action .task-state { text-align: right; font-size: 1.3rem; }
.support-action.done { border-color: rgba(120,240,198,0.7); color: var(--accent-2); }
.support-action.loading { opacity: 0.65; }
.support-panel .support-continue { margin-top: 22px; width: 100%; }
.signin-error { color: #ff9b9b !important; }

.distro-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 14px;
}

.distro-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 10px 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.distro-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.distro-tab.active {
  color: var(--text);
  background: rgba(0, 0, 0, 0.72);
  border-color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.distro-panel { display: none; }
.distro-panel.active { display: block; }

@media (max-width: 640px) {
  .site-header { justify-content: center; }
  .top-nav { gap: 12px; }
  .hero { margin-top: 40px; }
  .logo-float {
    width: 66px;
    height: 66px;
  }
  .logo-float img {
    width: 38px;
    height: 38px;
  }
}
