/* 富京AI — Precision Learning Interface */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  --primary: #147a7e;
  --primary-dark: #0c5055;
  --primary-light: #dff4f2;
  --primary-ghost: rgba(20, 122, 126, 0.08);

  --secondary: #e05f3f;
  --secondary-dark: #ba4329;
  --secondary-light: #fff0ea;

  --accent: #d8a22a;
  --accent-light: #fff5d8;

  --signal: #6fae3f;
  --signal-light: #edf7e8;

  --bg: #f6f3ec;
  --bg-warm: #ebe5d9;
  --white: #ffffff;
  --surface: #fffdf8;
  --surface-strong: #f1ebdf;
  --ink: #17201f;
  --text: #1f2c2b;
  --text-light: #677574;
  --text-muted: #98a3a1;
  --border: #ded7ca;
  --border-light: #ece5d8;

  /* Feedback */
  --success: #4f9147;
  --error: #bd4c32;
  --warning: #d8a22a;
  --info: #147a7e;

  --shadow: 0 10px 30px rgba(31, 44, 43, 0.08);
  --shadow-hover: 0 18px 44px rgba(31, 44, 43, 0.14);
  --shadow-sm: 0 2px 10px rgba(31, 44, 43, 0.06);
  --shadow-lg: 0 28px 70px rgba(31, 44, 43, 0.16);

  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --radius-pill: 100px;

  --transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
  --transition-smooth: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Noise texture overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.018;
  z-index: 9999;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

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

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(20, 122, 126, 0.12), transparent 32rem),
    radial-gradient(circle at 85% 18%, rgba(216, 162, 42, 0.12), transparent 28rem),
    linear-gradient(180deg, #fbf8f1 0%, var(--bg) 38%, #f3efe6 100%);
  color: var(--text);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  line-height: 1.3;
  text-wrap: balance;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== NAVBAR ===== */
.navbar {
  background: rgba(251, 248, 241, 0.82);
  backdrop-filter: blur(22px) saturate(1.18);
  -webkit-backdrop-filter: blur(22px) saturate(1.18);
  box-shadow: 0 1px 0 rgba(31, 44, 43, 0.07);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--border-light);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.navbar .logo {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .logo .logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--ink), var(--primary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 8px 20px rgba(20, 122, 126, 0.22);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-menu a {
  padding: 8px 13px;
  border-radius: var(--radius-sm);
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #5f6f6d;
  transition: var(--transition-smooth);
}

.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(20, 122, 126, 0.1);
  color: var(--primary-dark);
}

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

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 28px;
  border-radius: var(--radius-pill);
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  gap: 8px;
  letter-spacing: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  box-shadow: 0 10px 22px rgba(20, 122, 126, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #083f43, var(--primary));
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(20, 122, 126, 0.3);
}

.btn-outline {
  background: rgba(255, 253, 248, 0.64);
  color: var(--primary-dark);
  border: 1px solid rgba(20, 122, 126, 0.26);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(74, 124, 89, 0.3);
}

.btn-sm {
  padding: 7px 18px;
  font-size: 13px;
}

.btn-lg {
  padding: 15px 40px;
  font-size: 16px;
}

.btn-success {
  background: var(--success);
  color: white;
  box-shadow: 0 4px 16px rgba(90, 158, 111, 0.3);
}

.btn-success:hover {
  background: #4d8c5f;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(212, 165, 116, 0.3);
}

.btn-accent:hover {
  background: #c49564;
  transform: translateY(-2px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.menu-toggle:hover {
  background: var(--primary-light);
}

/* ===== FOOTER ===== */
.footer {
  background: #192321;
  color: #b7c4bf;
  padding: 70px 0 32px;
  margin-top: 100px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,60 C320,14 620,52 920,20 C1160,-4 1300,22 1440,10 L1440,60 L0,60 Z' fill='%23192321'/%3E%3C/svg%3E") no-repeat center bottom;
  background-size: cover;
}

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

.footer h4 {
  color: #e8f0e4;
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
}

.footer p {
  font-size: 14px;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #b8c4b0;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: #e8f0e4;
  padding-left: 4px;
}

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

/* ===== CARDS ===== */
.card {
  background: rgba(255, 253, 248, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition-smooth);
  overflow: hidden;
  border: 1px solid rgba(31, 44, 43, 0.08);
}

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

/* ===== TAGS ===== */
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 5px;
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.tag-blue {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.tag-green {
  background: var(--signal-light);
  color: #3d722e;
}

.tag-purple {
  background: var(--accent-light);
  color: #906915;
}

.tag-orange {
  background: #fef0e4;
  color: #a05236;
}

.tag-coral {
  background: var(--secondary-light);
  color: var(--error);
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  margin-bottom: 52px;
}

.section-header h2 {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 34px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.section-header p {
  font-size: 16px;
  color: var(--text-light);
}

.section-header .line {
  width: 68px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 0;
  margin: 18px auto 0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--signal));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(44, 62, 45, 0.4);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 36px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.modal h3 {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 80px;
  right: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transform: translateX(120%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  border: 1px solid var(--border-light);
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--success);
}

.toast.error {
  border-left: 4px solid var(--error);
}

.toast.info {
  border-left: 4px solid var(--info);
}

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

.form-group label {
  display: block;
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 15px;
  outline: none;
  transition: var(--transition-smooth);
  background: var(--white);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.1);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination button {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--white);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
}

.pagination button:hover,
.pagination button.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.3);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.empty-state .icon {
  font-size: 56px;
  margin-bottom: 16px;
}

/* ===== PAGE BANNER ===== */
.page-banner {
  padding: 58px 0;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-banner h1 {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-banner p {
  font-size: 16px;
  opacity: 0.9;
}

/* ===== FILTER BAR ===== */
.filter-bar {
  background: rgba(255, 253, 248, 0.88);
  border-radius: var(--radius);
  padding: 20px 28px;
  margin: -30px auto 40px;
  position: relative;
  z-index: 10;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border: 1px solid var(--border-light);
}

.filter-bar .label {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-right: 4px;
}

.filter-btn, .filter-tag {
  padding: 7px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 253, 248, 0.8);
  font-family: 'Outfit', 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-light);
}

.filter-btn:hover, .filter-tag:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active, .filter-tag.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(74, 124, 89, 0.25);
}

/* ===== REDESIGN OVERRIDES ===== */
.page-banner {
  background:
    linear-gradient(135deg, rgba(23, 32, 31, 0.92), rgba(20, 122, 126, 0.88)),
    radial-gradient(circle at 80% 20%, rgba(216, 162, 42, 0.34), transparent 18rem) !important;
  border-bottom: 1px solid rgba(31, 44, 43, 0.08);
}

.page-banner::before {
  border-radius: 0 !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.1) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  width: 320px !important;
  height: 320px !important;
  opacity: 0.55;
}

