﻿:root {
  color-scheme: dark;
  --bg: #05070d;
  --panel: rgba(13, 19, 32, 0.88);
  --panel-strong: rgba(17, 24, 39, 0.96);
  --text: #f4f7fb;
  --muted: rgba(244, 247, 251, 0.68);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #7dd3fc;
  --accent-2: #60a5fa;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 12%, rgba(96, 165, 250, 0.18), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(125, 211, 252, 0.1), transparent 24%),
    linear-gradient(180deg, #05070d 0%, #090d18 100%);
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.35;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 14px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 6px 0 18px;
}
.topbar__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.topbar__eyebrow, .hero__tag, .section__head span, .work-card__tag, .work-card__link-state, .admin-item__tag {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.topbar__link {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.site-banner {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 33 / 14;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(5, 7, 13, 0.02), rgba(5, 7, 13, 0.18)),
    url("./assets/banners/SHINE网站Banner.jpg") center / cover no-repeat;
  box-shadow: var(--shadow);
  overflow: hidden;
  min-height: clamp(180px, 32vw, 340px);
}
.site-banner[aria-disabled="true"] {
  cursor: default;
}
.site-banner__track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 520ms ease;
}
.site-banner__slide {
  flex: 0 0 100%;
  width: 100%;
  min-height: 100%;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.site-banner__dots {
  position: absolute;
  left: 50%;
  bottom: 14px;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  z-index: 2;
}
.site-banner__dot {
  width: 8px;
  height: 8px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: rgba(255, 255, 255, 0.42);
}
.site-banner__dot.is-active {
  width: 22px;
  background: #7dd3fc;
}
.site-banner__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(5, 7, 13, 0.42);
  color: #fff;
  font-size: 34px;
  line-height: 1;
  transform: translateY(-50%);
  backdrop-filter: blur(10px);
}
.site-banner__nav--prev { left: 12px; }
.site-banner__nav--next { right: 12px; }
.site-banner__nav:active {
  transform: translateY(-50%) scale(0.96);
}

.hero, .admin-card, .admin-form, .work-card, .admin-item, .section {
  border: 1px solid var(--line);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.hero, .admin-card {
  border-radius: 28px;
  padding: 22px 18px 20px;
}
.hero--compact {
  padding: 20px 18px;
}
.hero h2, .admin-card h2 {
  margin: 10px 0 0;
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.hero__desc {
  margin: 12px 0 0;
  line-height: 1.75;
  color: var(--muted);
  white-space: pre-line;
}
.hero__actions, .admin-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 13px 16px;
  min-height: 46px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn--primary { background: linear-gradient(135deg, #dbeafe, #7dd3fc); color: #09111f; }
.btn--ghost { background: rgba(255, 255, 255, 0.04); color: var(--text); border-color: var(--line); }
.btn--danger { background: rgba(239, 68, 68, 0.12); color: #fecaca; border-color: rgba(239, 68, 68, 0.28); }

.section {
  margin-top: 18px;
  border-radius: 26px;
  padding: 18px;
  background: var(--panel-strong);
}
.section__head--form { margin-bottom: 8px; }
.section__head__kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.portfolio-section {
  margin-top: 14px;
}
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-bottom: 14px;
}
.section__head h3 { margin: 4px 0 0; font-size: 22px; letter-spacing: -0.03em; }

.work-list, .admin-list { display: grid; gap: 14px; }
.work-card { overflow: hidden; border-radius: 24px; }
.work-card__media {
  position: relative;
  min-height: 220px;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.96));
  cursor: pointer;
}
.work-card__poster {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.85);
}
.work-card__poster .poster-label {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(8px);
}
.work-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  padding: 16px;
  background: linear-gradient(180deg, rgba(5, 7, 13, 0.06), rgba(5, 7, 13, 0.62));
}
.work-card__body { padding: 16px; }
.work-card__meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.work-card h3, .admin-item h4 { margin: 10px 0 0; font-size: 20px; letter-spacing: -0.03em; }
.work-card__desc, .admin-item__desc, .hero__desc, .admin-card p, .player-desc { margin: 10px 0 0; line-height: 1.75; color: var(--muted); }

.admin-form {
  border-radius: 26px;
  padding: 18px;
  display: grid;
  gap: 12px;
}
.admin-form label { display: grid; gap: 8px; color: var(--muted); font-size: 14px; }
.admin-form--text-settings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.admin-form--text-settings .btn {
  grid-column: 1 / -1;
  justify-self: start;
}
.text-setting-group {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.admin-form input, .admin-form textarea, .admin-form select, .modal input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 13px 14px;
  font: inherit;
  outline: none;
}
.admin-form textarea { resize: vertical; }
.inline-grid { grid-template-columns: auto 1fr; align-items: center; }
.setting-card {
  margin-top: 18px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.setting-card__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.setting-card__toggle strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}
.setting-card__state {
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}
.setting-card .collapsible {
  padding: 0 18px 18px;
}
.setting-card.is-open .setting-card__state {
  color: rgba(244, 247, 251, 0.7);
}
.admin-item {
  border-radius: 22px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: grab;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.admin-item:active { cursor: grabbing; }
.admin-item.is-dragging {
  opacity: 0.48;
  transform: scale(0.98);
  border-color: rgba(125, 211, 252, 0.42);
}
.admin-item__content { display: grid; gap: 0; }
.admin-item__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-drag-handle {
  align-self: flex-start;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  color: rgba(244, 247, 251, 0.78);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 7px 10px;
  cursor: grab;
}
.admin-list--saving::before {
  content: "姝ｅ湪淇濆瓨鎺掑簭...";
  display: block;
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 8px;
}

.banner-preview {
  min-height: 160px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}
.banner-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.banner-editor__guide {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(212, 175, 55, 0.28);
  border-radius: 14px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.banner-editor__guide strong {
  color: var(--gold);
  font-size: 13px;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: rgba(232, 234, 240, 0.56);
  font-size: 12px;
  line-height: 1.5;
}

.banner-editor__item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  cursor: grab;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.banner-editor__item:active {
  cursor: grabbing;
}
.banner-editor__item.is-dragging {
  opacity: 0.48;
  transform: scale(0.98);
  border-color: rgba(125, 211, 252, 0.42);
}
.banner-editor__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.banner-editor__delete {
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  padding: 8px 12px;
}
.banner-editor__drag {
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.08);
  color: rgba(244, 247, 251, 0.78);
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
  cursor: grab;
}
.banner-editor__thumb {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04) center / cover no-repeat;
}

@media (max-width: 980px) {
  .admin-form--text-settings,
  .banner-editor {
    grid-template-columns: 1fr;
  }
}

.setting-card .admin-form {
  margin-top: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0 18px 18px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 22px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}
.hidden { display: none !important; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(3, 6, 15, 0.7);
  padding: 16px;
}
.modal__card {
  width: min(100%, 460px);
  border-radius: 28px;
  padding: 20px;
  background: rgba(10, 15, 27, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.modal__card--player {
  width: min(100%, 760px);
  padding: 0;
  overflow: hidden;
}
.modal__card h2 { margin: 10px 0 0; font-size: 26px; letter-spacing: -0.03em; }
.modal__actions, .modal__player-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.modal__player-head {
  padding: 14px 16px 16px;
}
.modal__player-head h2 {
  margin: 0;
}
.modal__actions { margin-top: 16px; }
.modal__close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 999px;
  min-height: 40px;
  padding: 0 14px;
}
.player-frame {
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  background: #000;
  border: 0;
}
.player-frame iframe,
.player-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.embed-preview {
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.34);
}
.embed-preview iframe,
.embed-preview video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}
.embed-preview__empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  padding: 16px;
  text-align: center;
}
.poster-tile {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: end start;
  padding: 16px;
  color: #fff;
}
.poster-tile span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

@media (min-width: 780px) {
  .app-shell { padding-left: 24px; padding-right: 24px; }
  .hero, .admin-card { padding: 28px 24px 24px; }
  .work-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.setting-card {
  margin-top: 18px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.setting-card__toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 18px 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}
.setting-card__toggle strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}
.setting-card__state {
  color: var(--accent);
  font-size: 13px;
  white-space: nowrap;
}
.setting-card .collapsible {
  padding: 0 18px 18px;
}
.setting-card .admin-form {
  margin-top: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0 18px 18px;
}
.section__head__kicker {
  display: block;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
