/* ===== Lilyleo.art - Magazine Editorial Design ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f5f0; --card-bg: #ffffff; --text: #1a1a1a; --muted: #666;
  --dino: #2d6a4f; --ranran: #9d4edd; --jiajia: #7b2cbf;
  --tech: #1d3557; --math: #0077b6; --flute: #e07a5f; --chinese: #c9184a;
  --shadow: 0 2px 12px rgba(0,0,0,0.08); --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
  --radius: 12px;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

/* ===== Navigation ===== */
.site-nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
  padding: 0 32px;
}
.nav-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; height: 58px; gap: 6px; }
.nav-logo { font-size: 1.05em; font-weight: 700; color: var(--text); text-decoration: none; margin-right: auto; display: flex; align-items: center; gap: 6px; }
.nav-logo span { font-size: 1.3em; }
.nav-links { display: flex; gap: 3px; flex-wrap: wrap; }
.nav-link { padding: 6px 13px; border-radius: 20px; font-size: 0.82em; text-decoration: none; color: var(--muted); transition: all 0.2s; font-weight: 600; white-space: nowrap; }
.nav-link:hover { background: #f0f0f0; color: var(--text); }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white;
  padding: 64px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/imgs/bg.jpg') center/cover no-repeat;
  opacity: 0.18;
  filter: grayscale(30%);
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 30%, rgba(15,52,96,0.7) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: 2.2em; font-weight: 800; letter-spacing: 0.04em; margin-bottom: 12px; background: linear-gradient(90deg, #fff, #c8d6e5); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.05em; opacity: 0.85; max-width: 500px; margin: 0 auto 24px; }
.hero-kids { display: flex; gap: 16px; justify-content: center; margin-top: 32px; }
.hero-kid { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.1); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.15); border-radius: 50px; padding: 10px 22px; text-decoration: none; color: white; font-size: 0.92em; transition: all 0.25s; }
.hero-kid:hover { background: rgba(255,255,255,0.2); transform: translateY(-2px); }
.hero-kid .emoji { font-size: 1.5em; }

/* ===== Container ===== */
.container { max-width: 1100px; margin: 0 auto; padding: 48px 24px; }
.section-header { display: flex; align-items: baseline; gap: 14px; margin-bottom: 28px; border-bottom: 1.5px solid #e0e0e0; padding-bottom: 14px; }
.section-header h2 { font-size: 1.5em; font-weight: 800; color: var(--text); }
.section-header p { color: var(--muted); font-size: 0.88em; }

/* ===== Brand Cards - Magazine Style ===== */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.brand-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.22s, box-shadow 0.22s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  background: #ddd;
}
.brand-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* Photo background */
.brand-card .card-photo {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transition: transform 0.4s;
}
.brand-card:hover .card-photo { transform: scale(1.04); }

/* Gradient overlay */
.brand-card .card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

/* Tag badge */
.brand-card .card-badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-radius: 20px; padding: 3px 10px;
  font-size: 0.68em; font-weight: 700; color: #333; letter-spacing: 0.02em;
  z-index: 2;
}

/* Emoji icon */
.brand-card .card-icon {
  position: absolute; top: 12px; right: 12px;
  font-size: 1.6em; z-index: 2;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,0.3));
}

/* Text */
.brand-card .card-text { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 16px 18px; z-index: 2; }
.brand-card .card-title { font-size: 1.05em; font-weight: 800; color: white; margin-bottom: 4px; }
.brand-card .card-desc { font-size: 0.75em; color: rgba(255,255,255,0.8); line-height: 1.5; }
.brand-card .card-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.brand-card .card-tags span { font-size: 0.65em; background: rgba(255,255,255,0.18); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,0.2); border-radius: 10px; padding: 2px 8px; color: white; }

