/* ===== Design Tokens ===== */
:root {
  --primary: #7B61FF;
  --primary-light: #9B87F5;
  --primary-dark: #5B47D4;
  --accent-pink: #FF97C1;
  --accent-pink-light: #FFB8D6;
  --accent-blue: #4FC3F7;
  --accent-blue-light: #81D8FA;
  --bg-light: #FAFAFA;
  --text-gray: #888888;
  --text-dark: #333333;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 12px rgba(123, 97, 255, 0.08);
  --shadow-md: 0 4px 20px rgba(123, 97, 255, 0.12);
  --shadow-lg: 0 8px 40px rgba(123, 97, 255, 0.15);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 280ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 330ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.25;
  color: var(--text-dark);
}

p { color: var(--text-gray); line-height: 1.65; }

a { text-decoration: none; color: inherit; transition: color var(--transition); }

img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container { padding: 0 2rem; }
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(123,97,255,0.08);
  transition: all var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .header-inner { padding: 0 2rem; }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--primary);
}

.logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.nav { display: flex; align-items: center; gap: 4px; }

.nav-link {
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(123,97,255,0.06);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.menu-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ===== Hero Banner ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, #F5F0FF 0%, #FFF0F5 30%, #F0F7FF 60%, #FAFAFA 100%);
  overflow: hidden;
  padding-top: 72px;
}

.hero-bg-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(123,97,255,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.12;
}

.hero-shape-1 {
  width: 400px; height: 400px;
  background: var(--accent-pink);
  top: -100px; right: -100px;
}

.hero-shape-2 {
  width: 300px; height: 300px;
  background: var(--accent-blue);
  bottom: -50px; left: -80px;
}

.hero-shape-3 {
  width: 200px; height: 200px;
  background: var(--primary);
  top: 50%; left: 10%;
}

.hero-content { position: relative; z-index: 10; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  background: rgba(123,97,255,0.08);
  border: 1px solid rgba(123,97,255,0.15);
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.3px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-gray);
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  box-shadow: 0 4px 16px rgba(123,97,255,0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(123,97,255,0.4);
  filter: brightness(1.08);
}

.btn-pink {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-pink-light));
  color: white;
  box-shadow: 0 4px 16px rgba(255,151,193,0.3);
}

.btn-pink:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,151,193,0.4);
  filter: brightness(1.08);
}

.btn-white {
  background: white;
  color: var(--primary);
  border: 1px solid rgba(123,97,255,0.15);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ===== Section ===== */
.section { padding: 2.5rem 0; }

@media (min-width: 768px) {
  .section { padding: 4rem 0; }
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-subtitle {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  background: rgba(123,97,255,0.06);
  border-radius: 50px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== Cards ===== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  overflow: hidden;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(123,97,255,0.15);
}

.card-img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.card-body { padding: 20px; }

.card-tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 12px;
}

.card-tag.purple { background: rgba(123,97,255,0.08); color: var(--primary); }
.card-tag.pink { background: rgba(255,151,193,0.1); color: #E91E63; }
.card-tag.blue { background: rgba(79,195,247,0.1); color: #0288D1; }

.card h4 { font-size: 18px; margin-bottom: 8px; }

.card p { font-size: 14px; }

/* ===== Feature / Advantage Item ===== */
.feature-item {
  display: flex;
  gap: 16px;
  padding: 24px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid rgba(123,97,255,0.06);
  transition: all var(--transition);
}

.feature-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: rgba(123,97,255,0.12);
}

.feature-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.feature-icon.purple { background: rgba(123,97,255,0.1); color: var(--primary); }
.feature-icon.pink { background: rgba(255,151,193,0.12); color: var(--accent-pink); }
.feature-icon.blue { background: rgba(79,195,247,0.12); color: var(--accent-blue); }

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.stat-item {
  text-align: center;
  padding: 32px 16px;
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.06);
  transition: all var(--transition);
}

.stat-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.3px;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label { font-size: 14px; color: var(--text-gray); margin-top: 8px; }

/* ===== Course Grid ===== */
.course-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.course-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--accent-pink), var(--accent-blue));
  transform: scaleX(0);
  transition: transform var(--transition-slow);
}

.course-card:hover::before { transform: scaleX(1); }

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.course-card .age-tag {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(123,97,255,0.08);
  color: var(--primary);
  border-radius: 50px;
  margin-bottom: 16px;
}

.course-card h4 { font-size: 20px; margin-bottom: 10px; }

.course-card .course-meta {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(123,97,255,0.06);
}

.course-meta span {
  font-size: 13px;
  color: var(--text-gray);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== Teacher Card ===== */
.teacher-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  padding: 32px 24px;
  text-align: center;
  transition: all var(--transition);
}

.teacher-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.teacher-avatar {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--primary), var(--accent-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: white;
}

.teacher-card h4 { font-size: 18px; margin-bottom: 4px; }
.teacher-card .role { font-size: 13px; color: var(--primary); font-weight: 500; margin-bottom: 12px; }
.teacher-card .desc { font-size: 14px; margin-bottom: 16px; }

