*,
*::before,
*::after { box-sizing: border-box; }

:root {
  --ink: #eef6ff;
  --muted: #8fa6bd;
  --deep: #071827;
  --panel: #0d2435;
  --panel-2: #12344a;
  --line: rgba(137, 179, 205, .18);
  --accent: #4aa3ff;
  --cyan: #26c6d1;
  --page: #e9f2fb;
}

html { background: var(--page); }

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(76, 132, 195, .16) 1px, transparent 1px) 0 0 / 92px 100%,
    linear-gradient(180deg, #e9f2fb 0, #dbe8f4 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }

.app-shell {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, #f2f7fd 0, #e6f0fa 360px, #dfeaf5 100%);
  box-shadow: 0 0 0 1px rgba(18, 52, 74, .08), 0 22px 70px rgba(7, 24, 39, .16);
}

.site-header {
  padding: 20px 22px 78px;
  background:
    radial-gradient(circle at 90% 18%, rgba(132, 184, 199, .36), transparent 28%),
    radial-gradient(circle at 75% 82%, rgba(29, 180, 169, .42), transparent 32%),
    linear-gradient(135deg, #061420 0%, #092c3d 52%, #0b807e 100%);
  color: #fff;
  border-radius: 0 0 34px 34px;
  box-shadow: 0 18px 42px rgba(7, 24, 39, .22);
}

.brand-row,
.brand,
.hero-domain,
.notice,
.tabs,
.wide-card,
.footer-links,
.poster-dots {
  display: flex;
  align-items: center;
}

.brand-row {
  justify-content: space-between;
  gap: 12px;
}

.brand { gap: 10px; min-width: 0; }

.avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #8fd3f4, #2dd4bf);
  color: #071827;
  font-weight: 900;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}

.brand small,
.brand strong { display: block; }

.brand small {
  color: rgba(255,255,255,.68);
  font-size: 14px;
  font-weight: 800;
}

.brand strong {
  font-size: 24px;
  line-height: 1.25;
}

.icon-btn {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
  color: #fff;
  background: rgba(255,255,255,.16);
  font-size: 24px;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

.hero-card {
  width: min(980px, 100%);
  margin: 54px auto 0;
  text-align: center;
}

.hero-card p {
  margin: 0;
  color: rgba(220,236,255,.76);
  font-size: 22px;
  font-weight: 900;
}

.hero-card h1 {
  margin: 12px 0 18px;
  font-size: clamp(36px, 8vw, 70px);
  line-height: 1.04;
  letter-spacing: 0;
}

.hero-domain {
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 26px;
  border-radius: 999px;
  background: rgba(198, 226, 241, .2);
  color: #dcecff;
  font-size: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}

.notice {
  justify-content: center;
  gap: 14px;
  width: 100%;
  margin: 28px auto 0;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(162, 204, 219, .22);
}

.notice span {
  padding: 4px 12px;
  border-radius: 6px;
  background: #d7e7f6;
  color: #0d3041;
  font-size: 15px;
  font-weight: 900;
  flex-shrink: 0;
}

.notice p {
  color: rgba(255,255,255,.78);
  font-size: 17px;
  font-weight: 900;
}

.workspace {
  width: min(100%, calc(100% - 44px));
  margin: -66px auto 0;
}

.poster-slider {
  position: relative;
  overflow: hidden;
  border: 18px solid #061420;
  border-radius: 24px;
  background: #061420;
  box-shadow: 0 22px 50px rgba(7, 24, 39, .28);
}

.poster-track {
  display: flex;
  transition: transform .42s ease;
}

.poster-slide {
  position: relative;
  min-width: 100%;
  aspect-ratio: 16 / 6.4;
  overflow: hidden;
  background: #071827;
}

.poster-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}

.poster-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7,24,39,.68), rgba(7,24,39,.12) 55%, rgba(7,24,39,.05));
  pointer-events: none;
}

.poster-caption {
  position: absolute;
  left: clamp(18px, 5vw, 54px);
  bottom: clamp(18px, 5vw, 42px);
  z-index: 1;
  max-width: 52%;
}

.poster-caption span,
.card-kicker {
  color: #8fd3f4;
  font-size: 12px;
  font-weight: 900;
}

.poster-caption strong {
  display: block;
  margin-top: 6px;
  font-size: clamp(24px, 6vw, 58px);
  line-height: 1.05;
}

.poster-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16px;
  justify-content: center;
  gap: 8px;
  z-index: 2;
}

.poster-dots button {
  width: 28px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.38);
  cursor: pointer;
}

.poster-dots button.active {
  background: #dcecff;
}

.search-bar {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 0 24px;
  border: 1px solid rgba(21, 65, 88, .16);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 12px 28px rgba(7,24,39,.08);
}

.search-bar span {
  color: #587188;
  font-size: 22px;
}

.search-bar input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #102033;
  background: transparent;
  font-size: 22px;
  font-weight: 700;
}

.tabs {
  gap: 18px;
  margin: 20px 0;
  padding: 12px;
  overflow-x: auto;
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 10px 28px rgba(7,24,39,.07);
}

.tabs button {
  min-width: max-content;
  border: 0;
  border-radius: 10px;
  padding: 14px 18px;
  background: transparent;
  color: #52677d;
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
}

.tabs button.active {
  color: #fff;
  background: #071827;
}

.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px 18px;
  padding: 32px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.95);
  box-shadow: 0 12px 30px rgba(7,24,39,.08);
}

.nav-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-radius: 10px;
  color: #16283b;
  transition: background .2s ease, transform .2s ease;
}

.nav-item:hover {
  background: #eaf3fb;
  transform: translateY(-2px);
}

