* { box-sizing: border-box; }

:root {
  --bg-1: #f7f9ff;
  --bg-2: #eef3ff;
  --line: rgba(79, 103, 163, 0.16);
  --card: #fff;
}

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 680px at -6% -10%, #dbe8ff 0%, transparent 60%),
    radial-gradient(900px 500px at 105% 0%, #e9ddff 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: #1a2950;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: 12px clamp(12px, 2.5vw, 30px) 0;
}

.download-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #5a7cff, #7a5cff);
  box-shadow: 0 10px 24px rgba(72, 88, 183, 0.28);
}

.download-app:hover {
  filter: brightness(1.05);
}

.wall {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: clamp(12px, 2.5vw, 30px);
}


.gallery {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 84px;
  grid-auto-flow: dense;
  gap: clamp(10px, 1.2vw, 18px);
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: 0 14px 30px rgba(38, 58, 108, 0.11);
  transition: transform .26s ease, box-shadow .26s ease;
  padding: 0;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
}


.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(16, 28, 58, .18));
  opacity: 0;
  transition: opacity .26s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(31, 51, 97, 0.2);
}

.card:hover::after { opacity: 1; }

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #edf2ff;
}

.meta-badges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.platform-tag {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  color: #fff;
  background: rgba(99, 102, 241, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
  white-space: nowrap;
}

.platform-android {
  background: rgba(52, 168, 83, 0.9);
  box-shadow: 0 2px 6px rgba(52, 168, 83, 0.3);
}

.platform-harmony {
  background: rgba(239, 68, 68, 0.9);
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.platform-web {
  background: rgba(59, 130, 246, 0.9);
  box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.stamp-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, #ff83c2, #ffad68);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 4px 10px rgba(255, 108, 159, 0.35);
}

.author-icon-badge {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, rgba(240, 112, 167, 0.95), rgba(255, 151, 96, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 10px rgba(255, 108, 159, 0.3);
}

.author-text-badge {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 132, 187, 0.96), rgba(255, 189, 106, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 10px rgba(255, 108, 159, 0.28);
}


.time-badge {
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  line-height: 1;
  color: #fff;
  background: rgba(11, 19, 44, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
}



.card-xl { grid-column: span 6; grid-row: span 5; }

.card-l  { grid-column: span 4; grid-row: span 4; }
.card-m  { grid-column: span 3; grid-row: span 3; }

.empty {
  margin-top: 34px;
  text-align: center;
  color: #6577a1;
  font-size: 15px;
}

.viewer {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(10, 16, 32, 0.82);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 16px;
  cursor: zoom-out;
}

.viewer img {
  max-width: min(1280px, 96vw);
  max-height: 92vh;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  background: #fff;
}

.hidden { display: none; }

@media (max-width: 1120px) {

  .gallery { grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: 78px; }
  .card-xl { grid-column: span 8; grid-row: span 5; }
  .card-l  { grid-column: span 4; grid-row: span 4; }
  .card-m  { grid-column: span 4; grid-row: span 3; }
}

@media (max-width: 720px) {
  .wall { padding: 10px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44vw; gap: 10px; }
  .card-xl, .card-l, .card-m { grid-column: span 1; grid-row: span 1; border-radius: 14px; }
}
