/* ===== Lilyleo.art — Two-Column Kids Portal ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --lily: #7b2cbf; --lily-light: #9d4edd;
  --leo: #2d6a4f; --leo-light: #52b788;
  --bg: #f5f7fa; --text: #1a1a1a; --muted: #888;
  --shadow: 0 2px 10px rgba(0,0,0,0.07); --shadow-lg: 0 6px 24px rgba(0,0,0,0.12);
  --radius: 14px;
}
body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.6;
}

/* ===== Top Bar ===== */
.topbar {
  background: linear-gradient(135deg, #667eea, #764ba2);
  padding: 0 32px; height: 60px;
  display: flex; align-items: center; box-shadow: 0 2px 12px rgba(102,126,234,0.3);
}
.topbar-inner { max-width: 1200px; margin: 0 auto; width: 100%; display: flex; align-items: center; gap: 12px; }
.topbar-logo { display: flex; align-items: center; gap: 8px; font-size: 1.15em; font-weight: 800; color: white; text-decoration: none; letter-spacing: 0.02em; }
.topbar-logo .emoji { font-size: 1.3em; }
.topbar-desc { color: rgba(255,255,255,0.85); font-size: 0.82em; margin-left: 8px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }
.topbar-actions a {
  padding: 5px 14px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.4);
  color: white; text-decoration: none; font-size: 0.8em; font-weight: 600;
  transition: all 0.2s; background: rgba(255,255,255,0.1);
}
.topbar-actions a:hover { background: rgba(255,255,255,0.25); }

