:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #2b2f36;
  --text-dim: #8a8f98;
  --line: #e8eaee;
  --green: #2ecc71;
  --red: #e74c3c;
  --accent: #4a7dff;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

.hero {
  text-align: center;
  padding: 40px 16px 24px;
}

.site-title {
  font-size: 2rem;
  letter-spacing: 0.04em;
}

.site-subtitle {
  margin-top: 6px;
  color: var(--text-dim);
  font-size: 1rem;
}

.site-description {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.site-notice {
  margin-top: 10px;
  display: inline-block;
  background: #fff7e6;
  border: 1px solid #ffd98a;
  color: #9a6b00;
  border-radius: 8px;
  padding: 4px 14px;
  font-size: 0.85rem;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

.toolbar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  width: 100%;
  color: var(--text-dim);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 125, 255, 0.12);
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  font-size: 0.95rem;
  color: var(--text);
}

.legend {
  color: #7a5c00;
  font-size: 0.82rem;
  background: #fff9e6;
  border: 1px solid #f0ddab;
  border-radius: 10px;
  padding: 9px 16px;
  margin-bottom: 14px;
}

.ad-slot {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.ad-slot.is-empty {
  display: none;
}

.ad-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
}

.ad-item a {
  display: block;
}

.ad-item img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}

.ad-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-align: center;
  padding: 6px;
  pointer-events: none;
}

.ad-overlay-name {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.ad-overlay-note {
  font-size: 0.72rem;
  opacity: 0.85;
  line-height: 1.3;
  margin-top: 2px;
}

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

.tab {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}

.tab:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.meta-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-dim);
  font-size: 0.8rem;
  background: #eef1f6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 16px;
  margin-bottom: 14px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 12px;
  padding: 14px;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.card.is-down {
  border-left-color: var(--red);
}

.card-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #eef1f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: #5a6474;
  overflow: hidden;
}

.card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-status {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
  margin-top: 2px;
}

.card-status.is-down {
  color: var(--red);
}

.card-desc {
  color: var(--text-dim);
  font-size: 0.82rem;
  margin-top: 3px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.empty-tip {
  text-align: center;
  color: var(--text-dim);
  padding: 48px 0;
}

.is-hidden {
  display: none !important;
}

.footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
  padding: 24px 16px 40px;
}

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

@media (max-width: 900px) {
  .ad-slot {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .ad-slot {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .ad-slot {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .search-box {
    width: 100%;
  }

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