:root {
  --page: #ecfbff;
  --panel: #ffffff;
  --blue-950: #0d6078;
  --blue-900: #1185a3;
  --blue-800: #17a7c8;
  --blue-700: #32bfdc;
  --cyan-600: #42c9e3;
  --cyan-100: #d9f8ff;
  --cyan-050: #f7feff;
  --mint: #9ee98d;
  --line: #c8edf6;
  --line-strong: #8edfeb;
  --text: #174555;
  --muted: #6d98a5;
  --shadow: 0 14px 34px rgba(62, 178, 207, 0.12);
  --radius: 10px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 18%, rgba(158, 233, 141, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(190, 240, 255, 0.86), rgba(247, 254, 255, 0) 320px),
    var(--page);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 14px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img {
  max-width: 100%;
}

.wrap {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.site-header,
.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, #67d6ef, #28b8d7);
  box-shadow: 0 4px 18px rgba(36, 165, 200, 0.22);
}

.nav {
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 360px) auto;
  gap: 18px;
  align-items: center;
  min-height: 66px;
}

.brand,
.admin-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
}

.brand {
  color: #fff;
  font-size: 22px;
  white-space: nowrap;
}

.brand-mark {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 11px;
  background: linear-gradient(145deg, #b4f19c, #4bd0e6);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    0 8px 18px rgba(34, 169, 197, 0.22);
}

.main-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.nav-menu-item {
  position: relative;
  display: flex;
  align-items: center;
  height: 66px;
}

.main-menu button,
.admin-link {
  height: 38px;
  padding: 0 16px;
  color: #f7feff;
  background: transparent;
  border-radius: 10px;
  line-height: 38px;
  white-space: nowrap;
}

.main-menu button:hover,
.main-menu button.active,
.nav-menu-item:hover > button,
.admin-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.24);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% - 5px);
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  gap: 8px;
  width: 208px;
  padding: 12px;
  border: 1px solid rgba(142, 223, 235, 0.9);
  border-radius: 12px;
  background: rgba(248, 254, 255, 0.98);
  box-shadow: 0 18px 34px rgba(55, 169, 198, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.nav-dropdown::before {
  position: absolute;
  top: -7px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-top: 1px solid rgba(142, 223, 235, 0.9);
  border-left: 1px solid rgba(142, 223, 235, 0.9);
  background: rgba(248, 254, 255, 0.98);
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.nav-menu-item:hover .nav-dropdown,
.nav-menu-item:focus-within .nav-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown .category-link {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  color: #21798b;
  background: #e9fbff;
  border-radius: 9px;
  font-weight: 800;
}

.nav-dropdown .category-link:hover,
.nav-dropdown .category-link.active {
  color: #fff;
  background: linear-gradient(180deg, var(--cyan-600), var(--blue-700));
  box-shadow: 0 8px 16px rgba(66, 201, 227, 0.2);
}

.search {
  display: flex;
  height: 38px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(45, 168, 199, 0.13);
}

.search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  padding: 0 15px;
  color: var(--text);
  background: transparent;
}

.search button {
  width: 78px;
  color: #fff;
  background: linear-gradient(180deg, #57d3e9, #22acd0);
  font-weight: 800;
}

.category-nav {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
}

.category-nav .wrap {
  padding: 10px 0;
}

.category-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  min-height: 36px;
  border-bottom: 1px dashed #d8f1f7;
}

.category-row:last-child {
  border-bottom: 0;
}

.category-row strong {
  color: var(--blue-900);
}

.category-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.category-link {
  min-height: 28px;
  padding: 0 11px;
  color: #397989;
  background: transparent;
  border-radius: 999px;
}

button.category-link {
  border: 0;
}

.category-link:hover,
.category-link.active {
  color: #fff;
  background: linear-gradient(180deg, var(--cyan-600), var(--blue-700));
}

.page-main {
  padding: 18px 0 0;
}

.hero-grid,
.feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
}

.hero-main,
.hero-side,
.feature-card,
.side-panel,
.gallery-section,
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero-main {
  position: relative;
  overflow: hidden;
}

.hero-image-button {
  position: relative;
  display: block;
  width: 100%;
  min-height: 386px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: #d9f8ff;
  text-align: left;
}

.hero-image-button img {
  display: block;
  width: 100%;
  height: 386px;
  object-fit: cover;
  transition: transform 220ms ease;
}

.hero-image-button:hover img {
  transform: scale(1.025);
}

.hero-label,
.hero-title,
.hero-info {
  position: absolute;
  z-index: 1;
  left: 28px;
  right: 28px;
}

