:root {
  --bg: #121417;
  --panel: #202429;
  --panel-soft: #2a2f35;
  --text: #f5f6f7;
  --muted: #aeb5bf;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #ff4054;
  --blue: #2d8dff;
  --green: #3fc17b;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

button,
input {
  font: inherit;
}

[v-cloak] {
  display: none;
}

.topbar,
.admin-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: rgba(32, 36, 41, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #111;
  font-weight: 900;
  background: linear-gradient(135deg, #fdff62, #ff4054 48%, #2d8dff);
  border-radius: 10px;
}

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

.brand small,
.section-heading span,
.site-card small,
.hint {
  color: var(--muted);
}

.top-actions,
.admin-header nav,
.form-actions,
.review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-actions a,
.top-actions button,
.solid-link,
.admin-header a,
.review-actions button,
.auth-card button,
.bookmark-form button {
  border: 0;
  color: var(--text);
  background: transparent;
  cursor: pointer;
}

.solid-link,
.search-panel button,
.auth-card button,
.bookmark-form button[type="submit"],
.review-actions form:first-child button {
  padding: 10px 16px;
  background: var(--accent);
  border-radius: 8px;
}

.hero {
  max-width: 900px;
  margin: 88px auto 72px;
  padding: 0 24px;
  text-align: center;
}

.classic-search {
  min-height: var(--search-pc);
  display: grid;
  place-items: center;
  padding: 42px 24px;
}

.search-inner {
  width: min(860px, 100%);
  text-align: center;
}

.search-inner h1 {
  margin: 0 0 24px;
  font-size: clamp(34px, 5vw, 58px);
}

.classic-search input {
  width: 100%;
  padding: 18px 22px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  box-shadow: var(--shadow);
}

.search-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  gap: 10px;
  width: min(520px, 100%);
  margin: 14px auto 0;
}

.search-buttons button,
.more-link {
  padding: 10px 14px;
  color: var(--text);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.classic-shell {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 20px;
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto 48px;
}

.classic-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 12px;
  background: var(--panel);
  border-radius: 8px;
}

.classic-sidebar details {
  margin-top: 8px;
}

.classic-sidebar summary {
  padding: 10px 12px;
  cursor: pointer;
  color: var(--text);
}

.classic-sidebar details a {
  display: block;
  padding: 8px 12px 8px 26px;
  color: var(--muted);
}

.classic-content {
  display: grid;
  gap: 22px;
}

.hot-panel,
.category-block,
.footer-links,
.category-detail {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.category-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.category-title-row h2 {
  margin: 0;
  font-size: 24px;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.category-tabs button {
  padding: 7px 12px;
  color: var(--muted);
  background: var(--panel-soft);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.category-tabs button.active {
  color: var(--text);
  background: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.compact-grid {
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
}

.more-link {
  display: inline-flex;
  margin-top: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
}

.footer-links a {
  color: var(--muted);
}

.site-footer {
  padding: 24px;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
}

.avatar-link {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--accent);
  border-radius: 50%;
  font-weight: 800;
}

.category-detail {
  width: min(1180px, calc(100% - 48px));
  margin: 42px auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 28px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
}

.search-panel {
  display: grid;
  grid-template-columns: 1fr 112px;
  max-width: 760px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.search-panel input {
  min-width: 0;
  padding: 18px 22px;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
}

.search-panel button {
  border-radius: 0;
}

.layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 20px;
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto 80px;
}

.submit-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 48px));
  margin: -34px auto 34px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.submit-box strong,
.submit-box span {
  display: block;
}

.submit-box span {
  margin-top: 4px;
  color: var(--muted);
}

.submit-box form {
  display: grid;
  grid-template-columns: 140px 220px 220px 84px;
  gap: 10px;
}

.submit-box input {
  min-width: 0;
  padding: 10px 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.submit-box button {
  color: var(--text);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  padding: 12px;
  background: var(--panel);
  border-radius: 8px;
}

.side-item {
  display: block;
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 6px;
}

.side-item.active,
.side-item:hover {
  color: var(--text);
  background: var(--panel-soft);
}

.content {
  display: grid;
  gap: 24px;
}

.site-section {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-size: 22px;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.site-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid transparent;
  border-radius: 8px;
}

.site-card:hover {
  border-color: rgba(255, 64, 84, 0.45);
  transform: translateY(-1px);
}

.site-icon,
.bookmark-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--green));
}

