@font-face {
  font-family: "OPPOSans";
  src: url("./public/assets/OPPOSans-R.ttf") format("truetype");
  font-weight: 400;
}

@font-face {
  font-family: "OPPOSans";
  src: url("./public/assets/OPPOSans-M.ttf") format("truetype");
  font-weight: 500;
}

@font-face {
  font-family: "OPPOSans";
  src: url("./public/assets/OPPOSans-B.ttf") format("truetype");
  font-weight: 700;
}

:root {
  --brand: #327dff;
  --text: #1a1a1a;
  --muted: rgba(26, 26, 26, 0.6);
  --line: rgba(26, 26, 26, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 1200px;
  margin: 0;
  overflow-x: auto;
  background: #fff;
  color: var(--text);
  font-family: "OPPOSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button,
input {
  font: inherit;
}

.site-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 310px 1fr 160px;
  align-items: center;
  height: 56px;
  padding: 0 24px 0 25px;
  border-bottom: 1px solid #e5e5e5;
  background: #fff;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  background: #fff;
}

.brand img {
  width: 24px;
  height: 27px;
  object-fit: contain;
}

.brand strong {
  margin-left: 5px;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.tagline {
  margin-left: 24px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 56px;
  height: 100%;
  font-size: 18px;
  font-weight: 500;
}

.main-nav a {
  position: relative;
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.main-nav a.active {
  color: var(--brand);
}

.main-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 24px;
}

.header-actions button {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.header-actions img {
  width: 24px;
  height: 24px;
}

.page-shell {
  display: grid;
  grid-template-columns: 1254px 486px;
  grid-template-rows: 289px 165px 370px;
  gap: 20px;
  width: 1760px;
  margin: 20px auto;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-copy {
  position: relative;
  z-index: 1;
  width: 540px;
  padding: 30px 40px;
}

.hero-copy h1 {
  margin: 0 0 14px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-subtitle {
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.4;
}

.hero-subtitle span {
  color: var(--brand);
}

.hero-desc {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 24px;
  white-space: nowrap;
}

.search-form {
  display: flex;
  width: 500px;
  height: 50px;
  overflow: hidden;
  border: 1px solid rgba(196, 199, 205, 0.7);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
}

.search-form input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 18px;
  background: transparent;
}

.search-form button {
  display: grid;
  width: 52px;
  place-items: center;
  border: 0;
  background: var(--brand);
  cursor: pointer;
}

.search-form img {
  width: 20px;
  height: 20px;
}

.hot-searches {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.hot-searches button {
  height: 24px;
  border: 0;
  border-radius: 36px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  cursor: pointer;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.panel h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.panel-head,
.section-tabs {
  display: flex;
  align-items: center;
}

.panel-head {
  justify-content: space-between;
  padding: 20px 20px 0;
}

.panel-head a,
.section-tabs a {
  color: var(--muted);
  font-size: 14px;
}

.panel-head a::after,
.section-tabs a::after {
  content: "  →";
}

.template-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 138px);
  gap: 20px 16px;
  padding: 16px 20px 20px;
}

.template-card img {
  display: block;
  width: 138px;
  height: 93px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 4px;
  object-fit: cover;
}

.template-card b {
  display: block;
  width: 138px;
  margin-top: 10px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.explore-panel {
  grid-column: 1;
  padding: 17px 20px 20px;
}

.explore-grid {
  display: grid;
  grid-template-columns: repeat(5, 230px);
  gap: 16px;
  margin-top: 12px;
}

.explore-card {
  display: grid;
  width: 230px;
  height: 94px;
  grid-template-columns: 76px 1fr;
  align-content: center;
  border: 1px solid rgba(26, 26, 26, 0.04);
  border-radius: 8px;
  background: var(--card-bg);
}

.explore-icon {
  grid-row: 1 / span 3;
  width: 56px;
  height: 56px;
  align-self: center;
  justify-self: center;
}

.explore-card strong {
  color: var(--tone);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.explore-card b,
.explore-card small {
  font-size: 14px;
  line-height: 22px;
}

.explore-card b {
  font-weight: 500;
}

.explore-card small {
  color: var(--muted);
}

.tools-panel {
  grid-column: 1;
  padding: 17px 20px 20px;
}

.section-tabs {
  gap: 32px;
}

.section-tabs button {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.section-tabs button.active {
  color: var(--brand);
}

.section-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -8px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
}

.section-tabs a {
  margin-left: auto;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, 230px);
  gap: 16px;
  margin-top: 20px;
}

.tool-card {
  position: relative;
  width: 230px;
  height: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.tool-icon {
  position: absolute;
  top: 18px;
  left: 16px;
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.tool-card h3,
.tool-subtitle {
  margin-left: 50px;
}

.tool-card h3 {
  margin-top: 0;
  margin-bottom: 4px;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-subtitle {
  margin-top: 0;
  margin-bottom: 10px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-desc {
  display: -webkit-box;
  height: 36px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  line-height: 18px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tool-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.rating,
.tool-meta a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.rating img {
  width: 12px;
  height: 12px;
}

.tool-meta a img {
  width: 16px;
  height: 16px;
}

.article-panel {
  grid-column: 2;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding: 16px 20px 20px;
}

.article-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 0 18px;
  height: 54px;
}

.article-thumb {
  grid-row: 1 / span 2;
  width: 96px;
  height: 54px;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 4px;
  object-fit: cover;
}

.article-item strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-tags {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
}

.article-tags small {
  border-radius: 4px;
  padding: 0 8px;
  background: rgba(26, 26, 26, 0.04);
  font-size: 12px;
  font-style: normal;
}

.article-tags em {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-style: normal;
}

.article-tags em img {
  width: 16px;
  height: 16px;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  height: 138px;
  place-items: center;
  border: 1px dashed rgba(50, 125, 255, 0.28);
  border-radius: 8px;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  transform: translateY(16px);
  border-radius: 8px;
  padding: 12px 16px;
  background: rgba(26, 26, 26, 0.88);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1600px) {
  body {
    min-width: 0;
  }

  .page-shell {
    transform: scale(calc((100vw - 32px) / 1760));
    transform-origin: top center;
    margin-bottom: calc((20px + 844px) * ((100vw - 32px) / 1760) - 844px);
  }
}
