/* =========================================================
   叮！小游戏厅 · 前台主样式
   风格：复古印刷 / 90 年代街机（neo-brutalism）
   配色：米黄 + 深棕墨 + 番茄红 + 暖黄 + 薄荷 + 深蓝
   ========================================================= */

:root {
  --cream:  #f7ebcf;   /* 主背景：奶油米黄 */
  --paper:  #fff8e8;   /* 表层/卡片：纸张白 */
  --ink:    #2b2925;   /* 主文字/边框：深棕墨 */
  --red:    #e84c3d;   /* 主色：番茄红 */
  --blue:   #2453a6;   /* 辅色：深蓝 */
  --yellow: #f4c95d;   /* 高亮：暖黄 */
  --mint:   #82b998;   /* 状态：薄荷绿 */
  --grey:   #928b85;   /* 次级灰 */

  --border-w:   3px;
  --border-w-s: 2px;
  --shadow-hard:  3px 3px 0 var(--ink);
  --shadow-hard-l: 5px 5px 0 var(--ink);
  --shadow-hard-s: 2px 2px 0 var(--ink);
  --radius:    6px;
  --radius-l: 10px;
  --radius-s: 4px;

  --font: "Arial Rounded MT Bold", "PingFang SC", "Microsoft YaHei",
          "Hiragino Sans GB", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}

/* ---- 全局 ---- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* 关键：90 年代老纸张的颗粒纹理 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: .3;
  pointer-events: none;
  background-image: radial-gradient(#9a865e 0.65px, transparent .8px);
  background-size: 7px 7px;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
}

/* ---- 通用按钮 ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  font-weight: 700;
  font-size: 15px;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-hard-s);
  transition: transform .12s ease, box-shadow .12s ease, background .2s;
  text-decoration: none;
}
.btn:hover  { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px);  box-shadow: 0 0 0 var(--ink); }

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover { background: var(--red); }

.btn-ghost {
  background: var(--paper);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--yellow); }

/* =========================================================
   顶部站点头
   ========================================================= */
.site-header {
  min-height: 104px;
  padding: 0 clamp(16px, 5vw, 82px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  border-bottom: var(--border-w) solid var(--ink);
  background: rgba(247, 235, 207, .92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand strong { font-size: 22px; letter-spacing: -.5px; }

.brand-stamp {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  background: var(--red);
  color: #fff;
  border: var(--border-w) solid var(--ink);
  border-radius: 50%;
  font-size: 20px;
  font-weight: 900;
  transform: rotate(-8deg);
  box-shadow: var(--shadow-hard-s);
}

.site-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  font-size: 15px;
  font-weight: 600;
}
.site-nav a {
  position: relative;
  padding-bottom: 6px;
}
.site-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 3px;
  background: var(--red);
  transition: right .2s ease;
}
.site-nav a:hover::after,
.site-nav a.active::after { right: 0; }

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: var(--border-w-s) solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-hard-s);
}
.open-badge i {
  width: 10px;
  height: 10px;
  background: var(--mint);
  border: 2px solid var(--ink);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(130, 185, 152, .25);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 5vw, 82px) 60px;
  display: grid;
  grid-template-columns: 1.1fr .85fr;
  gap: 48px;
  align-items: center;
}

.hero-eyebrow {
  margin: 0 0 14px;
  color: var(--red);
  font-weight: 700;
  letter-spacing: .1em;
  font-size: 13px;
}

.hero-title {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.2px;
}

.hero-sub {
  margin: 0 0 32px;
  font-size: 17px;
  max-width: 480px;
  color: var(--ink);
  opacity: .85;
}

.hero-cta { display: flex; gap: 14px; margin-bottom: 24px; flex-wrap: wrap; }
.hero-phone { font-size: 14px; opacity: .7; margin: 0; }
.hero-phone strong { color: var(--red); font-size: 18px; }

/* 招商宣传条（紧贴 Hero 下方，红底白字粗体） */
.promo-banner {
  background: var(--red);
  color: var(--paper);
  border-top: var(--border-w-s) solid var(--ink);
  border-bottom: var(--border-w-s) solid var(--ink);
  padding: 12px 0;
  overflow: hidden;
  position: relative;
  box-shadow: 0 4px 0 rgba(43, 41, 37, .15);
}
.promo-banner p {
  margin: 0;
  text-align: center;
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: none;
  line-height: 1.6;
}

