/* ==========================================================================
   GameZilo 风格游戏门户 —— 站点样式
   粉色系：奶油底 + 粉边圆角方块 + 黄色悬停
   纯手写，无框架、无外部字体、无 CDN
   ========================================================================== */

:root {
  --pink: #fe7ba3;
  --pink-deep: #fe4880;
  --pink-soft: #ffeef7;
  --pink-line: rgba(254, 123, 163, 0.28);
  --cream: #fef9f7;
  --white: #ffffff;
  --rose: #8b5f6d;
  --rose-soft: #a97f8c;
  --yellow: #ffd357;
  --ink: #4a2f38;
  --muted: #9b7682;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          Helvetica, Arial, "PingFang SC", sans-serif;
  --wrap: 1120px;
  --radius: 20px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--rose);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--pink-deep); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 16px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 18px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--pink); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- 顶部 ---------- */

.topbar {
  background: var(--cream);
  border-bottom: 1px solid var(--pink-line);
  position: sticky; top: 0; z-index: 60;
}

.topbar__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 74px;
}

.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 21px; letter-spacing: -0.4px;
  color: var(--pink-deep);
  flex: none;
}
.logo:hover { text-decoration: none; transform: scale(1.04); transition: transform .3s ease; }
.logo__dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--pink); box-shadow: 0 0 0 4px var(--pink-soft);
}

.nav { display: flex; flex-wrap: wrap; gap: 2px; margin-left: 6px; }
.nav a {
  padding: 7px 11px;
  color: var(--rose);
  font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .04em;
  border-radius: 10px;
}
.nav a:hover { color: var(--pink-deep); background: var(--pink-soft); text-decoration: none; }
.nav a[aria-current="page"] { color: #fff; background: var(--pink); }

.search { margin-left: auto; display: flex; align-items: center; }
.search input {
  width: 190px; height: 34px;
  padding: 6px 34px 6px 14px;
  font: inherit; font-size: 13.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--pink-line);
  border-radius: 17px;
  outline: none;
}
.search input::placeholder { color: #c9a7b2; }
.search input:focus { border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft); }

/* ---------- 主区 ---------- */

main { padding: 26px 0 40px; }

.hero {
  background: linear-gradient(120deg, #fff2f7, #ffe3ee 55%, #fff6ea);
  border: 1px solid var(--pink-line);
  border-radius: 26px;
  padding: 34px 30px;
  text-align: center;
  margin-bottom: 30px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: 30px; line-height: 1.25; letter-spacing: -.02em;
  color: var(--ink);
}
.hero p { margin: 0 auto; max-width: 62ch; color: var(--rose-soft); font-size: 15.5px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.hero__tags span {
  background: #fff; border: 1px solid var(--pink-line); color: var(--pink-deep);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .05em;
}

/* 区块标题 */
.section-head { text-align: center; margin: 34px 0 18px; }
.section-head h2 {
  margin: 0 0 4px;
  font-size: 21px; letter-spacing: -.01em; color: var(--pink-deep);
  text-transform: uppercase;
}
.section-head p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ---------- 方块网格（核心视觉） ---------- */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 18px;
}

.tile {
  position: relative;
  display: block;
  border: 4px solid var(--pink);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.tile:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(254, 123, 163, .18);
  text-decoration: none;
}

.tile__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--pink-soft); }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile:hover .tile__media img { transform: scale(1.06); }

.tile__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 6px 10px;
  background: rgba(255, 211, 87, .92);
  color: #fff;
  font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.tile__badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(255, 255, 255, .94);
  color: var(--pink-deep);
  font-size: 10.5px; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
}

/* 大卡片（推荐位，两条） */
.picks {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 8px;
}
.pick {
  display: flex; gap: 16px; align-items: flex-start;
  background: #fff;
  border: 1px solid var(--pink-line);
  border-radius: var(--radius);
  padding: 16px;
}
.pick__media {
  flex: 0 0 40%; max-width: 220px;
  border-radius: 14px; overflow: hidden;
}
.pick__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.pick h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.35; color: var(--ink); }
.pick h3 a { color: var(--ink); }
.pick h3 a:hover { color: var(--pink-deep); text-decoration: none; }
.pick p { margin: 0 0 8px; font-size: 14px; color: var(--muted); }

/* 列表（最新动态） */
.news-list { display: grid; gap: 0; border-top: 1px solid var(--pink-line); }
.news-item {
  display: flex; gap: 14px; align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--pink-line);
}
.news-item__thumb { flex: none; width: 74px; border-radius: 12px; overflow: hidden; }
.news-item__thumb img { width: 74px; height: 56px; object-fit: cover; }
.news-item h3 { margin: 0 0 2px; font-size: 15.5px; line-height: 1.4; }
.news-item h3 a { color: var(--ink); }
.news-item h3 a:hover { color: var(--pink-deep); text-decoration: none; }
.meta { color: var(--muted); font-size: 12.5px; }

/* ---------- 文章页 ---------- */

