/* 素材中心 — Liquid Glass */
body.materials-page { min-height: 100vh; }
.materials-page .bg-orbs { opacity: .78; }
.materials-main { padding: 132px 0 96px; }
.materials-shell { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.materials-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,.72);
  background: linear-gradient(145deg, rgba(255,255,255,.58), rgba(255,255,255,.28));
  box-shadow: inset 0 1px 0 #fff, 0 24px 60px -28px rgba(40,60,120,.28);
}
.materials-eyebrow {
  margin: 0 0 10px;
  color: oklch(0.55 0.16 245);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
}
.materials-header h1 {
  margin: 0;
  color: oklch(0.22 0.025 260);
  font-size: 36px;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -.03em;
}
.materials-header p:not(.materials-eyebrow) {
  max-width: 650px;
  margin: 12px 0 0;
  color: oklch(0.48 0.025 260);
  font-size: 15px;
  line-height: 1.75;
}
.materials-count {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 14px 18px;
  border-radius: 20px;
  color: oklch(0.55 0.02 260);
  white-space: nowrap;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 #fff;
}
.materials-count strong {
  color: oklch(0.5 0.16 245);
  font-size: 34px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.materials-count span { font-size: 13px; }

.materials-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 28px 0 22px;
}
.material-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.material-filter {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  color: oklch(0.48 0.025 260);
  background: rgba(255,255,255,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  font-size: 13px;
  font-weight: 600;
  transition: all .28s cubic-bezier(.22,1,.36,1);
}
.material-filter:hover {
  color: oklch(0.22 0.025 260);
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.7);
}
.material-filter.active {
  color: #fff;
  border-color: rgba(255,255,255,.28);
  background: linear-gradient(135deg, oklch(0.58 0.17 245), oklch(0.56 0.18 285));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 12px 28px -12px oklch(0.55 0.18 270 / .55);
}
.materials-tip {
  margin: 0;
  color: oklch(0.58 0.02 260);
  font-size: 12px;
  white-space: nowrap;
}

.material-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.material-card {
  overflow: hidden;
  border-radius: 26px !important;
  transition: transform .4s cubic-bezier(.22,1,.36,1), box-shadow .4s ease;
}
.material-card:hover {
  transform: translateY(-6px);
  box-shadow: inset 0 1px 0 #fff, 0 32px 72px -28px rgba(40,60,120,.4) !important;
}
.material-preview {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(232,242,255,.9), rgba(245,250,255,.75));
}
.material-preview img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform .5s cubic-bezier(.22,1,.36,1);
}
.material-card:hover .material-preview img { transform: scale(1.04); }
.preview-label {
  position: absolute;
  inset: auto 12px 12px auto;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: rgba(24,36,58,.72);
  border: 1px solid rgba(255,255,255,.2);
  font-size: 11px;
  opacity: 0;
  transform: translateY(6px);
  transition: all .28s ease;
}
.material-card:hover .preview-label,
.material-preview:focus-visible .preview-label {
  opacity: 1;
  transform: translateY(0);
}
.material-card-body { padding: 16px 16px 18px; }
.material-card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.material-category {
  color: oklch(0.52 0.16 245);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.material-card h2 {
  margin: 5px 0 0;
  color: oklch(0.22 0.025 260);
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.material-format {
  padding: 4px 8px;
  border-radius: 999px;
  color: oklch(0.48 0.03 250);
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(255,255,255,.65);
  font-size: 10px;
  font-weight: 700;
}
.material-card-body p {
  min-height: 44px;
  margin: 10px 0 15px;
  color: oklch(0.48 0.025 260);
  font-size: 12px;
  line-height: 1.7;
}
.material-actions { display: flex; gap: 8px; }
.material-download,
.material-preview-link {
  flex: 1;
  min-height: 40px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  transition: all .25s ease;
}
.material-download {
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, oklch(0.58 0.17 245), oklch(0.56 0.18 285));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 10px 22px -12px oklch(0.55 0.18 270 / .5);
}
.material-download:hover { filter: brightness(1.06); transform: translateY(-1px); }
.material-download:disabled { cursor: wait; opacity: .7; transform: none; }
.material-preview-link {
  color: oklch(0.32 0.03 260);
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: inset 0 1px 0 #fff;
}
.material-preview-link:hover { background: rgba(255,255,255,.75); }

.material-modal[hidden] { display: none; }
.material-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 36, .62);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 28px;
  border: 1px solid rgba(220, 230, 245, .95);
  border-radius: 28px;
  background: linear-gradient(160deg, #ffffff 0%, #f7fbff 55%, #f3f7fc 100%);
  box-shadow: inset 0 1px 0 #fff, 0 28px 70px -20px rgba(16, 28, 52, .55);
  animation: modalIn .32s cubic-bezier(.22,1,.36,1);
}
.modal-panel h2 {
  margin: 0 0 16px;
  color: oklch(0.22 0.025 260);
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -.02em;
}
.modal-panel img {
  width: 100%;
  max-height: 58vh;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(235,243,255,.7);
}
.modal-specs {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(40,60,120,.08);
}
.modal-specs h3 {
  margin: 0 0 12px;
  color: oklch(0.28 0.03 260);
  font-size: 14px;
  font-weight: 650;
}
.modal-specs dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.modal-specs dl > div {
  min-width: 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.5);
  border: 1px solid rgba(255,255,255,.65);
}
.modal-specs dt { margin: 0 0 4px; color: oklch(0.58 0.02 260); font-size: 10px; }
.modal-specs dd { margin: 0; color: oklch(0.32 0.03 260); font-size: 12px; font-weight: 600; line-height: 1.5; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: oklch(0.42 0.03 260);
  font-size: 24px;
  line-height: 1;
  background: #f0f4fa;
  border: 1px solid rgba(210, 222, 238, .95);
}
.modal-close:hover { background: #e8eef6; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.material-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 120;
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(24,36,58,.82);
  border: 1px solid rgba(255,255,255,.15);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: all .25s ease;
}
.material-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 980px) { .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
  .materials-main { padding-top: 108px; }
  .materials-header { align-items: flex-start; flex-direction: column; padding: 22px; }
  .materials-header h1 { font-size: 28px; }
  .materials-toolbar { align-items: flex-start; flex-direction: column; }
  .materials-tip { white-space: normal; }
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .material-card-body { padding: 12px; }
  .material-card h2 { font-size: 15px; }
  .material-card-body p { min-height: 60px; font-size: 11px; }
  .material-actions { flex-direction: column; gap: 6px; }
}
@media (max-width: 420px) {
  .material-grid { grid-template-columns: 1fr; }
  .material-card-body p { min-height: auto; }
  .material-actions { flex-direction: row; }
}
@media (max-width: 520px) {
  .material-modal { padding: 10px; }
  .modal-panel { max-height: calc(100vh - 20px); padding: 20px 14px; }
  .modal-specs dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .material-card, .material-preview img, .material-toast, .modal-panel {
    transition: none;
    animation: none;
  }
}
