@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600&family=Noto+Serif+SC:wght@600;700&display=swap");

:root {
  color-scheme: light;
  --ink: #1c1f23;
  --muted: #5c636c;
  --paper: #f6f1ea;
  --paper-strong: #efe4d5;
  --accent: #137f70;
  --accent-strong: #0d5f55;
  --highlight: #f4b07b;
  --line: #e3d6c7;
  --shadow: 0 24px 60px rgba(26, 33, 39, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft Yahei", sans-serif;
  color: var(--ink);
  background: radial-gradient(
        circle at top left,
        rgba(244, 176, 123, 0.35),
        transparent 45%
      ),
    radial-gradient(
        circle at 85% 15%,
        rgba(19, 127, 112, 0.18),
        transparent 50%
      ),
    var(--paper);
  min-height: 100vh;
}

h1,
h2,
h3 {
  font-family: "Noto Serif SC", "Songti SC", serif;
  margin: 0 0 8px;
}

p {
  margin: 0;
}

.app {
  max-width: 1120px;
  margin: 0 auto;
  padding: 28px 20px 90px;
}

.hero {
  position: relative;
  padding: 32px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #fef6ec 0%, #f4eadc 40%, #efe7df 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: riseIn 0.8s ease both;
}

.hero-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 2;
}

.hero-glow {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 320px;
  height: 320px;
  background: radial-gradient(
    circle at center,
    rgba(19, 127, 112, 0.28),
    transparent 70%
  );
  opacity: 0.8;
  pointer-events: none;
}

.brand {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), #2fb39c);
  color: #fff;
  display: grid;
  place-items: center;
  font-family: "Noto Serif SC", serif;
  font-size: 28px;
  box-shadow: 0 12px 24px rgba(19, 127, 112, 0.22);
}

.brand-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: var(--accent-strong);
  font-weight: 600;
  margin-bottom: 6px;
}

.brand-sub {
  color: var(--muted);
  max-width: 420px;
  line-height: 1.6;
}

.meta-line {
  margin-top: 12px;
  display: flex;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}

.meta-label {
  background: rgba(19, 127, 112, 0.12);
  color: var(--accent-strong);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(19, 127, 112, 0.14);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 14px;
}

.status-pill.offline {
  background: rgba(224, 122, 95, 0.2);
  color: #b0452f;
}

button {
  border: none;
  font: inherit;
  cursor: pointer;
}

.ghost {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-strong);
  border: 1px solid rgba(19, 127, 112, 0.18);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ghost:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(19, 127, 112, 0.12);
}

.ghost.small {
  padding: 6px 14px;
  font-size: 13px;
}

main {
  margin-top: 26px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

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

.tab {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s ease;
}

.tab.active {
  background: var(--accent);
  color: #fff;
  border-color: rgba(19, 127, 112, 0.2);
  box-shadow: 0 14px 30px rgba(19, 127, 112, 0.18);
}

.tab:hover {
  color: var(--accent-strong);
  border-color: rgba(19, 127, 112, 0.2);
}

.search {
  display: flex;
  gap: 10px;
  align-items: center;
  background: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.search input {
  border: none;
  background: transparent;
  font-size: 14px;
  width: 220px;
  outline: none;
  color: var(--ink);
}

.feed {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.card {
  position: relative;
  padding: 18px;
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(227, 214, 199, 0.7);
  box-shadow: 0 10px 24px rgba(28, 31, 35, 0.06);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 190px;
  animation: cardUp 0.6s ease var(--delay, 0ms) both;
}

.card h3 {
  font-size: 18px;
  line-height: 1.3;
}

.card p {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

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

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

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(19, 127, 112, 0.1);
  color: var(--accent-strong);
  font-weight: 600;
}

.badge.secondary {
  background: rgba(244, 176, 123, 0.2);
  color: #c05b33;
}

.fav-btn {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: all 0.2s ease;
}

.fav-btn.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 8px 18px rgba(19, 127, 112, 0.25);
}

.empty {
  text-align: center;
  padding: 40px 12px;
  color: var(--muted);
}

.favorites {
  margin-top: 36px;
  padding: 22px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.favorites-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.favorites-item {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(227, 214, 199, 0.7);
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.favorites-item a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer {
  margin-top: 40px;
}

.footer-card {
  display: grid;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
}

.footer-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-text {
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.skeleton {
  background: linear-gradient(120deg, #f6f1ea 30%, #fdfbf8 50%, #f6f1ea 70%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  color: transparent;
}

.skeleton .badge,
.skeleton .fav-btn {
  visibility: hidden;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }
  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 880px) {
  .hero-inner {
    flex-direction: column;
  }

  .hero-actions {
    flex-direction: row;
  }

  .search input {
    width: 160px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 24px;
  }

  .brand {
    flex-direction: column;
  }

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

  .search {
    width: 100%;
    justify-content: space-between;
  }

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

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