.article {
  max-width: 760px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--pink-line);
  border-radius: 24px;
  padding: 28px 30px 34px;
}
.article__cat {
  display: inline-block; margin-bottom: 10px;
  background: var(--pink-soft); color: var(--pink-deep);
  font-size: 11.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
}
.article h1 { margin: 0 0 12px; font-size: 29px; line-height: 1.3; letter-spacing: -.02em; color: var(--ink); }
.article__dek { font-size: 17px; color: var(--rose-soft); margin-bottom: 16px; }
.article__byline {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: 13px; color: var(--muted);
  padding-bottom: 16px; margin-bottom: 22px;
  border-bottom: 1px solid var(--pink-line);
}
.article__cover { border-radius: 16px; overflow: hidden; margin-bottom: 22px; }
.article__cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article p { font-size: 17.5px; line-height: 1.78; color: var(--ink); }
.article h2 { font-size: 21px; margin: 30px 0 10px; color: var(--ink); }
.article ul, .article ol { padding-left: 22px; margin: 0 0 18px; }
.article li { margin-bottom: 8px; font-size: 17px; color: var(--ink); }
.article blockquote {
  margin: 24px 0; padding: 6px 0 6px 18px;
  border-left: 4px solid var(--pink);
  color: var(--rose); font-style: italic; font-size: 19px;
}
.article figure { margin: 24px 0; }
.article figure img { width: 100%; border-radius: 14px; aspect-ratio: 16/9; object-fit: cover; }
.article figcaption { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.rating {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--pink-soft); border-radius: 999px;
  padding: 6px 14px; margin: 0 0 18px;
  font-size: 13px; font-weight: 700; color: var(--pink-deep);
}
.rating b { font-size: 17px; }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tags a {
  background: var(--pink-soft); color: var(--pink-deep);
  font-size: 12.5px; padding: 6px 12px; border-radius: 999px;
}

/* ---------- 静态页 ---------- */

.page {
  max-width: 760px; margin: 0 auto;
  background: #fff; border: 1px solid var(--pink-line);
  border-radius: 24px; padding: 28px 30px 34px;
}
.page h1 { margin: 0 0 16px; font-size: 27px; color: var(--ink); }
.page h2 { font-size: 19px; margin: 26px 0 8px; color: var(--ink); }
.page ul { padding-left: 22px; margin: 0 0 16px; }
.page li { margin-bottom: 6px; }

.contact-form label { display: block; font-weight: 700; margin: 14px 0 4px; font-size: 14px; color: var(--ink); }
.contact-form input, .contact-form textarea {
  width: 100%; padding: 11px 13px;
  font: inherit; font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid var(--pink-line); border-radius: 12px;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px var(--pink-soft);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button {
  margin-top: 16px; padding: 12px 26px;
  background: var(--pink); color: #fff; border: 0; border-radius: 999px;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
}
.contact-form button:hover { background: var(--pink-deep); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 10px; }

/* ---------- 页脚 ---------- */

.footer {
  background: #fff;
  border-top: 1px solid var(--pink-line);
  padding: 30px 0 26px;
  font-size: 13.5px;
  color: var(--muted);
}
.footer__cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 26px; }
.footer h4 { margin: 0 0 10px; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 6px; }
.footer a { color: var(--rose); }
.footer__brand { font-weight: 800; font-size: 18px; color: var(--pink-deep); margin-bottom: 6px; }
.footer__bottom {
  margin-top: 22px; padding-top: 14px;
  border-top: 1px solid var(--pink-line);
  display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: space-between;
  font-size: 12.5px;
}

/* ==========================================================================
   广告位
   ========================================================================== */

.ad-cage {
  display: none; flex-direction: column; align-items: center;
  margin: 24px auto; padding: 6px 4px; max-width: 100%; overflow: hidden;
}
.ad-cage[hidden] { display: none !important; }
html[data-ads="on"] .ad-cage { display: flex; }

.ad-label {
  margin-bottom: 4px; font-size: 9.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: #c9a7b2;
}

.ad-slot { display: grid; place-items: center; text-align: center; }
.ad-slot--728x90  { width: 100%; max-width: 728px; min-height: 90px; }
.ad-slot--468x60  { width: 100%; max-width: 468px; min-height: 60px; }
.ad-slot--300x250 { width: 300px; max-width: 100%; min-height: 250px; }
.ad-slot--160x300 { width: 160px; min-height: 300px; }
.ad-slot--160x600 { width: 160px; min-height: 600px; }
.ad-slot--320x50  { width: 320px; height: 50px; }
.ad-slot--native  { width: 100%; min-height: 160px; }

.ad-anchor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
  display: none; justify-content: center; align-items: center;
  padding: 5px 12px 7px;
  background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--pink-line);
  box-shadow: 0 -4px 20px rgba(254, 123, 163, .16);
}
html[data-ads="on"] .ad-anchor { display: flex; }
.ad-anchor[hidden] { display: none !important; }
.ad-anchor__close {
  position: absolute; top: 2px; right: 8px;
  width: 20px; height: 20px; padding: 0;
  border: 1px solid var(--pink-line); border-radius: 50%;
  background: #fff; color: var(--muted); font-size: 13px; line-height: 1; cursor: pointer;
}
body.has-anchor { padding-bottom: 70px; }

/* ==========================================================================
   响应式
   ========================================================================== */

@media (max-width: 900px) {
  .picks { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__cols > div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar__inner { min-height: 64px; gap: 10px; flex-wrap: wrap; padding: 8px 0; }
  .search { order: 3; width: 100%; margin-left: 0; }
  .search input { width: 100%; }
  .nav { margin-left: 0; }
  .hero { padding: 26px 20px; border-radius: 22px; }
  .hero h1 { font-size: 24px; }
  .tile-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
  .article, .page { padding: 22px 18px 26px; border-radius: 20px; }
  .article h1 { font-size: 23px; }
  .article p { font-size: 17px; }
  .pick { flex-direction: column; }
  .pick__media { flex: none; max-width: none; width: 100%; }
}

@media (max-width: 420px) {
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .tile { border-width: 3px; }
  .tile__label { font-size: 10px; padding: 5px 6px; }
  .logo { font-size: 18px; }
  .nav a { padding: 6px 8px; font-size: 11.5px; }
  .hero h1 { font-size: 21px; }
}

@media print {
  .topbar, .footer, .ad-cage, .ad-anchor, .hero__tags { display: none !important; }
  body.has-anchor { padding-bottom: 0; }
}
