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

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

:root {
  --bg: #FAF8F5;
  --card-bg: #FFFFFF;
  --text: #3D3929;
  --text-light: #6B6455;
  --sage: #7C9A8E;
  --sage-light: #dce8e1;
  --sage-dark: #4c665b;
  --amber: #D4A574;
  --amber-light: #E8C9A0;
  --amber-dark: #B8865A;
  --lavender: #B8A9C9;
  --lavender-light: #D8CEE6;
  --rose-soft: #E8B4B8;
  --border: #E8E2DA;
  --shadow-sm: 0 1px 3px rgba(61,57,41,0.06);
  --shadow-md: 0 4px 12px rgba(61,57,41,0.08);
  --shadow-lg: 0 8px 24px rgba(61,57,41,0.12);
  --radius: 12px;
  --radius-lg: 16px;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', Georgia, serif;
  --font-sans: 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250,248,245,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232,226,218,0.5);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.brand-icon { font-size: 24px; }

.brand-name {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text);
  transition: color 0.2s;
}

.brand:hover .brand-name { color: var(--sage); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--text-light);
  overflow-x: auto;
  white-space: nowrap;
  padding-bottom: 4px;
}

.nav-links a {
  transition: color 0.2s;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-links a:hover, .nav-links a.active { color: var(--sage); }

/* ===== Mobile Nav ===== */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(250,248,245,0.97);
    backdrop-filter: blur(12px);
    padding: 16px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }
  .mobile-menu-btn { display: block; }
}

/* ===== Main Content ===== */
.main-content {
  flex: 1;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px;
  width: 100%;
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid rgba(232,226,218,0.5);
  padding: 32px 24px;
  margin-top: 48px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 14px;
  color: var(--text-light);
}

.footer-tagline {
  font-size: 12px;
  color: var(--text-light);
  opacity: 0.6;
  margin-top: 8px;
}

/* ===== Typography ===== */
.font-serif { font-family: var(--font-serif); }

h1, h2, h3 { font-family: var(--font-serif); }

/* ===== Welcome Section ===== */
.welcome-section {
  text-align: center;
  margin-bottom: 48px;
}

.welcome-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text);
}

.welcome-title .highlight { color: var(--sage); }

.welcome-subtitle {
  font-size: 18px;
  color: var(--text-light);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}

.learned-count {
  margin-top: 12px;
  font-size: 14px;
  color: var(--sage);
}

/* ===== Section Title ===== */
.section-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .icon { font-size: 16px; }

/* ===== Today's Recommendation Card ===== */
.today-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid rgba(232,226,218,0.6);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 48px;
}

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

