* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, "Microsoft YaHei", "PingFang SC", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color: #111;
  background: #fff;
}

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

.header {
  height: 68px;
  border-bottom: 1px solid #e8e8e8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #fff;
}

.logo {
  font-size: 20px;
  letter-spacing: .12em;
}

.nav a {
  font-size: 14px;
  color: #333;
}

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 28px 90px;
}

.login-box {
  max-width: 380px;
  margin: 90px auto;
  border: 1px solid #e8e8e8;
  padding: 36px;
}

h1 {
  font-size: 28px;
  font-weight: 400;
  letter-spacing: .04em;
  margin: 0 0 30px;
}

input[type=text],
input[type=password],
input[type=file] {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  margin: 8px 0 18px;
  font-size: 15px;
}

button,
.btn {
  display: inline-block;
  border: 1px solid #111;
  background: #111;
  color: #fff;
  padding: 11px 18px;
  font-size: 14px;
  cursor: pointer;
}

.btn-light {
  background: #fff;
  color: #111;
}

.form-box {
  border: 1px solid #e8e8e8;
  padding: 24px;
  margin-bottom: 38px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}

.card {
  display: block;
}

.thumb {
  aspect-ratio: 4 / 5;
  background: #f7f7f5;
  border: 1px solid #eee;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-title {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.6;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.image-card {
  border: 1px solid #eee;
  padding: 12px;
  background: #fff;
}

.image-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: #f7f7f5;
  cursor: pointer;
  display: block;
}

.image-card img:hover {
  opacity: .88;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.small {
  font-size: 12px;
  color: #777;
  word-break: break-all;
}

.top-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.notice {
  font-size: 14px;
  color: #777;
  line-height: 1.8;
}

/* 放大预览 */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  inset: 0;
  background: rgba(0,0,0,.88);
  align-items: center;
  justify-content: center;
}

.lightbox.show {
  display: flex;
}

.lightbox-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  background: #111;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  font-size: 34px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: 42px;
  color: #fff;
  background: rgba(255,255,255,.12);
  border: none;
  width: 58px;
  height: 78px;
  cursor: pointer;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 24px;
  text-align: center;
  color: #fff;
}

.lightbox-bottom a {
  display: inline-block;
  margin-top: 10px;
  border: 1px solid #fff;
  padding: 9px 18px;
  color: #fff;
  background: rgba(255,255,255,.08);
}

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

@media (max-width: 560px) {
  .header {
    padding: 0 16px;
  }

  .logo {
    font-size: 17px;
  }

  .wrap {
    padding: 28px 16px 70px;
  }

  .grid,
  .image-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  h1 {
    font-size: 22px;
  }

  button,
  .btn {
    padding: 9px 13px;
    font-size: 13px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 64px;
    font-size: 34px;
  }

  .lightbox-prev {
    left: 6px;
  }

  .lightbox-next {
    right: 6px;
  }
}
