:root {
  --bg-day: #f4efe1;
  --text-day: #2c2a26;
  --primary: #b8382d;
  --primary-hover: #9b2b21;
  --gold: #c49a5c;
  --bg-night: #181a1f;
  --text-night: #e8e4d9;
  --frame-border: #8b7d6b;
  --card-bg: #fffdf5;
  --font-serif: "Songti SC", "SimSun", "STSong", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-day);
  color: var(--text-day);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.5s ease, color 0.5s ease;
}

h1, h2, h3, .serif-text { font-family: var(--font-serif); font-weight: normal; }

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  background: rgba(244, 239, 225, 0.9);
  backdrop-filter: blur(10px);
  z-index: 100;
  border-bottom: 1px solid rgba(139, 125, 107, 0.2);
  transition: background 0.5s ease;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-family: var(--font-serif);
  font-weight: bold;
}

.header-logo img {
  height: 32px;
  width: auto;
}

.btn-download {
  background-color: var(--primary);
  color: #fff;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.3s, transform 0.2s;
  min-height: 44px;
}

.btn-download:hover {
  background-color: var(--primary-hover);
}

.btn-download svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Hero / Moon Gate */
.hero-section {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 20px 60px;
  position: relative;
  background: radial-gradient(circle at center, #fffdf5 0%, var(--bg-day) 100%);
}

.moon-gate {
  width: 100%;
  max-width: 600px;
  aspect-ratio: 3/4;
  border-radius: 50% 50% 0 0 / 40% 40% 0 0; /* Create moon gate shape */
  border: 12px solid var(--frame-border);
  background-color: var(--card-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  box-shadow: inset 0 0 40px rgba(139, 125, 107, 0.1), 0 10px 30px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
}

.moon-gate::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url('images/22d1fcdd-08a2-43de-b327-b738d27d.webp');
  background-size: cover;
  background-position: center;
  opacity: 0.1;
  z-index: 0;
}

.moon-gate > * { position: relative; z-index: 1; }

.moon-gate h1 {
  font-size: 36px;
  line-height: 1.3;
  margin-bottom: 20px;
  color: var(--text-day);
}

.moon-gate p {
  font-size: 16px;
  color: #555;
  margin-bottom: 40px;
  max-width: 80%;
}

.moon-gate .btn-download {
  padding: 14px 32px;
  font-size: 18px;
  border-radius: 30px;
}

/* Navigation Progress (Desktop) */
.side-nav {
  position: fixed;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.side-nav a {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(184, 56, 45, 0.2);
  border: 1px solid var(--primary);
  position: relative;
  transition: all 0.3s;
}
.side-nav a:hover, .side-nav a.active {
  background: var(--primary);
  transform: scale(1.2);
}
.side-nav a::after {
  content: attr(data-title);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--text-day);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  white-space: nowrap;
}
.side-nav a:hover::after { opacity: 1; }

/* Common Section Styles */
.content-section {
  padding: 80px 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
}

.section-title h2 {
  font-size: 32px;
  color: var(--text-day);
  margin-bottom: 12px;
  display: inline-block;
  position: relative;
}

.section-title h2::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--primary);
  margin: 12px auto 0;
}

/* Frame Layouts */
.frame-window {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.frame-window:nth-child(even) {
  direction: rtl;
}
.frame-window:nth-child(even) > * {
  direction: ltr;
}

.frame-image {
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  border: 4px solid var(--gold);
  padding: 8px;
  background: var(--card-bg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

.frame-image img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.frame-text h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--text-day);
}

.frame-text p {
  font-size: 16px;
  color: #555;
  margin-bottom: 12px;
}

/* Genre Grid (Flower Catalogue) */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
}

.genre-card {
  background: var(--card-bg);
  border: 1px solid rgba(139, 125, 107, 0.3);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.genre-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.06);
}

.genre-card h3 {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
}

.genre-card p {
  font-size: 14px;
  color: #777;
}

/* Night Mode Section (Rankings) */
.night-section {
  background-color: var(--bg-night);
  color: var(--text-night);
  padding: 100px 20px;
  transition: background-color 0.5s ease, color 0.5s ease;
}

.night-section .section-title h2 {
  color: var(--gold);
}

.night-section .section-title h2::after {
  background: var(--gold);
}

.rank-list {
  max-width: 800px;
  margin: 0 auto;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-num {
  font-size: 32px;
  font-family: var(--font-serif);
  color: var(--gold);
  width: 60px;
  font-style: italic;
}

.rank-info {
  flex: 1;
}

.rank-info h3 {
  font-size: 20px;
  margin-bottom: 4px;
  color: var(--text-night);
}

.rank-info p {
  font-size: 14px;
  color: #999;
}

.rank-cover {
  width: 60px;
  height: 80px;
  border-radius: 4px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Reviews */
.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.review-card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  border-left: 4px solid var(--primary);
}

.review-text {
  font-size: 15px;
  color: #444;
  margin-bottom: 16px;
  font-style: italic;
}

.review-author {
  font-size: 14px;
  color: #888;
  text-align: right;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: 16px;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: bold;
  color: var(--text-day);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
}

.faq-answer {
  padding: 0 20px 20px;
  font-size: 15px;
  color: #555;
}

/* Footer */
.site-footer {
  background: #111;
  color: #777;
  padding: 40px 20px;
  text-align: center;
  font-size: 13px;
}

.site-footer p {
  margin-bottom: 8px;
}

.site-footer a {
  color: #999;
  transition: color 0.3s;
}

.site-footer a:hover {
  color: #fff;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  .side-nav { display: none; }
  .frame-window { grid-template-columns: 1fr; gap: 20px; }
  .frame-window:nth-child(even) { direction: ltr; }
  .moon-gate { aspect-ratio: 4/5; padding: 24px; }
  .moon-gate h1 { font-size: 28px; }
  .content-section { padding: 60px 16px; }
  .night-section { padding: 60px 16px; }
}