.hero-label {
  top: 28px;
  display: inline-flex;
  right: auto;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(66, 201, 227, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.hero-title {
  bottom: 66px;
  max-width: 680px;
  font-size: clamp(28px, 3.4vw, 46px);
  line-height: 1.12;
  font-weight: 900;
  text-shadow: 0 3px 18px rgba(0, 30, 52, 0.45);
}

.hero-info {
  bottom: 32px;
  color: #fff;
  font-size: 15px;
  text-shadow: 0 2px 12px rgba(0, 30, 52, 0.5);
}

.hero-dots {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(17, 133, 163, 0.34);
  box-shadow: 0 10px 22px rgba(30, 144, 171, 0.18);
  backdrop-filter: blur(8px);
}

.hero-dots i {
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition:
    width 160ms ease,
    background 160ms ease;
}

.hero-dots i.active {
  width: 28px;
  background: #fff;
}

.hero-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 40px;
  height: 48px;
  color: #fff;
  background: rgba(17, 133, 163, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: 12px;
  font-size: 34px;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(30, 144, 171, 0.2);
  transform: translateY(-50%);
}

.hero-nav:hover {
  background: rgba(66, 201, 227, 0.78);
}

.hero-prev {
  left: 16px;
}

.hero-next {
  right: 16px;
}

.hero-side,
.side-panel {
  padding: 16px;
}

.side-title,
.panel-title,
.section-head,
.admin-top,
.admin-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 2px solid var(--cyan-100);
}

.side-title h2,
.panel-title h2,
.section-head h2,
.admin-title h1,
.section-head p {
  margin: 0;
}

.side-title h2,
.section-head h2 {
  color: var(--blue-950);
  font-size: 20px;
}

.side-title span,
.section-head span,
.admin-title p,
.section-head p,
.empty span {
  color: var(--muted);
}

.section-head p {
  margin-top: 5px;
  font-size: 13px;
}

.hot-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.hot-list button {
  min-height: 42px;
  color: var(--blue-900);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #f7feff, #edfbff);
  font-weight: 800;
}

.hot-list button:hover {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(180deg, var(--cyan-600), var(--blue-700));
}

.quick-card,
.notice {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 15px;
  border: 1px solid #c8edf6;
  border-radius: 10px;
  background:
    radial-gradient(circle at top right, rgba(158, 233, 141, 0.22), transparent 44%),
    linear-gradient(180deg, #f5fdff, #ffffff);
}

.quick-card strong,
.notice strong {
  color: var(--blue-900);
  font-size: 16px;
}

.quick-card span,
.notice p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.gallery-section {
  margin-top: 18px;
  padding: 17px;
}

.gallery {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}

.gallery-row-head {
  margin-top: 2px;
  padding: 13px 0 0;
  border-top: 2px solid var(--cyan-100);
}

.gallery-row-head h2 {
  margin: 0;
  color: var(--blue-950);
  font-size: 20px;
  line-height: 1.3;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.gallery-row + .gallery-row {
  margin-top: 2px;
}

.wallpaper-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

.wallpaper-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 26px rgba(56, 168, 196, 0.16);
}

.wallpaper-card button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.wallpaper-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background: #d9f8ff;
  transition: transform 180ms ease;
}

.wallpaper-card:hover img {
  transform: scale(1.025);
}

.wallpaper-card.mobile img {
  aspect-ratio: 9 / 13;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0d7f9b;
  font-size: 12px;
  font-weight: 900;
  line-height: 24px;
  box-shadow: 0 6px 12px rgba(56, 168, 196, 0.13);
}

.card-meta {
  padding: 11px;
}

.card-meta h3 {
  margin: 0 0 6px;
  overflow: hidden;
  color: #184a58;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  background: var(--cyan-050);
}

.empty[hidden] {
  display: none;
}

.empty strong {
  color: var(--blue-900);
}

.empty a,
.modal-meta a,
.upload-form button,
.collect-form button,
.login-card button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  color: #fff;
  background: linear-gradient(180deg, #62dbe9, #28b8d7);
  border-radius: 10px;
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(18, 91, 112, 0.5);
}

.modal[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  width: min(1040px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: 12px;
  background: #fff;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.95);
  border-radius: 10px;
  font-size: 24px;
}

.modal-panel img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #e8fbff;
}

.modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px;
}

.modal-meta > a + a {
  margin-left: 10px;
  color: var(--blue-900);
  background: #e9fbff;
  border: 1px solid var(--line-strong);
}