.today-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.today-card-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.today-card-english {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.today-card-icon { font-size: 32px; }

.today-card-quote {
  font-size: 18px;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 16px;
}

.today-card-summary {
  color: var(--text-light);
  line-height: 1.8;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.today-card-footer {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.category-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-emotion { background: #ecfdf5; color: #047857; }
.badge-relationship { background: #fff1f2; color: #be123c; }
.badge-workplace { background: #fffbeb; color: #b45309; }
.badge-self { background: #f5f3ff; color: #6d28d9; }

.read-more {
  font-size: 14px;
  color: var(--sage);
}

/* ===== Random Button ===== */
.random-section {
  text-align: center;
  margin-bottom: 48px;
}

.random-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--amber);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.random-btn:hover {
  background: var(--amber-dark);
  box-shadow: var(--shadow-lg);
}

.random-btn:active { transform: scale(0.95); }

@keyframes bounce-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.random-btn.bouncing { animation: bounce-soft 0.6s ease; }

.random-result {
  margin-top: 24px;
  display: inline-block;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px 24px;
  border: 1px solid rgba(212,165,116,0.3);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
  max-width: 480px;
  text-align: left;
}

.random-result:hover {
  box-shadow: var(--shadow-md);
}

.random-result-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.random-result-quote {
  font-size: 14px;
  color: var(--text-light);
  font-style: italic;
  margin-top: 4px;
}

.random-result-hint {
  font-size: 13px;
  color: var(--amber);
  margin-top: 8px;
}

/* ===== Category Grid ===== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

@media (max-width: 640px) {
  .category-grid { grid-template-columns: repeat(2, 1fr); }
}

.category-card {
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.category-card .icon { font-size: 32px; display: block; margin-bottom: 8px; }
.category-card .label { font-weight: 500; font-size: 15px; }

.cat-emotion { background: #ecfdf5; border-color: #a7f3d0; }
.cat-emotion .label { color: #047857; }
.cat-relationship { background: #fff1f2; border-color: #fecdd3; }
.cat-relationship .label { color: #be123c; }
.cat-workplace { background: #fffbeb; border-color: #fde68a; }
.cat-workplace .label { color: #b45309; }
.cat-self { background: #f5f3ff; border-color: #ddd6fe; }
.cat-self .label { color: #6d28d9; }

/* ===== Law Cards Grid ===== */
.law-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .law-grid { grid-template-columns: 1fr; }
}

.law-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid rgba(232,226,218,0.5);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.law-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.law-card-info { flex: 1; min-width: 0; }

.law-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.law-card-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.2s;
}

.law-card:hover .law-card-name { color: var(--sage); }

.law-card-quote {
  font-size: 13px;
  color: var(--text-light);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.law-card-icon { font-size: 20px; flex-shrink: 0; margin-left: 12px; }

.status-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 500;
  white-space: nowrap;
}

.status-learned { background: #ecfdf5; color: #047857; }
.status-fav { font-size: 12px; }

/* ===== Category Page ===== */
.category-header {
  text-align: center;
  margin-bottom: 40px;
}

.category-header .icon { font-size: 48px; display: block; margin-bottom: 16px; }

.category-header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}

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

.category-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.category-nav-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.category-nav-btn:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
}

.category-nav-btn.active {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

.category-laws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .category-laws-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .category-laws-grid { grid-template-columns: 1fr; }
}

.category-law-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid rgba(232,226,218,0.5);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.category-law-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
  transition: color 0.2s;
}

.category-law-card:hover h3 { color: var(--sage); }

.category-law-card .english { font-size: 12px; color: var(--text-light); margin-bottom: 12px; }

.category-law-card .quote {
  font-size: 14px;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: 12px;
}

.category-law-card .summary {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.category-law-card .read-link {
  margin-top: 16px;
  font-size: 14px;
  color: var(--sage);
  transition: color 0.2s;
}

.category-law-card:hover .read-link { color: var(--sage-dark); }

/* ===== Detail Page ===== */
.breadcrumb {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 32px;
}

.breadcrumb a { cursor: pointer; transition: color 0.2s; }
.breadcrumb a:hover { color: var(--sage); }
.breadcrumb .sep { margin: 0 8px; }
.breadcrumb .current { color: var(--text); }

.detail-header { margin-bottom: 32px; }

.detail-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.action-btn {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-light);
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover { border-color: var(--sage); }

.action-btn.active-learned {
  background: var(--sage);
  color: #fff;
  border-color: var(--sage);
}

.action-btn.active-fav {
  background: var(--amber);
  color: #fff;
  border-color: var(--amber);
}

.detail-name {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 4px;
}

.detail-english {
  font-size: 14px;
  color: var(--text-light);
}

.detail-quote-box {
  background: rgba(124,154,142,0.06);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(124,154,142,0.15);
  margin-bottom: 32px;
  text-align: center;
}

.detail-quote-box p {
  font-family: var(--font-serif);
  font-size: 20px;
  font-style: italic;
  color: var(--sage-dark);
  line-height: 1.7;
}

/* ===== Content Sections ===== */
.content-section { margin-bottom: 32px; }

.content-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-section h2 .dot { font-size: 14px; }

.content-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid rgba(232,226,218,0.5);
  box-shadow: var(--shadow-sm);
}

.content-box p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text);
}

.content-box.example {
  background: rgba(212,165,116,0.05);
  border-color: rgba(212,165,116,0.2);
}

.content-box.tip {
  background: rgba(184,169,201,0.06);
  border-color: rgba(184,169,201,0.2);
}

/* ===== Related Laws ===== */
.related-section {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid rgba(232,226,218,0.5);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 640px) {
  .related-grid { grid-template-columns: 1fr; }
}

.related-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid rgba(232,226,218,0.5);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}

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

.related-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.related-card-header .icon { font-size: 18px; }

.related-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s;
}

.related-card:hover h3 { color: var(--sage); }