/* ===== Work Gallery ===== */
.work-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  overflow: hidden;
  transition: all var(--transition);
  cursor: pointer;
}

.work-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.work-card-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: linear-gradient(135deg, #F5F0FF, #FFF0F5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.work-card-body {
  padding: 16px;
}

.work-card-body h5 { font-size: 15px; margin-bottom: 4px; }

.work-card-body .author {
  font-size: 12px;
  color: var(--text-gray);
}

/* ===== Environment Card ===== */
.env-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  overflow: hidden;
  transition: all var(--transition);
}

.env-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.env-card-img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #F0F7FF, #F5F0FF);
}

.env-card-body { padding: 20px; }

/* ===== News Card ===== */
.news-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  padding: 24px;
  transition: all var(--transition);
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card .date {
  font-size: 13px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.news-card h4 {
  font-size: 18px;
  margin-bottom: 8px;
  line-height: 1.4;
}

.news-card p { font-size: 14px; }

/* ===== CTA Section ===== */
.cta-section {
  background: linear-gradient(135deg, var(--primary), #6B4FD4);
  border-radius: var(--radius-xl);
  padding: 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin: 0 1rem;
}

@media (min-width: 768px) {
  .cta-section { padding: 64px; margin: 0 auto; max-width: 1280px; }
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,151,193,0.15), transparent 60%),
              radial-gradient(circle at 70% 30%, rgba(79,195,247,0.12), transparent 60%);
}

.cta-section > * { position: relative; }

.cta-section h3 {
  font-size: clamp(24px, 4vw, 34px);
  color: white;
  margin-bottom: 12px;
}

.cta-section p {
  color: rgba(255,255,255,0.8);
  margin-bottom: 32px;
}

/* ===== Testimonial ===== */
.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(123,97,255,0.08);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 12px; right: 24px;
  font-size: 64px;
  color: rgba(123,97,255,0.08);
  line-height: 1;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

/* ===== Floating Customer Service ===== */
.float-cs {
  position: fixed;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.float-cs-item {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  font-size: 20px;
  box-shadow: 0 2px 12px rgba(123,97,255,0.15);
}

.float-cs-item.tel {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

.float-cs-item.email {
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
  color: white;
}

.float-cs-item.wechat {
  background: linear-gradient(135deg, var(--accent-pink), var(--accent-pink-light));
  color: white;
}

.float-cs-item:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 20px rgba(123,97,255,0.25);
}

.float-cs-popup {
  position: absolute;
  right: 60px;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-lg);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  pointer-events: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dark);
  border: 1px solid rgba(123,97,255,0.08);
}

.float-cs-item:hover .float-cs-popup {
  opacity: 1;
  visibility: visible;
}

.float-cs-qr {
  width: 120px; height: 120px;
  background: rgba(123,97,255,0.05);
  border: 2px dashed rgba(123,97,255,0.2);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-gray);
  text-align: center;
  line-height: 1.4;
}

/* ===== Footer ===== */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer h5 {
  color: white;
  font-size: 16px;
  margin-bottom: 20px;
}

.footer a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer a:hover { color: white; }

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin-bottom: 12px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 13px;
}

/* ===== Page Hero (inner pages) ===== */
.page-hero {
  background: linear-gradient(160deg, #F5F0FF 0%, #FFF0F5 50%, #F0F7FF 100%);
  padding: 120px 0 60px;
  text-align: center;
  position: relative;
}

.page-hero h2 {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 12px;
}

.page-hero .breadcrumb {
  font-size: 14px;
  color: var(--text-gray);
}

.page-hero .breadcrumb a { color: var(--primary); }
.page-hero .breadcrumb a:hover { text-decoration: underline; }

/* ===== Form Styles ===== */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(123,97,255,0.12);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-dark);
  background: white;
  transition: all var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(123,97,255,0.08);
}

.form-group textarea { min-height: 120px; resize: vertical; }

.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }

/* ===== Filter Tabs ===== */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 32px;
}

.filter-tab {
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 50px;
  border: 1px solid rgba(123,97,255,0.12);
  background: white;
  color: var(--text-dark);
  cursor: pointer;
  transition: all var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
  background: rgba(123,97,255,0.06);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 16px;
    gap: 4px;
    border-bottom: 1px solid rgba(123,97,255,0.08);
    box-shadow: var(--shadow-md);
    transform: translateY(-110%);
    transition: transform var(--transition);
    z-index: 999;
  }

  .nav.open { transform: translateY(0); }

  .nav-link { width: 100%; text-align: center; padding: 12px; }

  .menu-toggle { display: flex; }

  .footer-grid { grid-template-columns: 1fr; }

  .float-cs { right: 8px; gap: 6px; }
  .float-cs-item { width: 42px; height: 42px; font-size: 18px; }
}

@media (max-width: 640px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-number { font-size: 28px; }
  .hero-btns { flex-direction: column; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: rgba(123,97,255,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(123,97,255,0.35); }