.modal-meta h3,
.modal-meta p {
  margin: 0 0 4px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0;
  color: var(--muted);
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 32px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 42px;
  padding: 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #68ddec, #27b6d5);
  box-shadow: 0 14px 28px rgba(47, 169, 198, 0.25);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  box-shadow: 0 18px 34px rgba(47, 169, 198, 0.34);
  transform: translateY(-2px);
}

.admin-body {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 34px 14px;
  background: var(--page);
}

.admin-shell {
  width: min(980px, 100%);
}

.admin-card {
  padding: 22px;
}

.login-card {
  width: min(420px, 100%);
  margin: 8vh auto 0;
}

.admin-title .brand-mark {
  color: #fff;
}

.admin-list-head {
  margin-top: 24px;
}

.collector-card {
  margin-top: 24px;
  padding-top: 2px;
}

.collector-head {
  align-items: flex-start;
}

.collector-head p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.ghost-button {
  min-height: 36px;
  padding: 0 14px;
  color: var(--blue-900);
  border: 1px solid var(--line);
  background: var(--cyan-050);
  border-radius: 10px;
}

.upload-form,
.collect-form,
.login-card form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.three-cols {
  grid-template-columns: 1fr 1fr 120px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(66, 201, 227, 0.16);
}

input[type="file"] {
  padding: 9px 12px;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--blue-900);
}

.collect-results {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.collect-item {
  display: grid;
  grid-template-columns: 138px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.collect-item.imported {
  border-color: #a9e996;
  background: #f6fff2;
}

.collect-item img {
  width: 138px;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--cyan-100);
}

.collect-info {
  min-width: 0;
}

.collect-info h3 {
  margin: 0 0 6px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collect-info p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.collect-info a {
  color: var(--blue-800);
  font-weight: 800;
}

.collect-item button {
  min-width: 82px;
  min-height: 36px;
  color: #fff;
  background: linear-gradient(180deg, #62dbe9, #28b8d7);
  border-radius: 10px;
  font-weight: 900;
}

.collect-item button:disabled {
  cursor: default;
  opacity: 0.72;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-item {
  display: grid;
  grid-template-columns: 124px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.admin-item img {
  width: 124px;
  height: 78px;
  object-fit: cover;
  border-radius: 8px;
}

.admin-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.admin-item p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-actions {
  display: flex;
  gap: 8px;
}

.admin-actions button {
  min-width: 72px;
  min-height: 34px;
  color: var(--blue-900);
  background: var(--cyan-100);
  border-radius: 10px;
}

.admin-actions button.danger {
  color: #b04b56;
  background: #fff4f5;
}

@media (max-width: 980px) {
  .nav {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 0;
  }

  .main-menu,
  .search {
    width: 100%;
  }

  .main-menu {
    overflow: visible;
    flex-wrap: wrap;
  }

  .nav-menu-item {
    height: 42px;
  }

  .nav-dropdown {
    left: 0;
    transform: translate(0, 10px);
  }

  .nav-dropdown::before {
    left: 36px;
  }

  .nav-menu-item:hover .nav-dropdown,
  .nav-menu-item:focus-within .nav-dropdown {
    transform: translate(0, 0);
  }

  .hero-grid,
  .feature-layout {
    grid-template-columns: 1fr;
  }

  .gallery-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .gallery-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-image-button,
  .hero-image-button img {
    min-height: 300px;
    height: 300px;
  }

  .hero-label,
  .hero-title,
  .hero-info {
    left: 17px;
    right: 17px;
  }

  .hero-title {
    bottom: 58px;
  }

  .hero-info {
    bottom: 25px;
  }

  .hero-dots {
    right: 17px;
    bottom: 18px;
  }

  .hero-nav {
    width: 34px;
    height: 42px;
    border-radius: 10px;
    font-size: 28px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .back-to-top {
    right: 14px;
    bottom: 18px;
    min-width: 64px;
    height: 38px;
    padding: 0 12px;
    font-size: 13px;
  }

  .empty,
  .modal-meta,
  .footer,
  .admin-top,
  .admin-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .form-row,
  .three-cols,
  .admin-item {
    grid-template-columns: 1fr;
  }

  .admin-item img {
    width: 100%;
    height: 180px;
  }

  .collect-item {
    grid-template-columns: 1fr;
  }

  .collect-item img {
    width: 100%;
    height: 190px;
  }
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 18px, 1180px);
  }

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

  .hot-list {
    grid-template-columns: 1fr;
  }
}
