:root {
  --bg: #070506;
  --panel: #130c10cc;
  --panel-strong: #171018f2;
  --panel-border: #4d2733;
  --text: #ffedf2;
  --muted: #c8a8b1;
  --accent: #ff6e95;
  --accent-2: #ff4778;
  --accent-3: #ff9fbe;
  --line: #2a1520;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(70% 55% at 12% 5%, #56132655 0%, transparent 70%),
    radial-gradient(45% 35% at 85% 8%, #6f183d3d 0%, transparent 72%),
    radial-gradient(95% 70% at 50% -16%, #4210234a 0%, transparent 78%),
    linear-gradient(180deg, #070405 0%, #040203 45%, #020102 100%);
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -18%, #ff6b8a2c 0%, transparent 54%),
    radial-gradient(circle at 50% 120%, #9c1d4120 0%, transparent 48%),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 33px,
      #ff9eb511 34px
    ),
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 33px,
      #ff9eb511 34px
    );
  opacity: 0.72;
}

.wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 0 auto;
}

.preload .hero,
.preload .panel,
.preload .site-footer {
  opacity: 0;
  transform: translateY(20px);
}

body.ready .hero {
  animation: enter-up 0.62s cubic-bezier(0.22, 1, 0.36, 1) both;
}

body.ready .panel {
  animation: enter-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.09s both;
}

body.ready .site-footer {
  animation: enter-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.16s both;
}

.hero {
  padding: 4.1rem 0 1.8rem;
  position: relative;
}

.badge {
  display: inline-block;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.42rem 0.78rem;
  border: 1px solid #613441;
  border-radius: 999px;
  color: #f0c7d0;
  background: linear-gradient(180deg, #29161d, #1e1117);
  box-shadow: inset 0 1px 0 #ffffff14;
  position: relative;
  z-index: 1;
}

h1 {
  margin: 1rem 0 0.55rem;
  font-size: clamp(2.15rem, 4vw, 3.35rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px #ff5f8d26;
  background: linear-gradient(180deg, #fff2f6 0%, #ffc5d5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
  z-index: 1;
}

.subtitle {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  font-size: 1.02rem;
  position: relative;
  z-index: 1;
}

.hero-metrics {
  margin-top: 1.4rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.metric {
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, #26161ecc, #150d12c4);
  border-radius: 14px;
  padding: 0.9rem 1.05rem;
  min-width: 240px;
  box-shadow: 0 8px 24px #00000040;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 90%;
  background: radial-gradient(circle, #ff8baa26 0%, transparent 68%);
  pointer-events: none;
}

.label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1rem;
  color: #ffdfe7;
}

main {
  flex: 1;
  padding-bottom: 1.5rem;
}

.panel {
  border: 1px solid var(--panel-border);
  background: linear-gradient(170deg, #1b1117d6 0%, #0f0b0fd9 100%);
  border-radius: 18px;
  padding: 1.25rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 18px 44px #00000045, inset 0 1px 0 #ffffff08;
  margin-bottom: 1rem;
}

.panel-head {
  margin-bottom: 0.9rem;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: #ffe1ea;
}

.panel-head p {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.format-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.format-card {
  position: relative;
  text-decoration: none;
  color: inherit;
  border: 1px solid #4f2a36;
  background: linear-gradient(180deg, #190f15, #100a0f);
  border-radius: 14px;
  padding: 1rem;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.format-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, #ff7ea01f 0%, transparent 70%);
  pointer-events: none;
}

.format-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #ff8ca6, transparent);
  opacity: 0.85;
}

.format-card:hover {
  transform: translateY(-4px);
  border-color: #6a3142;
  box-shadow: 0 14px 26px #00000044, 0 0 0 1px #ff9ab520;
}

.tag {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  border: 1px solid #5e3340;
  color: #ff9eb6;
  background: #2a141b;
  padding: 0.22rem 0.45rem;
  border-radius: 6px;
  font-weight: 600;
}

.format-card h3 {
  margin: 0.7rem 0 0.38rem;
  font-size: 1.02rem;
}

.format-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.format-json::after {
  background: linear-gradient(180deg, #ff9ec0, transparent);
}

.format-cs::after {
  background: linear-gradient(180deg, #f18ab0, transparent);
}

.format-cpp::after {
  background: linear-gradient(180deg, #ff7da4, transparent);
}

.format-py::after {
  background: linear-gradient(180deg, #ffb5c9, transparent);
}

.format-json .tag {
  border-color: #6a3745;
}

.format-cs .tag {
  border-color: #6a3647;
}

.format-cpp .tag {
  border-color: #70334a;
}

.format-py .tag {
  border-color: #7a4158;
}

.search-head {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: end;
}

#search {
  width: min(420px, 100%);
  border: 1px solid #35506c;
  background: #0a1018;
  color: var(--text);
  border-radius: 10px;
  padding: 0.68rem 0.8rem;
  outline: none;
}

#search:focus {
  border-color: var(--accent-2);
}

.results-info {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.75rem;
}

.offset-container {
  display: grid;
  gap: 0.7rem;
}

.offset-group {
  border: 1px solid #2a3d52;
  border-radius: 12px;
  background: #0b121a;
  overflow: hidden;
}

summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #1c2b3a;
}

summary::-webkit-details-marker {
  display: none;
}

.count {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
}

.rows {
  padding: 0.5rem;
}

.offset-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem;
  border-radius: 8px;
}

.offset-row:nth-child(odd) {
  background: #0f1823;
}

.field {
  font-weight: 500;
}

.mono {
  font-family: "IBM Plex Mono", monospace;
  color: #d0e3ff;
  font-size: 0.9rem;
}

.copy-btn {
  border: 1px solid #3e566e;
  background: #122131;
  color: #d9ebff;
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.copy-btn:hover {
  border-color: #5a82ac;
}

.copy-btn.done {
  border-color: #458f72;
  color: #b8ffd3;
}

.error {
  border: 1px solid #64453a;
  color: #ffd4c9;
  background: #2a1712;
  padding: 0.8rem;
  border-radius: 10px;
}

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: transparent;
  padding: 0.95rem 0 1.2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.footer-credit {
  margin: 0;
  color: #ccb7be;
  font-size: 0.92rem;
}

.footer-credit strong {
  color: #fff4f6;
  font-weight: 600;
}

.footer-pill {
  margin-top: 0.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 122px;
  border: 1px solid #51303d;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  color: #f0bfd0;
  text-decoration: none;
  font-size: 0.86rem;
  background: linear-gradient(180deg, #28171e8a, #1b10178a);
}

.footer-pill:hover {
  border-color: #754656;
  color: #ffe3eb;
  box-shadow: 0 0 0 1px #ffabc828;
}

@keyframes enter-up {
  from {
    opacity: 0;
    transform: translateY(20px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 900px) {
  .format-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-metrics {
    display: block;
  }

  .search-head {
    flex-direction: column;
    align-items: stretch;
  }

  .offset-row {
    grid-template-columns: 1fr 1fr;
  }

  .copy-btn {
    justify-self: start;
  }

  .footer-credit {
    font-size: 0.84rem;
  }
}

@media (max-width: 580px) {
  .hero {
    padding-top: 3.2rem;
  }

  .format-grid {
    grid-template-columns: 1fr;
  }

  .panel {
    padding: 1rem;
  }
}