.nav-icon {
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(74, 163, 255, .22);
  border-radius: 16px;
  color: #dcecff;
  background:
    radial-gradient(circle at 30% 18%, rgba(143,211,244,.18), transparent 36%),
    linear-gradient(145deg, #061420, #0e3a55);
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(7,24,39,.18);
}

.nav-name {
  max-width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #172033;
  font-size: 17px;
  font-weight: 900;
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.wide-card {
  justify-content: space-between;
  gap: 18px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(7,24,39,.08);
}

.wide-card h2,
.wide-card p { margin: 0; }

.wide-card h2 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.3;
}

.wide-card p {
  margin-top: 6px;
  color: rgba(238,246,255,.62);
  font-size: 14px;
  line-height: 1.6;
}

.wide-card.dark,
.wide-card.light {
  color: var(--ink);
  background: linear-gradient(135deg, #071827, #12344a);
}

.wide-card a {
  flex-shrink: 0;
  padding: 9px 14px;
  border: 1px solid rgba(143,211,244,.32);
  border-radius: 8px;
  background: rgba(143,211,244,.12);
  color: #dcecff;
  font-weight: 900;
}

.footer {
  width: min(1180px, calc(100% - 28px));
  margin: 28px auto 0;
  padding: 0 0 34px;
  color: #587188;
  text-align: center;
}

.footer-links {
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.footer-links a {
  padding: 7px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,.75);
  box-shadow: 0 8px 22px rgba(7,24,39,.06);
  font-size: 13px;
  font-weight: 800;
}

.admin-shell {
  min-height: 100vh;
  background: linear-gradient(180deg, #061420, #102f42 300px, #e5eff8 300px);
  color: var(--ink);
}

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

.admin-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 0 26px;
}

.admin-head h1 {
  margin: 0;
  font-size: 30px;
}

.admin-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-main {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 42px;
}

.admin-panel,
.admin-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(7,24,39,.98), rgba(18,52,74,.98));
  box-shadow: 0 18px 42px rgba(7,24,39,.18);
}

.admin-panel {
  padding: 18px;
  align-self: start;
}

.admin-list {
  padding: 18px;
}

.admin-panel h2,
.admin-list h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.field {
  margin-bottom: 12px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid rgba(143,211,244,.2);
  border-radius: 9px;
  padding: 11px 12px;
  color: var(--ink);
  background: rgba(255,255,255,.06);
  outline: 0;
}

.field textarea {
  min-height: 88px;
  resize: vertical;
}

.segmented {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.segmented button,
.primary-btn,
.secondary-btn,
.danger-btn {
  min-height: 40px;
  border: 1px solid rgba(143,211,244,.22);
  border-radius: 9px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 900;
}

.segmented button,
.secondary-btn {
  color: var(--ink);
  background: rgba(255,255,255,.07);
}

.segmented button.active,
.primary-btn {
  color: #061420;
  background: #8fd3f4;
}

.danger-btn {
  color: #fff;
  background: #8b2f44;
}

.form-actions,
.list-tools,
.item-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.list-tools {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.admin-items {
  display: grid;
  gap: 10px;
}

.admin-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(143,211,244,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.05);
}

.admin-thumb {
  width: 54px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  background: #071827;
}

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

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

.status-text {
  min-height: 20px;
  margin: 10px 0 0;
  color: #8fd3f4;
  font-size: 13px;
}

@media (min-width: 900px) {
  .app-shell {
    width: min(716px, calc(100% - 48px));
    margin: 48px auto 0;
    padding-bottom: 20px;
  }

  .site-header {
    padding: 22px 24px 112px;
    border-radius: 0 0 36px 36px;
  }

  .brand-row {
    width: 100%;
    margin: 0 auto;
  }

  .workspace {
    width: calc(100% - 44px);
    margin-top: -72px;
  }

  .icon-grid {
    grid-template-columns: repeat(4, 1fr);
    padding: 36px 18px;
  }

  .nav-icon {
    width: 84px;
    height: 84px;
  }
}

@media (max-width: 760px) {
  .admin-head,
  .admin-main {
    grid-template-columns: 1fr;
  }

  .admin-head {
    flex-direction: column;
  }

  .poster-caption {
    max-width: 68%;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 18px 18px 64px;
  }

  .avatar {
    width: 48px;
    height: 48px;
  }

  .brand small {
    font-size: 12px;
  }

  .brand strong {
    font-size: 19px;
  }

  .icon-btn {
    width: 48px;
    height: 48px;
  }

  .hero-card {
    margin-top: 42px;
  }

  .hero-card p {
    font-size: 17px;
  }

  .hero-domain {
    font-size: 17px;
  }

  .notice {
    padding: 14px 12px;
  }

  .notice p {
    font-size: 14px;
  }

  .workspace {
    width: calc(100% - 28px);
    margin-top: -42px;
  }

  .poster-slider {
    border-width: 12px;
    border-radius: 20px;
  }

  .poster-slide {
    aspect-ratio: 16 / 7.2;
  }

  .search-bar {
    height: 60px;
    padding: 0 18px;
  }

  .search-bar input {
    font-size: 17px;
  }

  .tabs {
    gap: 12px;
  }

  .tabs button {
    padding: 12px 14px;
    font-size: 16px;
  }

  .icon-grid {
    gap: 24px 12px;
    padding: 28px 12px;
  }

  .nav-icon {
    width: 64px;
    height: 64px;
    font-size: 18px;
  }

  .nav-name {
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  .cards { grid-template-columns: 1fr; }

  .wide-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-item {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .item-actions {
    grid-column: 1 / -1;
  }
}