/* ===== Episode Cards ===== */
.episode-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.episode-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid rgba(0,0,0,0.04);
}
.episode-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.episode-card-visual {
  height: 100px;
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.episode-card-visual::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 30px;
  background: linear-gradient(transparent, rgba(0,0,0,0.12));
}
.episode-badge { position: absolute; top: 8px; right: 8px; background: rgba(255,255,255,0.35); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,0.4); border-radius: 20px; padding: 2px 8px; font-size: 0.62em; font-weight: 700; color: white; }
.emoji-main { font-size: 2.8em; line-height: 1; filter: drop-shadow(0 2px 5px rgba(0,0,0,0.15)); position: relative; z-index: 1; }
.episode-card-body { padding: 12px 14px 14px; }
.episode-card-title { font-size: 0.83em; font-weight: 700; color: var(--text); line-height: 1.4; }
.episode-card-meta { margin-top: 6px; }
.episode-card-meta span { font-size: 0.65em; background: #f4f6f8; padding: 2px 7px; border-radius: 8px; color: var(--muted); font-weight: 500; }

/* Section colors */
.episode-card.dino .episode-card-visual { background: linear-gradient(135deg, #2d6a4f, #52b788); }
.episode-card.ranran .episode-card-visual { background: linear-gradient(135deg, #9d4edd, #c77dff); }
.episode-card.jiajia .episode-card-visual { background: linear-gradient(135deg, #7b2cbf, #9d4edd); }
.episode-card.tech .episode-card-visual { background: linear-gradient(135deg, #1d3557, #457b9d); }
.episode-card.math .episode-card-visual { background: linear-gradient(135deg, #0077b6, #00b4d8); }
.episode-card.flute .episode-card-visual { background: linear-gradient(135deg, #e07a5f, #f4a261); }
.episode-card.chinese .episode-card-visual { background: linear-gradient(135deg, #c9184a, #e5383b); }

/* ===== Breadcrumb ===== */
.breadcrumb { max-width: 1100px; margin: 18px auto 0; padding: 0 24px; font-size: 0.82em; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }

/* ===== Page Header ===== */
.page-header { max-width: 1100px; margin: 18px auto; padding: 0 24px; }
.page-header-inner { padding: 32px 36px; border-radius: var(--radius); color: white; }
.page-header h1 { font-size: 1.7em; font-weight: 800; }
.page-header.dino .page-header-inner { background: linear-gradient(135deg, #2d6a4f, #52b788); }
.page-header.ranran .page-header-inner { background: linear-gradient(135deg, #9d4edd, #c77dff); }
.page-header.jiajia .page-header-inner { background: linear-gradient(135deg, #7b2cbf, #9d4edd); }
.page-header.tech .page-header-inner { background: linear-gradient(135deg, #1d3557, #457b9d); }
.page-header.math .page-header-inner { background: linear-gradient(135deg, #0077b6, #00b4d8); }
.page-header.flute .page-header-inner { background: linear-gradient(135deg, #e07a5f, #f4a261); }
.page-header.chinese .page-header-inner { background: linear-gradient(135deg, #c9184a, #e5383b); }

/* ===== Content ===== */
.content { max-width: 1100px; margin: 0 auto; padding: 0 24px 40px; }

/* ===== Article ===== */
.article-body { background: white; border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); max-width: 800px; margin: 0 auto; }
.article-body h1 { font-size: 1.65em; font-weight: 800; color: var(--text); margin-bottom: 10px; line-height: 1.3; }
.article-body h2 { font-size: 1.2em; color: var(--text); margin: 24px 0 10px; padding-left: 10px; border-left: 3px solid var(--dino); font-weight: 700; }
.article-body h3 { font-size: 1em; color: var(--text); margin: 18px 0 8px; font-weight: 700; }
.article-body p { margin: 10px 0; line-height: 1.9; color: #444; }
.article-body table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.88em; }
.article-body th { background: #f4f6f8; padding: 8px 12px; text-align: left; font-weight: 700; border-bottom: 2px solid #e0e0e0; }
.article-body td { padding: 7px 12px; border-bottom: 1px solid #f0f0f0; }
.article-body hr { border: none; border-top: 1.5px solid #f0f0f0; margin: 24px 0; }

/* ===== Footer ===== */
.site-footer { background: #1a1a1a; color: rgba(255,255,255,0.5); text-align: center; padding: 32px 24px; margin-top: 50px; }
.site-footer a { color: rgba(255,255,255,0.5); text-decoration: none; }
.site-footer a:hover { color: white; }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 24px; padding: 9px 18px; background: #f4f6f8; border-radius: var(--radius); text-decoration: none; color: var(--muted); font-size: 0.85em; }
.back-link:hover { background: #e9ecef; color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 900px) { .brand-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .brand-grid { grid-template-columns: 1fr; }
  .episode-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 1.7em; }
  .nav-links { display: none; }
  .hero-kids { flex-direction: column; align-items: center; }
}