.hero-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  position: relative;
}

.deco-card {
  padding: 24px 20px;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 130px;
  transition: transform .2s ease;
}
.deco-card:hover { transform: translate(-2px, -2px); }

.deco-num {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  opacity: .4;
}
.deco-label { font-weight: 700; font-size: 15px; }

.deco-1 { background: var(--paper); }
.deco-2 { background: var(--yellow); transform: rotate(-2deg); }
.deco-2:hover { transform: rotate(-2deg) translate(-2px, -2px); }
.deco-3 { background: var(--mint); }
.deco-4 { background: var(--blue); color: #fff; }
.deco-4 .deco-num { opacity: .65; }

/* =========================================================
   分类 Tab
   ========================================================= */
.category-tabs {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 82px) 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: var(--border-w-s) solid var(--ink);
  margin-bottom: 36px;
}

.category-tabs .tab {
  padding: 8px 18px;
  font-weight: 700;
  font-size: 14px;
  border: var(--border-w-s) solid transparent;
  border-radius: 99px;
  transition: all .18s;
}
.category-tabs .tab:hover { background: var(--paper); }
.category-tabs .tab.active {
  background: var(--red);
  color: #fff;
  border-color: var(--ink);
  box-shadow: var(--shadow-hard-s);
}

/* =========================================================
   区块标题
   ========================================================= */
.section-title {
  max-width: 1280px;
  margin: 0 auto 24px;
  padding: 0 clamp(20px, 5vw, 82px);
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title span {
  background: var(--ink);
  color: var(--paper);
  padding: 4px 12px;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-hard-s);
}

/* =========================================================
   推荐位
   ========================================================= */
.featured-row {
  max-width: 1280px;
  margin: 0 auto 48px;
  padding: 0 clamp(20px, 5vw, 82px);
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.featured-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  aspect-ratio: 4/5;
}
.featured-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-hard-l); }

.featured-card img {
  width: 100%;
  height: 75%;
  object-fit: cover;
}
.featured-placeholder {
  width: 100%;
  height: 75%;
  display: grid;
  place-items: center;
  font-size: 40px;
  font-weight: 900;
  background: var(--yellow);
}
.featured-meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 25%;
  padding: 10px 14px;
  background: var(--paper);
  border-top: var(--border-w-s) solid var(--ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.featured-badge {
  align-self: flex-start;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 700;
  background: var(--yellow);
  border: var(--border-w-s) solid var(--ink);
  border-radius: 99px;
}
.cat-blue   .featured-badge { background: var(--blue); color: #fff; }
.cat-red    .featured-badge { background: var(--red);  color: #fff; }
.cat-mint   .featured-badge { background: var(--mint); }
.cat-ink    .featured-badge { background: var(--ink);  color: #fff; }

/* =========================================================
   游戏网格
   ========================================================= */
.game-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 82px) 80px;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.game-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-hard-l);
}

.card-cover {
  position: relative;
  aspect-ratio: 4/3;
  border-bottom: var(--border-w-s) solid var(--ink);
  overflow: hidden;
  background: var(--cream);
}
.card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.game-card:hover .card-cover img { transform: scale(1.06); }

/* 卡片截图轮播（多张游戏截图循环播放） */
.card-cover.carousel .carousel-item {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .6s ease, transform .3s ease;
  pointer-events: none;
  z-index: 1;
}
.card-cover.carousel .carousel-item.active { opacity: 1; }
.game-card:hover .card-cover.carousel .carousel-item.active { transform: scale(1.06); }

.carousel-dots {
  position: absolute;
  left: 0; right: 0; bottom: 10px;
  display: flex;
  gap: 6px;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}
.carousel-dots .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  opacity: .55;
  transition: opacity .3s, background .3s, transform .3s;
}
.carousel-dots .dot.active {
  opacity: 1;
  background: var(--red);
  transform: scale(1.15);
}

.cover-placeholder {
  width: 100%; height: 100%;
  display: grid;
  place-items: center;
  background: var(--yellow);
  font-size: 32px;
  font-weight: 900;
  color: var(--ink);
}

