/* Shared non-Tailwind styling for the live public pages. */

:root {
  --metal: linear-gradient(135deg, #fafafa 0%, #cfcfcf 22%, #ffffff 36%, #bdbdbd 60%, #f3f3f3 80%, #d6d6d6 100%);
  --goldTop: rgba(255, 215, 0, .16);
  --goldBottom: rgba(255, 215, 0, .06);
  --bg-deep-1: #0b1220;
  --bg-deep-2: #0a0d14;
  --glass-top: rgba(255, 255, 255, .06);
  --glass-bottom: rgba(255, 255, 255, .03);
  --glass-border: rgba(255, 255, 255, .10);
  --frost-strong-filter: blur(18px) saturate(1.3);
  --frost-medium-filter: blur(12px) saturate(1.15);
  --frost-light-filter: blur(6px);
  --frost-edge-highlight-top: rgba(200, 230, 255, .14);
  --frost-edge-inner-rim: rgba(255, 255, 255, .04);
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans";
  background-color: #0a0d14;
}

body.icy-frost-surface::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 5% -10%, rgba(100, 140, 200, .12), transparent 55%),
    radial-gradient(1100px 520px at 105% 0%, rgba(80, 120, 200, .10), transparent 60%),
    linear-gradient(180deg, rgba(10, 13, 20, .78) 0%, rgba(5, 8, 12, .78) 100%),
    url('/assets/bg/icy-frost.webp');
  background-size: auto, auto, auto, cover;
  background-position: 5% -10%, 105% 0%, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
}

body.icy-frost-surface {
  position: relative;
  isolation: isolate;
}

body.icy-frost-surface::before {
  background:
    radial-gradient(1200px 600px at 5% -10%, rgba(120, 180, 255, .16), transparent 55%),
    radial-gradient(1100px 520px at 105% 0%, rgba(100, 170, 250, .13), transparent 60%),
    linear-gradient(180deg, rgba(10, 13, 20, .62) 0%, rgba(5, 8, 12, .72) 100%),
    url('/assets/bg/icy-frost.webp');
}

body.icy-frost-surface > *:not(dialog):not(.fixed) {
  position: relative;
  z-index: 2;
}

.mod-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: 3px;
  row-gap: 22px;
  align-items: start;
}

.mod-showcase-card {
  width: 100%;
}

.mod-showcase-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  isolation: isolate;
  border-radius: 1.15rem;
  border: 1px solid rgba(255,255,255,.08);
  background: #090c13;
  box-shadow: 0 12px 28px rgba(0,0,0,.24);
  transition: transform .2s ease, border-color .22s ease, box-shadow .22s ease;
}

.mod-showcase-card.free .mod-showcase-media {
  border-color: rgba(56,189,248,.12);
}

.mod-showcase-card.paid .mod-showcase-media {
  border-color: rgba(250,204,21,.15);
}

.mod-showcase-card:hover .mod-showcase-media {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}

.mod-showcase-card.free:hover .mod-showcase-media {
  border-color: rgba(56,189,248,.22);
}

.mod-showcase-card.paid:hover .mod-showcase-media {
  border-color: rgba(250,204,21,.24);
}

.mod-showcase-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6,9,16,.18) 0%, rgba(6,9,16,.36) 42%, rgba(6,9,16,.78) 78%, rgba(6,9,16,.94) 100%);
  z-index: 1;
  pointer-events: none;
}

.mod-showcase-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
  z-index: 3;
}

.mod-showcase-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease, filter .45s ease;
}

.mod-showcase-card:hover img {
  transform: scale(1.03);
  filter: saturate(1.03);
}

.mod-showcase-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1rem;
}

.mod-showcase-head {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  max-width: 100%;
}

