/* ===== Local Fonts ===== */
@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/NotoSerifSC-Regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Noto Serif SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/NotoSerifSC-Bold.ttf') format('truetype');
}

@font-face {
  font-family: 'ZCOOL XiaoWei';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/xiachanyuanti.ttf') format('truetype');
}

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0e0e12;
  --bg-card: #16161d;
  --accent: #e8c47c;
  --accent2: #c7a05e;
  --text: #d4d0c8;
  --text-dim: #8a8780;
  --border: #2a2a35;
  --glow: rgba(232, 196, 124, 0.12);
}

html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--accent2) var(--bg);
}

body {
  font-family: 'Noto Serif SC', 'ZCOOL XiaoWei', 'Georgia', serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ===== Noise Overlay ===== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
}

/* ===== Floating Particles ===== */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: float-up linear infinite;
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(100vh) scale(0); }
  10% { opacity: 0.6; }
  90% { opacity: 0.3; }
  100% { opacity: 0; transform: translateY(-10vh) scale(1); }
}

/* ===== Header / Hero ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: radial-gradient(ellipse at 50% 30%, rgba(232,196,124,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 40px rgba(232,196,124,0.2);
  animation: fadeInDown 1.2s ease-out;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2vw, 1.15rem);
  color: var(--text-dim);
  letter-spacing: 0.3em;
  font-weight: 400;
  margin-bottom: 2.5rem;
  animation: fadeInDown 1.2s 0.3s ease-out both;
}

.hero-line {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin-bottom: 2.5rem;
  animation: fadeIn 1.5s 0.6s ease-out both;
}

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  animation: fadeIn 2s 1s ease-out both;
  text-decoration: none;
}

.hero-scroll::after {
  content: '';
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== Section Common ===== */
section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  font-size: 0.7rem;
  letter-spacing: 0.4em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.section-title {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.section-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent2), transparent);
  margin: 0 auto;
}

/* ===== QR Code / Tip Section ===== */
.tip-section {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.qr-container {
  position: relative;
  margin: 2.5rem 0;
}

.qr-frame {
  position: relative;
  width: 400px;
  height: 400px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 0 60px rgba(232,196,124,0.08),
    inset 0 0 30px rgba(232,196,124,0.03);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.qr-frame:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 0 80px rgba(232,196,124,0.15),
    inset 0 0 30px rgba(232,196,124,0.05);
}

/* Decorative corners */
.qr-frame::before, .qr-frame::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
}
.qr-frame::before {
  top: -1px; left: -1px;
  border-width: 1px 0 0 1px;
  border-radius: 2px 0 0 0;
}
.qr-frame::after {
  bottom: -1px; right: -1px;
  border-width: 0 1px 1px 0;
  border-radius: 0 0 2px 0;
}

.qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.tip-poem {
  max-width: 400px;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 2.2;
  font-style: italic;
  margin-top: 1.5rem;
}

.tip-poem span {
  display: block;
}

/* ===== Game Cards ===== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.game-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  cursor: default;
}

.game-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px var(--glow);
  border-color: rgba(232,196,124,0.3);
}

.game-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1a1a24;
}

.game-cover img, .game-cover svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.game-card:hover .game-cover img,
.game-card:hover .game-cover svg {
  transform: scale(1.05);
}

.game-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(14,14,18,0.8) 0%, transparent 50%);
  pointer-events: none;
}

.game-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(232,196,124,0.15);
  color: var(--accent);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  padding: 4px 10px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(232,196,124,0.2);
}

.game-info {
  padding: 1.5rem;
}

.game-title {
  font-family: 'ZCOOL XiaoWei', 'Noto Serif SC', serif;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
}

.game-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.9;
  margin-bottom: 1rem;
}

.game-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.game-meta-item {
  font-size: 0.72rem;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
}

/* ===== About Section ===== */
.about-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 2.2;
}

.about-content p + p {
  margin-top: 1.5rem;
}

/* ===== Footer ===== */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}

.footer a {
  color: var(--accent2);
  text-decoration: none;
}

/* ===== Scroll Reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
/* ===== Responsive ===== */




@media (max-width: 640px) {
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    }
  .games-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  section {
    padding: 3rem 1.2rem;
  }
  .qr-frame {
    width: 180px;
    height: 180px;
  }
}