.card-badge {
  position: absolute;
  top: 10px; right: 10px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  background: var(--paper);
  border: var(--border-w-s) solid var(--ink);
  border-radius: 99px;
  box-shadow: var(--shadow-hard-s);
}
.cat-red    .card-badge { background: var(--red); color: #fff; }
.cat-blue   .card-badge { background: var(--blue); color: #fff; }
.cat-yellow .card-badge { background: var(--yellow); }
.cat-mint   .card-badge { background: var(--mint); }
.cat-ink    .card-badge { background: var(--ink); color: #fff; }

.card-hover-cta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  transform: translateY(100%);
  transition: transform .22s ease;
}
.game-card:hover .card-hover-cta { transform: translateY(0); }

.card-body {
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--grey);
  line-height: 1.4;
}

/* =========================================================
   空状态
   ========================================================= */
.empty-state {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 20px 80px;
  display: grid;
  place-items: center;
}
.empty-card {
  padding: 40px 32px;
  text-align: center;
  background: var(--paper);
  border: 3px dashed var(--ink);
  border-radius: var(--radius);
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    rgba(244, 201, 93, .25) 10px, rgba(244, 201, 93, .25) 20px);
}
.empty-card .empty-icon {
  display: inline-block;
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 8px;
  color: var(--red);
  font-family: var(--font-mono);
}
.empty-card h3 { margin: 0 0 8px; font-size: 22px; }
.empty-card p  { margin: 0 0 20px; opacity: .7; }

/* =========================================================
   播放页
   ========================================================= */
.play-wrap {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--paper);
  border-top: var(--border-w-s) solid var(--ink);
}
.play-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 20px;
  border-bottom: var(--border-w-s) solid var(--ink);
  background: var(--cream);
  box-shadow: 0 2px 0 var(--ink);
}
.play-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  padding: 6px 14px;
  border: var(--border-w-s) solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  transition: transform .12s;
}
.play-back:hover { transform: translate(-1px, -1px); }
.play-back .arrow { font-size: 16px; }

.play-title { flex: 1; font-size: 18px; }
.play-cat {
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 700;
  border: var(--border-w-s) solid var(--ink);
  border-radius: 99px;
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
}
.cat-red    .play-cat, .cat-red    .card-badge,
.cat-blue   .play-cat, .cat-blue   .card-badge,
.cat-yellow .play-cat, .cat-yellow .card-badge,
.cat-mint   .play-cat, .cat-mint   .card-badge,
.cat-ink    .play-cat, .cat-ink    .card-badge { /* 共享色板规则 */ }
.cat-red    .play-cat { background: var(--red); color: #fff; }
.cat-blue   .play-cat { background: var(--blue); color: #fff; }
.cat-yellow .play-cat { background: var(--yellow); }
.cat-mint   .play-cat { background: var(--mint); }
.cat-ink    .play-cat { background: var(--ink); color: #fff; }

.play-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #fff;
}

/* =========================================================
   闪现消息
   ========================================================= */
.flash-bar {
  max-width: 1280px;
  margin: 16px auto 0;
  padding: 0 clamp(20px, 5vw, 82px);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.flash {
  padding: 10px 16px;
  border: var(--border-w-s) solid var(--ink);
  border-radius: var(--radius-s);
  background: var(--paper);
  box-shadow: var(--shadow-hard-s);
  font-weight: 600;
}
.flash-success { background: var(--mint); }
.flash-error   { background: var(--red); color: #fff; }

/* =========================================================
   页脚
   ========================================================= */
.site-footer {
  margin-top: 60px;
  border-top: var(--border-w) solid var(--ink);
  background: var(--paper);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 82px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}
.footer-block strong { display: block; margin-bottom: 8px; font-size: 16px; }
.footer-block p { margin: 4px 0; font-size: 13px; opacity: .8; }
.footer-right { text-align: right; }

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 1100px) {
  .game-grid { grid-template-columns: repeat(3, 1fr); }
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 880px) {
  .site-header {
    grid-template-columns: auto auto;
    gap: 16px;
    padding: 12px 20px;
    min-height: auto;
  }
  .site-nav { display: none; }
  .hero { grid-template-columns: 1fr; padding: 32px 20px; }
  .hero-right { display: none; }
  .game-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-right { text-align: left; }
}
@media (max-width: 480px) {
  .game-grid { grid-template-columns: 1fr; }
  .featured-grid { grid-template-columns: 1fr; }
  .category-tabs { padding: 0 20px 16px; }
  .section-title { padding: 0 20px; }
  .game-section { padding: 0 20px 60px; }
}