.mod-showcase-badges {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.mod-showcase-card h3 {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-family: Sora, Inter, system-ui, sans-serif;
  font-size: clamp(1.12rem, 2vw, 1.45rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: #f4f4f5;
  text-shadow: 0 10px 24px rgba(0,0,0,.42);
}

.mod-showcase-card .cats {
  display: flex;
  flex-wrap: nowrap;
  gap: .3rem;
  max-width: 100%;
  overflow: hidden;
  align-items: center;
}

.mod-showcase-card .cats .chip {
  flex: 0 0 auto;
}

.mod-showcase-card .cats .chip,
.mod-showcase-badges .chip:not(.price-badge) {
  border-color: rgba(255,255,255,.1) !important;
  background: rgba(8,12,20,.52) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
  color: rgba(244,244,245,.92) !important;
}

.mod-showcase-footer {
  margin-top: auto;
  min-height: 2.75rem;
  display: flex;
  align-items: flex-end;
  padding-right: 4.6rem;
}

.mod-showcase-card .author {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .78rem;
  font-weight: 500;
  color: rgba(228,228,231,.8);
  letter-spacing: .01em;
}

.mod-showcase-like {
  pointer-events: none;
  position: absolute;
  right: .8rem;
  bottom: .8rem;
  z-index: 4;
}

.mod-showcase-like .like-toggle {
  pointer-events: auto;
  min-width: 3.5rem;
  height: 2.35rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(8,12,20,.54);
  box-shadow: none;
  backdrop-filter: blur(10px);
  color: #f4f4f5;
}

.mod-showcase-like .mod-showcase-like-count {
  pointer-events: none;
}

@media (min-width: 48rem) {
  .mod-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 80rem) {
  .mod-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.brand {
  font-family: Sora, Inter, system-ui, sans-serif;
}

.metallic {
  background: var(--metal);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(6px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 10px 30px rgba(0, 0, 0, .45);
  border-radius: 1rem;
}

body.icy-frost-surface .glass {
  background: linear-gradient(180deg, var(--glass-top), var(--glass-bottom));
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: var(--frost-strong-filter);
  -webkit-backdrop-filter: var(--frost-strong-filter);
  box-shadow:
    inset 0 1px 0 var(--frost-edge-highlight-top),
    inset 0 0 0 1px var(--frost-edge-inner-rim),
    0 10px 30px rgba(0, 0, 0, .45);
}

body.icy-frost-surface #accountBadge.glass {
  border-color: rgba(255, 255, 255, .12);
  backdrop-filter: var(--frost-light-filter);
  -webkit-backdrop-filter: var(--frost-light-filter);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 10px 24px rgba(0, 0, 0, .28);
}

.btn-primary {
  background: linear-gradient(90deg, #10b981, #22d3ee 50%, #38bdf8);
  background-size: 200% 100%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, .35), 0 8px 24px rgba(34, 211, 238, .22);
  transition: background-position .4s ease, transform .15s ease, box-shadow .2s ease;
}

.btn-primary:hover {
  background-position: 100% 0;
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, .45), 0 10px 30px rgba(56, 189, 248, .28);
}

.file-picker-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .75rem;
}

.file-picker-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, .12);
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 10px 28px rgba(0, 0, 0, .24);
  overflow: hidden;
}

.file-picker-control:focus-within {
  border-color: rgba(56, 189, 248, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .06),
    0 0 0 2px rgba(56, 189, 248, .18),
    0 10px 28px rgba(0, 0, 0, .24);
}

.file-picker-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-picker-trigger {
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: 0 .95rem;
  font-size: .84rem;
  font-weight: 600;
  color: #e8f7ff;
}

.file-picker-trigger svg {
  width: 16px;
  height: 16px;
  opacity: .9;
}

.file-picker-status {
  font-size: .79rem;
  color: #a1a1aa;
}

#crystalLayer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 2;
}

.cb-shard {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  background: linear-gradient(180deg, rgba(200, 230, 255, .95), rgba(150, 200, 255, .75));
  box-shadow: 0 0 12px rgba(130, 180, 255, .35);
  transform-origin: 50% 70%;
  animation: cbFly .8s ease-out forwards;
}

@keyframes cbFly {
  0% {
    transform: translate(0, 0) scale(.6) rotate(0deg);
    opacity: .95;
    filter: blur(0);
  }

  100% {
    transform: translate(var(--tx), var(--ty)) scale(1) rotate(var(--rot));
    opacity: 0;
    filter: blur(1px);
  }
}
