/* ============================================
   Belajar Budi Harto — Premium Learning Portal
   Dark theme | Gradient accent
   ============================================ */

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

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #22223a;
  --text-primary: #e8e8f0;
  --text-secondary: #9898b8;
  --text-muted: #6a6a8a;
  --border-color: #2a2a3e;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;
  --gradient-en: linear-gradient(135deg, #3b82f6, #06b6d4);
  --gradient-cn: linear-gradient(135deg, #ef4444, #f59e0b);
  --gradient-bg: linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
  --shadow-card: 0 4px 20px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(59,130,246,0.15);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* --- Navigation --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-primary);
  text-decoration: none;
}

.nav-logo span.logo-en { color: var(--accent-blue); }
.nav-logo span.logo-cn { color: var(--accent-red); }

.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: rgba(255,255,255,0.06);
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 80px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(59,130,246,0.06) 0%, transparent 50%),
              radial-gradient(circle at 70% 60%, rgba(239,68,68,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-en);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 16px;
  position: relative;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 32px;
  position: relative;
}

/* --- Language Cards (Main) --- */
.lang-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.lang-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-decoration: none;
  display: block;
}

.lang-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
}

.lang-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.lang-card.en::before { background: var(--gradient-en); }
.lang-card.cn::before { background: var(--gradient-cn); }

.lang-card.en:hover { box-shadow: 0 8px 32px rgba(59,130,246,0.2); border-color: var(--accent-blue); }
.lang-card.cn:hover { box-shadow: 0 8px 32px rgba(239,68,68,0.2); border-color: var(--accent-red); }

.lang-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.lang-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.lang-card.en h2 { color: var(--accent-blue); }
.lang-card.cn h2 { color: var(--accent-red); }

.lang-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.lang-stats {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
}

.lang-stats span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.lang-stats strong {
  display: block;
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

/* --- Learning Path Timeline --- */
.section-title {
  text-align: center;
  padding: 40px 24px 8px;
  font-size: 1.8rem;
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 1rem;
}

.path-timeline {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.level-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  text-decoration: none;
  display: block;
  position: relative;
}

.level-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-blue);
}

.level-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.badge-tk { background: rgba(239,68,68,0.15); color: #ef4444; }
.badge-sd { background: rgba(59,130,246,0.15); color: #3b82f6; }
.badge-smp { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-sma { background: rgba(139,92,246,0.15); color: #8b5cf6; }

.level-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.level-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.level-card .level-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Content Page Styles --- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.content-header {
  margin-bottom: 40px;
}

.breadcrumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover { color: var(--accent-blue); }

.content-header h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.content-header .meta {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* --- Learning Modules --- */
.module-list {
  display: grid;
  gap: 16px;
}

.module-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.module-card:hover {
  border-color: rgba(59,130,246,0.3);
}

.module-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-card ul {
  list-style: none;
  padding: 0;
}

.module-card li {
  padding: 8px 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-card li:last-child { border-bottom: none; }

.module-card li::before {
  content: '→';
  color: var(--accent-cyan);
  font-weight: 700;
}

.coming-soon {
  opacity: 0.6;
}

.coming-soon::after {
  content: ' 🚧';
  font-size: 0.8rem;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  margin: 12px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--gradient-en);
  transition: width 0.5s ease;
}

/* --- Mandarin-specific --- */
.pinyin { color: var(--accent-orange); font-style: italic; }
.hanzi { font-family: 'Noto Sans SC', sans-serif; font-size: 1.3rem; }
.meaning { color: var(--text-secondary); font-size: 0.9rem; }

/* --- Level Navigation --- */
.level-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.level-nav a {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.level-nav a:hover,
.level-nav a.active {
  background: rgba(59,130,246,0.1);
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  .lang-cards { grid-template-columns: 1fr; }
  .level-grid { grid-template-columns: 1fr; }
  .content-header h1 { font-size: 1.6rem; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
}

@media (max-width: 480px) {
  .hero { padding: 40px 16px; }
  .nav-inner { height: 56px; }
  .nav-logo { font-size: 1rem; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* --- Table Styles --- */
.modern-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.9rem;
}

.modern-table th {
  text-align: left;
  padding: 12px 16px;
  background: rgba(59,130,246,0.1);
  color: var(--accent-blue);
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
}

.modern-table td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.modern-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* --- Flavor text for fun learning --- */
.flavor-box {
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(6,182,212,0.08));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 16px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.flavor-box strong {
  color: var(--accent-cyan);
}

/* --- Back to top --- */
.back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-blue);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(59,130,246,0.3);
  transition: all 0.2s;
  z-index: 50;
}

.back-top.visible { display: flex; }
.back-top:hover { transform: translateY(-2px); }