/* ===== Main Nav ===== */
.main-nav { background: white; border-bottom: 2px solid #eee; padding: 0 32px; }
.main-nav-inner { max-width: 1200px; margin: 0 auto; display: flex; }
.main-nav a {
  padding: 13px 22px; font-size: 0.9em; font-weight: 600; color: #555;
  text-decoration: none; border-bottom: 3px solid transparent;
  transition: all 0.2s; white-space: nowrap;
}
.main-nav a:hover { color: #7b2cbf; border-bottom-color: #7b2cbf; background: #f8f5ff; }
.main-nav a.active { color: #7b2cbf; border-bottom-color: #7b2cbf; }

/* ===== Container ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 28px 24px 40px; }

/* ===== Two-Column Kids Layout ===== */
.kids-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ===== Kid Section ===== */
.kid-section { }
.kid-header {
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 10px;
}
.kid-header.lily { background: linear-gradient(135deg, var(--lily), var(--lily-light)); }
.kid-header.leo { background: linear-gradient(135deg, var(--leo), var(--leo-light)); }
.kid-header-icon { font-size: 1.6em; }
.kid-header-title { font-size: 1.05em; font-weight: 800; color: white; }
.kid-header-sub { font-size: 0.75em; color: rgba(255,255,255,0.8); }
.kid-header-tag {
  margin-left: auto; background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.35);
  border-radius: 20px; padding: 3px 10px; font-size: 0.7em; color: white; font-weight: 600;
}
.kid-body {
  background: white; border-radius: 0 0 var(--radius) var(--radius);
  padding: 14px; box-shadow: var(--shadow);
}

/* ===== Module Grid ===== */
.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.module-card {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: 1px solid #f0f0f0;
  transition: all 0.22s; cursor: pointer; text-decoration: none; color: inherit;
  display: block; background: #fafafa;
}
.module-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); background: white; }
.module-card-inner { padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.module-icon { font-size: 1.6em; flex-shrink: 0; }
.module-info { flex: 1; }
.module-title { font-size: 0.85em; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.module-desc { font-size: 0.7em; color: var(--muted); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.module-arrow { font-size: 0.9em; color: #ccc; margin-left: auto; flex-shrink: 0; }

/* Lily accent colors */
.module-card.lily-tech { border-left: 3px solid #2980b9; }
.module-card.lily-tech .module-icon { color: #2980b9; }
.module-card.lily-reading { border-left: 3px solid #27ae60; }
.module-card.lily-reading .module-icon { color: #27ae60; }
.module-card.lily-math { border-left: 3px solid #16a085; }
.module-card.lily-math .module-icon { color: #16a085; }
.module-card.lily-english { border-left: 3px solid #8e44ad; }
.module-card.lily-english .module-icon { color: #8e44ad; }
.module-card.lily-flute { border-left: 3px solid #c0392b; }
.module-card.lily-flute .module-icon { color: #c0392b; }
.module-card.lily-chinese { border-left: 3px solid #d35400; }
.module-card.lily-chinese .module-icon { color: #d35400; }

/* Leo accent colors */
.module-card.leo-dino { border-left: 3px solid #27ae60; }
.module-card.leo-dino .module-icon { color: #27ae60; }
.module-card.leo-english { border-left: 3px solid #8e44ad; }
.module-card.leo-english .module-icon { color: #8e44ad; }
.module-card.leo-chinese { border-left: 3px solid #d35400; }
.module-card.leo-chinese .module-icon { color: #d35400; }

/* ===== Banner ===== */
.banner {
  position: relative; border-radius: var(--radius); overflow: hidden;
  height: 280px; margin-bottom: 20px;
  background: #1a1a2e;
}
.banner-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 0.8s; }
.banner-slide.active { opacity: 1; }
.banner-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(15,52,96,0.7) 0%, rgba(91,44,111,0.6) 100%);
}
.banner-content {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: white; text-align: center; z-index: 2;
}
.banner-content h2 { font-size: 1.9em; font-weight: 800; margin-bottom: 10px; }
.banner-content p { font-size: 0.95em; opacity: 0.85; max-width: 460px; margin: 0 auto 16px; }
.banner-kids { display: flex; gap: 12px; justify-content: center; }
.banner-kid {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.18); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3); border-radius: 50px;
  padding: 7px 18px; color: white; text-decoration: none; font-size: 0.83em; font-weight: 600;
  transition: all 0.2s;
}
.banner-kid:hover { background: rgba(255,255,255,0.28); }
.banner-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; z-index: 3; }
.banner-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,0.4); cursor: pointer; transition: all 0.3s; }
.banner-dot.active { background: white; width: 24px; border-radius: 5px; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15);
  border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; z-index: 3;
  display: flex; align-items: center; justify-content: center; color: white; font-size: 1.1em;
  transition: background 0.2s;
}
.banner-arrow:hover { background: rgba(255,255,255,0.28); }
.banner-arrow.prev { left: 14px; }
.banner-arrow.next { right: 14px; }

/* ===== Section Title ===== */
.section-title {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid #e8e8e8;
}
.section-title h2 { font-size: 1.35em; font-weight: 800; color: var(--text); }

/* ===== News Cards ===== */
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin-bottom: 28px;
}
.news-card {
  background: white; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid #f0f0f0;
  transition: all 0.2s; cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.news-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.news-card-img { height: 100px; overflow: hidden; background: #ddd; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.news-card:hover .news-card-img img { transform: scale(1.06); }
.news-card-body { padding: 11px 13px 13px; }
.news-card-tag {
  display: inline-block; border-radius: 8px; padding: 1px 7px; font-size: 0.65em; font-weight: 700; margin-bottom: 5px;
}
.news-card-tag.lily { background: #f3e8ff; color: #7b2cbf; }
.news-card-tag.leo { background: #d8f3dc; color: #27ae60; }
.news-card-title {
  font-size: 0.82em; font-weight: 700; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-meta { font-size: 0.68em; color: #bbb; margin-top: 5px; }

/* ===== Footer ===== */
.site-footer { background: #1a1a2e; color: rgba(255,255,255,0.5); text-align: center; padding: 32px 24px; margin-top: 40px; }
.site-footer a { color: rgba(255,255,255,0.5); text-decoration: none; }
.site-footer a:hover { color: white; }
.site-footer p { font-size: 0.85em; }

/* Stats Bar */
.stats-bar { background: white; border-radius: 50px; box-shadow: 0 2px 10px rgba(0,0,0,0.07); padding: 14px 32px; display: flex; justify-content: center; margin-bottom: 24px; border: 1px solid #f0f0f0; }
.stats-inner { display: flex; align-items: center; gap: 24px; }
.stat-item { display: flex; align-items: center; gap: 8px; }
.stat-number { font-size: 1.35em; font-weight: 800; color: #7b2cbf; font-family: Arial, sans-serif; letter-spacing: 0.03em; }
.stat-label { font-size: 0.8em; color: var(--muted); font-weight: 600; }
.stat-divider { color: #ddd; font-size: 1.2em; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .kids-layout { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .banner { height: 220px; }
  .banner-content h2 { font-size: 1.5em; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: 1fr; }
  .main-nav a { padding: 11px 12px; font-size: 0.8em; }
  .module-grid { grid-template-columns: 1fr; }
  .banner { height: 200px; }
}