.price,
.price-cell,
.class-price,
.course-card .price,
.product-card .price,
.item-price {
  color: var(--secondary) !important;
  font-variant-numeric: tabular-nums;
}

.login-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(20, 122, 126, 0.13), transparent 24rem),
    linear-gradient(180deg, #fbf8f1 0%, var(--bg) 100%) !important;
}

.login-card {
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow-lg) !important;
}

.login-left {
  background:
    linear-gradient(135deg, rgba(23, 32, 31, 0.94), rgba(20, 122, 126, 0.88)),
    radial-gradient(circle at 20% 20%, rgba(216, 162, 42, 0.28), transparent 20rem) !important;
}

.cart-btn {
  background: linear-gradient(135deg, var(--ink), var(--primary)) !important;
  border-radius: 16px !important;
}

h1, h2, h3, h4, h5, h6,
.btn,
.tab,
.filter-btn,
.filter-tag,
.tag,
.price,
.class-price,
.course-price,
.product-price,
.exam-timer,
.result-score,
.q-dot,
.option-letter {
  font-family: 'Outfit', 'Noto Sans SC', sans-serif !important;
}

.card,
.course-card,
.product-card,
.news-card,
.class-card,
.sidebar-card,
.login-card,
.cart-panel,
.modal {
  border-radius: var(--radius) !important;
}

.filter-btn,
.filter-tag,
.type-tag,
.status-tag {
  border-radius: 5px !important;
}

button,
a,
input,
select,
textarea {
  font: inherit;
}

/* ===== WAVE DIVIDER ===== */
.wave-divider {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  margin-top: -1px;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 60px;
}

.wave-divider.flip {
  transform: scaleY(-1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    width: 100%;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow);
    gap: 0;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .nav-menu.show {
    display: flex;
  }

  .nav-menu a {
    padding: 12px 16px;
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .nav-right .btn {
    display: none;
  }

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

  .section-header h2 {
    font-size: 26px;
  }

  .container {
    padding: 0 16px;
  }
}

@media (max-width: 768px) {
  .page-banner h1 { font-size: 26px; }
  .section-header h2 { font-size: 22px; }
  .section-header { margin-bottom: 36px; }
  .footer { margin-top: 60px; padding: 50px 0 24px; }
}
