/* Kofge-Clicker site enhancements */

.release-meta {
  width: fit-content;
  max-width: 100%;
  margin: 17px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 13px;
}
.release-meta > span:not(.release-live)::before {
  content: "·";
  margin-right: 12px;
  color: #5f6979;
}
.release-meta a {
  color: #cfe1ff;
  text-decoration: none;
  font-weight: 700;
}
.release-meta a:hover { color: var(--text); }
.release-live {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #dce5f4;
  font-weight: 750;
}
.release-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(134, 239, 172, .55);
}

.quick-start-section { padding-top: 34px; }
.quick-start-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.quick-start-card {
  position: relative;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
}
.quick-start-number {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid rgba(126,184,255,.26);
  border-radius: 12px;
  color: #d9eaff;
  background: rgba(102,167,255,.09);
  font-size: 13px;
  font-weight: 900;
}
.quick-start-card h3 { margin: 0 0 7px; font-size: 18px; }
.quick-start-card p { margin: 0; color: var(--muted); font-size: 14px; }

.download-panel { position: relative; overflow: hidden; }
.download-panel::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -110px;
  top: -120px;
  border-radius: 50%;
  background: rgba(102,167,255,.07);
  pointer-events: none;
  filter: blur(2px);
}
.release-file-card {
  position: relative;
  z-index: 1;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 17px;
  background: rgba(9,12,17,.58);
}
.release-file-head {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.release-file-icon {
  flex: 0 0 auto;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(126,184,255,.22);
  border-radius: 14px;
  color: #d8eaff;
  background: rgba(102,167,255,.08);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.release-file-copy { min-width: 0; display: grid; gap: 3px; }
.release-file-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
}
.release-file-copy span { color: var(--muted); font-size: 12px; }
.release-file-badge {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(134,239,172,.17);
  border-radius: 999px;
  color: #bbf7d0;
  background: rgba(134,239,172,.055);
  font-size: 11px;
  font-weight: 800;
}
.release-file-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  margin-top: 14px;
}
.release-file-actions .btn { min-height: 44px; }
.release-file-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}
.release-file-details span + span::before {
  content: "·";
  margin-right: 12px;
  color: #5f6979;
}
.release-digest-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  min-width: 0;
}
.release-digest-row[hidden] { display: none; }
.release-digest-label { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.release-digest-row code {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #cfe1ff;
  font-size: 10px;
}
.release-copy-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #dce5f4;
  background: rgba(255,255,255,.035);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.release-copy-button:hover { border-color: rgba(255,255,255,.2); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.02));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 16px 46px rgba(0,0,0,.16);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,.18);
  box-shadow: 0 22px 52px rgba(0,0,0,.24);
}
.gallery-card img {
  width: 100%;
  aspect-ratio: 1100 / 635;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  transition: transform .22s ease;
}
.gallery-card:hover img { transform: scale(1.012); }
.gallery-card-copy {
  display: grid;
  gap: 3px;
  padding: 14px 16px 16px;
}
.gallery-card-copy strong { font-size: 15px; }
.gallery-card-copy small { color: var(--muted); font-size: 13px; line-height: 1.45; }

.mobile-download-bar { display: none; }

@media (max-width: 900px) {
  .quick-start-grid { grid-template-columns: 1fr; }
  .quick-start-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 13px;
    align-items: start;
    padding: 19px;
  }
  .quick-start-number { grid-row: 1 / span 2; margin: 0; }
  .quick-start-card h3 { margin-top: 1px; }
  .quick-start-card p { grid-column: 2; }
}

@media (max-width: 680px) {
  .hero-shot {
    aspect-ratio: 1.78 / 1;
    overflow: hidden;
  }
  .hero-shot img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
  }

  .release-meta {
    margin-top: 15px;
    gap: 6px 9px;
    font-size: 12px;
  }
  .release-meta > span:not(.release-live)::before { margin-right: 9px; }
  .release-meta a { flex-basis: 100%; margin-top: 2px; }

  .quick-start-section { padding-top: 24px; }
  .quick-start-grid { gap: 10px; }

  .release-file-card { margin-top: 18px; padding: 14px; }
  .release-file-badge { display: none; }
  .release-file-actions { grid-template-columns: 1fr; }
  .release-file-actions .btn { width: 100%; }
  .release-file-details { gap: 5px 9px; }
  .release-file-details span + span::before { margin-right: 9px; }

  .gallery { overflow: hidden; }
  .gallery-grid {
    display: flex;
    gap: 12px;
    width: auto;
    margin-inline: -14px;
    padding: 2px 14px 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 14px;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .gallery-grid::-webkit-scrollbar { display: none; }
  .gallery-card {
    flex: 0 0 min(84vw, 360px);
    scroll-snap-align: start;
    border-radius: 16px;
  }
  .gallery-card:hover { transform: none; }
  .gallery-card-copy { padding: 12px 14px 14px; }

  .mobile-download-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 85;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 9px 9px 13px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 17px;
    background: rgba(17,21,28,.94);
    box-shadow: 0 18px 54px rgba(0,0,0,.46);
    backdrop-filter: blur(18px);
    transform: translateY(calc(100% + 34px));
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
  }
  .mobile-download-bar.is-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-download-copy { min-width: 0; display: grid; line-height: 1.2; }
  .mobile-download-copy strong { font-size: 13px; }
  .mobile-download-copy span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
  }
  .mobile-download-bar .btn {
    flex: 0 0 auto;
    min-height: 42px;
    padding-inline: 15px;
    border-radius: 11px;
    font-size: 13px;
  }
}

@media (max-width: 360px) {
  .mobile-download-copy strong { display: none; }
  .mobile-download-copy span { margin-top: 0; }
  .mobile-download-bar .btn { padding-inline: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-card,
  .gallery-card img,
  .mobile-download-bar { transition: none; }
}
