:root {
  --bg-color: #faf8f0;
  --card-bg: #ffffff;
  --light-warm: #f3efe4;
  --board-bg: #b9a899;
  --board-slot: rgba(238,228,218,.35);
  --primary: #f0653a;
  --primary-dark: #d9502a;
  --text-main: #4a3f35;
  --text-muted: #8c7a6b;
  --gold-grad: linear-gradient(135deg, #f0653a, #f5c842);
  --square-2: #eee4da;
  --square-4: #ede0c8;
  --square-8: #f2b179;
  --square-16: #f59563;
  --square-32: #f67c5f;
  --square-64: #f65e3b;
  --square-128: #edcf72;
  --square-256: #edcc61;
  --square-512: #edc850;
  --square-1024: #edc53f;
  --square-2048: #edc22e;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(185,168,153,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; font-weight: 800; }
.text-primary { color: var(--primary); }

/* Typography */
h1, h2, h3 {
  background: var(--gold-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 900;
}
h1 { font-size: 2.5rem; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.25rem; }

/* Layout */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: var(--radius);
  font-weight: bold; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 4px 12px rgba(240,101,58,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(240,101,58,0.4); }
.btn-outline {
  background: transparent; color: var(--primary); border: 2px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-large { padding: 16px 36px; font-size: 1.2rem; border-radius: 16px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 248, 240, 0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--light-warm);
}
.nav-container {
  display: flex; justify-content: space-between; align-items: center; height: 64px;
}
.logo-area { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.2rem; color: var(--text-main); }
.logo-area img { height: 32px; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { font-weight: 600; color: var(--text-muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--primary); }
.nav-actions { display: flex; gap: 15px; align-items: center; }
.search-bar { display: none; position: relative; }
.search-bar input {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--light-warm);
  background: var(--card-bg); outline: none; width: 200px; font-size: 0.9rem;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 5px; }
.hamburger span { width: 24px; height: 3px; background: var(--text-main); border-radius: 2px; transition: 0.3s; }

/* Hero Section */
.hero { padding: 60px 0; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.hero-text p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 24px; }
.hero-actions { display: flex; gap: 16px; margin-bottom: 40px; flex-wrap: wrap; }
.stats-bar { display: flex; gap: 30px; }
.stat-item { display: flex; flex-direction: column; }
.stat-num { font-size: 1.8rem; color: var(--primary); }
.stat-label { font-size: 0.9rem; color: var(--text-muted); }

/* 2048 Board */
.board-col { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.score-board {
  background: var(--board-bg); color: #fff; padding: 12px 24px;
  border-radius: var(--radius); text-align: center; box-shadow: var(--shadow);
  width: 100%; max-width: 320px;
}
.score-board span { display: block; font-size: 0.8rem; opacity: 0.9; }
.score-board strong { font-size: 1.5rem; }
.board {
  background: var(--board-bg); padding: 12px; border-radius: var(--radius);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  width: 100%; max-width: 320px; box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}
.cell {
  background: var(--board-slot); border-radius: 8px; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900; color: var(--text-main);
  position: relative; overflow: hidden;
}
.cell-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.4; }
.cell-text { position: relative; z-index: 1; font-size: 0.8rem; font-weight: bold; text-align: center; line-height: 1.2; padding: 2px; }
.cell-bg-2 { background: var(--square-2); }
.cell-bg-4 { background: var(--square-4); }
.cell-bg-8 { background: var(--square-8); color: #fff; }
.cell-bg-16 { background: var(--square-16); color: #fff; }
.cell-bg-32 { background: var(--square-32); color: #fff; }
.cell-bg-64 { background: var(--square-64); color: #fff; }
.cell-bg-128 { background: var(--square-128); color: #fff; box-shadow: 0 0 10px rgba(237,207,114,0.6); }
.cell-bg-256 { background: var(--square-256); color: #fff; box-shadow: 0 0 12px rgba(237,204,97,0.7); }
.cell-bg-512 { background: var(--square-512); color: #fff; box-shadow: 0 0 14px rgba(237,200,80,0.8); }
.cell-bg-1024 { background: var(--square-1024); color: #fff; box-shadow: 0 0 16px rgba(237,197,63,0.9); }
.cell-bg-2048 { background: var(--square-2048); color: #fff; box-shadow: 0 0 20px rgba(237,194,46,1); animation: pulse 2s infinite; }

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 20px rgba(237,194,46,0.8); }
  50% { transform: scale(1.05); box-shadow: 0 0 30px rgba(237,194,46,1); }
  100% { transform: scale(1); box-shadow: 0 0 20px rgba(237,194,46,0.8); }
}

/* Play Mechanism */
.play-section { background: var(--light-warm); }
.pieces-container { display: flex; justify-content: center; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.piece {
  background: var(--card-bg); padding: 20px; border-radius: var(--radius);
  box-shadow: var(--shadow); cursor: pointer; text-align: center;
  transition: transform 0.3s; font-weight: bold; border: 2px solid transparent;
}
.piece:hover { transform: translateY(-5px); border-color: var(--primary); }
.piece.active { background: var(--primary); color: #fff; }
.result-box {
  background: var(--board-bg); width: 150px; height: 150px; margin: 0 auto;
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 3rem; font-weight: 900; box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

/* Library */
.filters { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.chip {
  padding: 6px 16px; border-radius: 20px; background: var(--card-bg);
  border: 1px solid var(--light-warm); cursor: pointer; transition: 0.2s; font-size: 0.9rem;
}
.chip.active, .chip:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.grid-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card {
  background: var(--card-bg); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); transition: transform 0.3s; position: relative;
}
.card:hover { transform: translateY(-5px); }
.card-img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.card-info { padding: 12px; }
.card-title { font-weight: bold; font-size: 1rem; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; justify-content: space-between; }
.badge {
  position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 12px;
  font-size: 0.75rem; font-weight: bold; color: #fff; background: var(--primary);
}
.no-result { text-align: center; color: var(--text-muted); padding: 40px 0; display: none; }

/* Calendar */
.calendar-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 30px; }
.cal-card { background: var(--card-bg); padding: 15px; border-radius: var(--radius); box-shadow: var(--shadow); }
.cal-day { font-weight: 900; color: var(--primary); font-size: 1.2rem; margin-bottom: 10px; }
.cal-items li { font-size: 0.9rem; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.cal-items li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.time-blocks { display: grid; grid-template-columns: 1fr; gap: 20px; }
.time-block { padding: 30px; border-radius: var(--radius); color: #fff; text-align: center; }
.time-block.noon { background: var(--primary); }
.time-block.eve { background: var(--primary-dark); }
.time-block h3 { color: #fff; font-size: 2rem; margin-bottom: 10px; -webkit-text-fill-color: #fff; background: none; }

/* Wishlist */
.wishlist-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.wish-card { background: var(--card-bg); padding: 20px; border-radius: var(--radius); display: flex; gap: 15px; align-items: center; box-shadow: var(--shadow); }
.wish-img { width: 80px; height: 110px; border-radius: 8px; object-fit: cover; }
.wish-content { flex: 1; }
.wish-title { font-weight: bold; font-size: 1.1rem; margin-bottom: 5px; }
.wish-progress { height: 8px; background: var(--light-warm); border-radius: 4px; margin: 10px 0; overflow: hidden; }
.wish-progress-bar { height: 100%; background: var(--gold-grad); width: 0; transition: width 0.5s; }
.wish-actions { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; border-radius: 8px; }

/* Scenarios */
.scenarios { background: var(--light-warm); }
.scenario-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.scenario-card { background: var(--card-bg); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.scenario-card h3 { margin-bottom: 10px; }

/* Mobile Experience */
.mobile-exp { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.mobile-features li { display: flex; gap: 10px; margin-bottom: 15px; font-weight: 600; }
.mobile-features li::before { content: "✓"; color: var(--primary); font-weight: 900; }
.phone-mock { width: 100%; max-width: 280px; margin: 0 auto; border: 8px solid #333; border-radius: 36px; overflow: hidden; position: relative; background: #000; aspect-ratio: 9/19; box-shadow: 0 20px 40px rgba(0,0,0,0.15); }
.phone-screen { position: relative; width: 100%; height: 100%; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.5s; }
.slide.active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.swipe-hint { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 0.8rem; animation: bounce 2s infinite; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -10px); } }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 15px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--light-warm); cursor: pointer; }
.dot.active { background: var(--primary); }

/* Reviews */
.review-header { text-align: center; margin-bottom: 40px; }
.review-score { font-size: 4rem; line-height: 1; margin-bottom: 10px; }
.stars { color: #f5c842; font-size: 1.5rem; }
.review-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.review-card { background: var(--card-bg); padding: 20px; border-radius: var(--radius); box-shadow: var(--shadow); }
.review-user { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 8px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; }
.user-info { font-size: 0.85rem; }
.user-name { font-weight: bold; }
.user-tag { color: var(--text-muted); font-size: 0.75rem; }
.review-text { font-size: 0.95rem; color: var(--text-main); }

/* FAQ */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--card-bg); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; box-shadow: var(--shadow); }
.faq-q { padding: 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-weight: bold; }
.faq-icon { transition: transform 0.3s; }
.faq-item.open .faq-icon { transform: rotate(180deg); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: max-height 0.3s, padding 0.3s; color: var(--text-muted); }
.faq-item.open .faq-a { padding: 0 20px 20px; max-height: 200px; }

/* Download CTA */
.download-section { text-align: center; background: var(--board-bg); color: #fff; padding: 60px 20px; border-radius: var(--radius); margin: 0 20px 80px; }
.download-section h2 { color: #fff; -webkit-text-fill-color: #fff; background: none; }
.download-section p { margin-bottom: 30px; font-size: 1.1rem; }

/* Footer */
footer { border-top: 1px solid var(--light-warm); padding: 30px 0; font-size: 0.85rem; color: var(--text-muted); text-align: center; }
footer a { color: var(--text-muted); }
footer a:hover { color: var(--primary); }
.footer-info { margin-bottom: 10px; }
.update-time { margin-top: 10px; font-size: 0.75rem; opacity: 0.8; }

/* Animations */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (min-width: 768px) {
  .nav-links { display: flex; }
  .search-bar { display: block; }
  .grid-cards { grid-template-columns: repeat(4, 1fr); }
  .calendar-grid { grid-template-columns: repeat(4, 1fr); }
  .wishlist-grid { grid-template-columns: repeat(2, 1fr); }
  .review-grid { grid-template-columns: repeat(2, 1fr); }
  .time-blocks { grid-template-columns: 1fr 1fr; }
  .mobile-exp { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  h1 { font-size: 3.5rem; }
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .board { max-width: 380px; padding: 16px; gap: 16px; }
  .grid-cards { grid-template-columns: repeat(5, 1fr); }
  .calendar-grid { grid-template-columns: repeat(7, 1fr); }
  .wishlist-grid { grid-template-columns: repeat(3, 1fr); }
  .review-grid { grid-template-columns: repeat(4, 1fr); }
  .scenario-grid { grid-template-columns: repeat(4, 1fr); }
  .nav-links { display: flex; }
}