.site-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.site-icon img,
.bookmark-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-card strong,
.site-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-page {
  background:
    radial-gradient(circle at 20% 18%, rgba(63, 193, 123, 0.28), transparent 34%),
    radial-gradient(circle at 76% 28%, rgba(45, 141, 255, 0.36), transparent 36%),
    linear-gradient(135deg, #10291d, #0f8ca0 70%);
}

.bookmark-shell {
  min-height: 100vh;
  padding-left: 78px;
}

.dock {
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 72px;
  padding-top: 42px;
  background: rgba(7, 21, 18, 0.52);
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.dock a,
.dock button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.bookmark-main {
  width: min(1440px, calc(100% - 48px));
  margin: 0 auto;
  padding: 72px 0 96px;
}

.clock-card {
  text-align: center;
}

.clock {
  font-size: clamp(52px, 8vw, 96px);
  line-height: 1;
  font-weight: 300;
}

.date {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.78);
}

.bookmark-search {
  display: grid;
  grid-template-columns: 1fr 96px;
  width: min(760px, 100%);
  margin: 34px auto 48px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 28px;
}

.bookmark-search input {
  min-width: 0;
  padding: 16px 22px;
  color: #25282d;
  background: transparent;
  border: 0;
  outline: 0;
}

.bookmark-search button {
  color: #25282d;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.widget-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.widget,
.empty-state {
  padding: 22px;
  color: #172026;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 8px;
}

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

.bookmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 28px 22px;
}

.bookmark-tile {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
}

.bookmark-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
}

.bookmark-tile strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.bookmark-tile button {
  position: absolute;
  top: -6px;
  right: 12px;
  display: none;
  width: 24px;
  height: 24px;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.bookmark-tile:hover button {
  display: block;
}

.modal-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.54);
}

.bookmark-form,
.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.bookmark-form h2,
.auth-card h1 {
  margin-top: 0;
}

.bookmark-form label,
.auth-card label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.bookmark-form input,
.auth-card input {
  width: 100%;
  padding: 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
}

.auth-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.back-link {
  color: var(--muted);
}

.error-text {
  padding: 10px 12px;
  color: #fff;
  background: rgba(255, 64, 84, 0.18);
  border: 1px solid rgba(255, 64, 84, 0.36);
  border-radius: 8px;
}

.admin-main {
  width: min(1120px, calc(100% - 48px));
  margin: 40px auto;
}

.admin-forms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.admin-forms form {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-forms h2 {
  margin-top: 0;
}

.admin-forms label {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.admin-forms input,
.admin-forms select {
  width: 100%;
  padding: 11px 12px;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-forms button,
.review-card > form button {
  padding: 10px 16px;
  color: var(--text);
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.stat-grid article,
.review-card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.stat-grid strong {
  display: block;
  font-size: 44px;
}

.stat-grid span {
  color: var(--muted);
}

.review-list {
  display: grid;
  gap: 14px;
}

.review-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.review-card a,
.review-card small {
  display: block;
  color: var(--muted);
}

@media (max-width: 760px) {
  .topbar,
  .section-heading,
  .review-card {
    align-items: stretch;
    flex-direction: column;
  }

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

  .classic-search {
    min-height: var(--search-mobile);
  }

  .classic-shell {
    grid-template-columns: 1fr;
  }

  .classic-sidebar {
    position: static;
  }

  .category-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submit-box {
    align-items: stretch;
    flex-direction: column;
  }

  .submit-box form {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .search-panel,
  .bookmark-search {
    grid-template-columns: 1fr;
  }

  .bookmark-shell {
    padding-left: 0;
    padding-bottom: 72px;
  }

  .dock {
    inset: auto 0 0 0;
    flex-direction: row;
    justify-content: center;
    width: auto;
    height: 64px;
    padding: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 0;
  }
}