.related-card .quote {
  font-size: 12px;
  color: var(--text-light);
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.detail-nav {
  margin-top: 40px;
  display: flex;
  justify-content: space-between;
}

.detail-nav a {
  font-size: 14px;
  color: var(--sage);
  cursor: pointer;
  transition: color 0.2s;
}

.detail-nav a:hover { color: var(--sage-dark); }

/* ===== Animations ===== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-in-d1 { animation: fadeIn 0.5s ease 0.1s forwards; opacity: 0; }
.fade-in-d2 { animation: fadeIn 0.5s ease 0.2s forwards; opacity: 0; }
.fade-in-d3 { animation: fadeIn 0.5s ease 0.3s forwards; opacity: 0; }

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* ===== Tests Page ===== */
.tests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.test-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.test-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.test-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.test-desc {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.test-meta {
  font-size: 0.8rem;
  color: var(--sage);
  background: var(--sage-light);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.test-container {
  max-width: 600px;
  margin: 2rem auto;
}

.test-intro {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.question-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.question-progress {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.question-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.option-btn {
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-btn:hover {
  border-color: var(--sage);
  background: var(--sage-light);
}

.result-card {
  text-align: center;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
}

.result-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.result-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  color: var(--sage-dark);
  margin-bottom: 1rem;
}

.result-desc {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.result-advice {
  background: var(--sage-light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: left;
}

.result-advice h4 {
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.btn-primary {
  padding: 0.75rem 2rem;
  background: var(--sage);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--sage-dark);
  transform: translateY(-2px);
}

/* ===== Experiments Page ===== */
.experiments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.experiment-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.exp-icon {
  font-size: 2.5rem;
}

.exp-info {
  flex: 1;
}

.exp-name {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.exp-meta {
  font-size: 0.85rem;
  color: var(--text-light);
}

.experiment-detail {
  max-width: 700px;
  margin: 0 auto;
}

.exp-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.exp-icon-large {
  font-size: 4rem;
}

.exp-title-large {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.exp-meta-large {
  font-size: 0.9rem;
  color: var(--text-light);
}

.exp-section {
  margin-bottom: 2rem;
}

.exp-section h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--sage-dark);
  margin-bottom: 0.75rem;
}

.exp-section p {
  line-height: 1.8;
  color: var(--text);
}

/* ===== Scenarios Page ===== */
.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.scenario-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

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

.scenario-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.scenario-desc {
  font-size: 0.9rem;
  color: var(--text-light);
}

.scenario-detail {
  max-width: 700px;
  margin: 0 auto;
}

.scenario-title-large {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.scenario-box {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.scenario-box h3 {
  color: var(--sage-dark);
  margin-bottom: 0.75rem;
}

.scenario-options {
  margin-bottom: 1.5rem;
}

.scenario-options h3 {
  font-family: var(--font-serif);
  margin-bottom: 1rem;
}

.scenario-option-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  margin-bottom: 0.75rem;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.scenario-option-btn:hover {
  border-color: var(--sage);
  background: var(--sage-light);
}

.scenario-answer {
  margin-top: 1.5rem;
}

.answer-box {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border-left: 4px solid var(--sage);
}

.answer-box.best-answer {
  border-left-color: var(--amber);
}

.answer-box h3 {
  color: var(--sage-dark);
  margin-bottom: 1rem;
}

.answer-tip, .answer-advice {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.answer-tip h4, .answer-advice h4 {
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}

.related-law-link {
  color: var(--sage);
  cursor: pointer;
  text-decoration: underline;
}

.related-law-link:hover {
  color: var(--sage-dark);
}

/* ===== Quotes Page ===== */
.quote-featured {
  background: linear-gradient(135deg, var(--sage-light), var(--lavender-light));
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.quote-mark {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: var(--sage);
  opacity: 0.3;
  position: absolute;
  top: 1rem;
  left: 2rem;
}

.quote-text {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.quote-author {
  font-size: 1rem;
  color: var(--text-light);
}

.quotes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.quote-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

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

.quote-card-text {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.quote-card-author {
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== Relations Page ===== */
.relations-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.relation-item {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.relation-law {
  color: var(--sage);
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.relation-law:hover {
  color: var(--sage-dark);
  text-decoration: underline;
}

.relation-arrow {
  color: var(--text-light);
  font-size: 1.2rem;
}

.relation-desc {
  width: 100%;
  font-size: 0.9rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ===== Achievements Page ===== */
.achievement-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--sage-dark);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
}

.progress-bar-container {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sage), var(--amber));
  border-radius: 4px;
  transition: width 0.5s ease;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.achievement-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
}

.achievement-card.unlocked {
  border: 2px solid var(--sage);
}

.achievement-card.locked {
  opacity: 0.6;
  filter: grayscale(0.5);
}

.achievement-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.achievement-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.achievement-desc {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.achievement-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  background: var(--sage-light);
  color: var(--sage-dark);
}

.achievement-badge.locked {
  background: var(--border);
  color: var(--text-light);
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
  .tests-grid,
  .experiments-grid,
  .scenarios-grid,
  .quotes-grid,
  .achievements-grid {
    grid-template-columns: 1fr;
  }
  
  .exp-header {
    flex-direction: column;
    text-align: center;
  }
  
  .quote-featured {
    padding: 2rem 1.5rem;
  }
  
  .quote-text {
    font-size: 1.2rem;
  }
}

/* Daily Recommendation Page */
.daily-container {
  max-width: 800px;
  margin: 0 auto;
}

.streak-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
}

.streak-number {
  font-size: 4rem;
  font-weight: bold;
  font-family: var(--font-serif);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.streak-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

.streak-fire {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.daily-law-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  margin-bottom: 2rem;
}

.daily-law-name {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.daily-law-oneliner {
  font-size: 1.2rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  font-style: italic;
}

.daily-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Learning Path Page */
.path-container {
  max-width: 900px;
  margin: 0 auto;
}

.path-level {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}

.path-level.beginner {
  border-left-color: #4CAF50;
}

.path-level.intermediate {
  border-left-color: #FF9800;
}

.path-level.advanced {
  border-left-color: #F44336;
}

.path-level-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.path-level-icon {
  font-size: 2.5rem;
}

.path-level-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text);
}

.path-level-desc {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.path-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.path-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.path-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.path-progress-text {
  font-size: 0.9rem;
  color: var(--text-light);
  white-space: nowrap;
}

.path-laws-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.path-law-item {
  background: var(--bg);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.path-law-item:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.path-law-item.learned {
  background: var(--primary-light);
}

.path-law-item.learned::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 4px;
  color: var(--primary);
  font-weight: bold;
}

/* Review Page */
.review-container {
  max-width: 800px;
  margin: 0 auto;
}

.review-intro {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.review-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 1.5rem 0;
}

.review-stat {
  text-align: center;
}

.review-stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--primary);
  font-family: var(--font-serif);
}

.review-stat-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

.review-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.review-law-name {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.review-law-summary {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.review-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Notes Page */
.notes-container {
  max-width: 900px;
  margin: 0 auto;
}

.notes-intro {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.notes-list {
  display: grid;
  gap: 1.5rem;
}

.note-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary);
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.note-law-name {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--primary);
}

.note-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.note-content {
  color: var(--text);
  line-height: 1.8;
  white-space: pre-wrap;
}

.note-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  justify-content: flex-end;
}

/* Practice Task */
.practice-task {
  background: linear-gradient(135deg, var(--primary-light) 0%, rgba(212, 165, 116, 0.1) 100%);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1.5rem;
  border-left: 4px solid var(--accent);
}

.practice-task-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.practice-task-content {
  color: var(--text);
  line-height: 1.7;
}

/* Note Editor Modal */
.note-editor-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.note-editor {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
}

.note-editor-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 1rem;
}

.note-textarea {
  width: 100%;
  min-height: 200px;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  margin-bottom: 1rem;
}

.note-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.note-editor-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

/* Difficulty Badge */
.difficulty-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 0.5rem;
}

.difficulty-badge.beginner {
  background: #E8F5E9;
  color: #2E7D32;
}

.difficulty-badge.intermediate {
  background: #FFF3E0;
  color: #E65100;
}

.difficulty-badge.advanced {
  background: #FFEBEE;
  color: #C62828;
}

@media (max-width: 768px) {
  .streak-number {
    font-size: 3rem;
  }
  
  .daily-law-card {
    padding: 2rem 1.5rem;
  }
  
  .daily-law-name {
    font-size: 1.5rem;
  }
  
  .review-stats {
    gap: 1.5rem;
  }
  
  .review-stat-number {
    font-size: 2rem;
  }
  
  .path-laws-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}

/* Note Input */
.note-input-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.note-textarea {
  width: 100%;
  min-height: 120px;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
  transition: border-color 0.2s;
}

.note-textarea:focus {
  outline: none;
  border-color: var(--sage);
}

.note-textarea::placeholder {
  color: var(--text-light);
}

