/* ==============================================================================
   iOS 2026 MINIMALIST DESIGN SYSTEM
   Theme: Elegant Light, Pure Whitespace, Editorial Apple Typography
   No loud gradients, no heavy shadows, ultra-clean & highly readable
   ============================================================================== */

:root {
  /* Apple 2026 Core Palette */
  --bg-page: #f5f5f7;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #fbfbfd;
  --bg-surface-secondary: #f0f0f3;
  --bg-surface-hover: #f9f9fb;
  
  /* Hairline Borders (Crisp, Apple-style) */
  --border-hairline: rgba(0, 0, 0, 0.08);
  --border-subtle: rgba(0, 0, 0, 0.05);
  --border-focus: #0071e3;

  /* Restrained, Minimal Shadow (Ultra Subtle) */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
  --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-float: 0 6px 20px rgba(0, 0, 0, 0.05);

  /* Apple System Accents (Refined, Solid, No harsh gradients) */
  --apple-blue: #0071e3;
  --apple-blue-tint: #e8f2fc;
  --apple-green: #28a745;
  --apple-green-tint: #edf7ee;
  --apple-red: #d70015;
  --apple-red-tint: #fbebee;
  --apple-orange: #c9510c;
  --apple-orange-tint: #fcf1e8;
  --apple-purple: #8944ab;
  --apple-purple-tint: #f5eefb;

  /* Typography Colors (High Contrast & Comfortable Reading) */
  --text-primary: #1d1d1f;
  --text-secondary: #515154;
  --text-tertiary: #6e6e73;
  --text-quaternary: #86868b;
  --text-muted: #a1a1a6;

  /* Typography Spec (iOS SF Pro / Plus Jakarta Sans) */
  --font-stack: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Plus Jakarta Sans", "Helvetica Neue", sans-serif;
  
  /* Border Radius */
  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Transitions */
  --anim-fast: 0.15s cubic-bezier(0.2, 0, 0, 1);
  --anim-normal: 0.25s cubic-bezier(0.2, 0, 0, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--bg-page);
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-page);
  color: var(--text-primary);
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 80px;
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.25;
}

p {
  color: var(--text-secondary);
  font-size: 0.9375rem; /* 15px */
  line-height: 1.65;
}

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

/* ==============================================================================
   iOS 2026 FLOATING MINIMALIST NAVBAR
   ============================================================================== */
.navbar-wrapper {
  position: sticky;
  top: 14px;
  z-index: 1000;
  margin-bottom: 28px;
}

.glass-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  transition: var(--anim-normal);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.brand-icon svg {
  width: 18px;
  height: 18px;
  stroke: #ffffff;
  stroke-width: 2;
  fill: none;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-sub {
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-tertiary);
}

/* Segmented Control Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface-secondary);
  padding: 3px;
  border-radius: var(--radius-pill);
}

/* ==============================================================================
   DATASET SWITCHER BAR (MULTI-DATASET SUPPORT)
   ============================================================================== */
.dataset-switcher-wrapper {
  margin-bottom: 20px;
}

.dataset-switcher-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.switcher-caption {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}

.dataset-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  padding: 4px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-subtle);
  flex-wrap: wrap;
}

.dataset-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--anim-fast);
}

.dataset-pill svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.dataset-pill:hover {
  color: var(--text-primary);
  background: var(--bg-surface-secondary);
}

.dataset-pill.active {
  background: var(--apple-blue);
  color: #ffffff;
  font-weight: 600;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--anim-fast);
}

.nav-link svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  background: #ffffff;
  color: var(--apple-blue);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.nav-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--apple-green-tint);
  border: 1px solid rgba(40, 167, 69, 0.2);
  color: #1b742e;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--apple-green);
}

/* ==============================================================================
   HERO SECTION (CLEAN & ELEGANT)
   ============================================================================== */
.hero-glass {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 36px 32px 36px;
  margin-bottom: 24px;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--apple-blue-tint);
  color: var(--apple-blue);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  margin-bottom: 14px;
}

.hero-pill svg {
  width: 13px;
  height: 13px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.hero-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 12px;
}

.hero-title .accent-text {
  color: var(--apple-blue);
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 780px;
  line-height: 1.6;
  margin-bottom: 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn-ios {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--anim-fast);
}

.btn-ios svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.btn-primary {
  background: var(--apple-blue);
  color: #ffffff;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-secondary {
  background: var(--bg-surface-secondary);
  color: var(--text-primary);
  border-color: var(--border-hairline);
}

.btn-secondary:hover {
  background: #e5e5ea;
}

/* ==============================================================================
   KPI CARDS (CLEAN MINIMALIST)
   ============================================================================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--anim-normal);
  display: flex;
  flex-direction: column;
}

.glass-card:hover {
  box-shadow: var(--shadow-hover);
  border-color: rgba(0, 0, 0, 0.12);
}

.kpi-card .kpi-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-card .kpi-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
  fill: none;
}

.kpi-icon.blue { background: var(--apple-blue-tint); color: var(--apple-blue); }
.kpi-icon.green { background: var(--apple-green-tint); color: var(--apple-green); }
.kpi-icon.red { background: var(--apple-red-tint); color: var(--apple-red); }
.kpi-icon.purple { background: var(--apple-purple-tint); color: var(--apple-purple); }

.kpi-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.kpi-tag.blue { background: var(--apple-blue-tint); color: var(--apple-blue); }
.kpi-tag.green { background: var(--apple-green-tint); color: var(--apple-green); }
.kpi-tag.red { background: var(--apple-red-tint); color: var(--apple-red); }
.kpi-tag.purple { background: var(--apple-purple-tint); color: var(--apple-purple); }

.kpi-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.kpi-number {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-quaternary);
  margin-top: auto;
  line-height: 1.4;
}

.kpi-sub strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ==============================================================================
   SECTIONS & GRIDS
   ============================================================================== */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

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

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title svg {
  width: 17px;
  height: 17px;
  stroke: var(--text-secondary);
  stroke-width: 2;
  fill: none;
}

.card-subtitle {
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.chart-wrapper {
  position: relative;
  width: 100%;
  min-height: 260px;
  max-height: 290px;
}

/* Minimalist Editorial Story Box (No heavy shadows or gradients) */
.story-box {
  background: var(--bg-surface-secondary);
  border-left: 3px solid var(--apple-blue);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.story-box.red { border-left-color: var(--apple-red); }
.story-box.green { border-left-color: var(--apple-green); }
.story-box.orange { border-left-color: var(--apple-orange); }
.story-box.purple { border-left-color: var(--apple-purple); }

.story-box strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ==============================================================================
   INTERACTIVE SIMULATOR (MINIMALIST APPLE WIDGET)
   ============================================================================== */
.simulator-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-subtle);
}

.simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-range-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-range {
  flex: 1;
  accent-color: var(--apple-blue);
  cursor: pointer;
  height: 5px;
  border-radius: 4px;
}

.range-val {
  min-width: 55px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--apple-blue);
  background: var(--apple-blue-tint);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  text-align: center;
}

.segmented-toggle {
  display: flex;
  background: var(--bg-surface-secondary);
  padding: 3px;
  border-radius: var(--radius-pill);
  gap: 3px;
}

.toggle-option {
  flex: 1;
  text-align: center;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--anim-fast);
}

.toggle-option.active {
  background: #ffffff;
  color: var(--text-primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.result-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
}

.result-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}

.result-amount {
  font-size: 36px;
  font-weight: 700;
  color: var(--apple-blue);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.result-badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}

.result-explanation {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==============================================================================
   DATASET EXPLORATION TABLE & FILTERS
   ============================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--bg-surface-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
}

.search-input-wrap {
  flex: 1;
  min-width: 200px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 8px 14px 8px 34px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  color: var(--text-primary);
  transition: var(--anim-fast);
}

.search-input:focus {
  border-color: var(--apple-blue);
  box-shadow: 0 0 0 2px var(--apple-blue-tint);
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}

.search-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.filter-select {
  padding: 8px 14px;
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.filter-select:focus {
  border-color: var(--apple-blue);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: #ffffff;
}

.ios-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.ios-table th {
  background: var(--bg-surface-secondary);
  padding: 11px 14px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-hairline);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.ios-table th:hover {
  color: var(--apple-blue);
}

.ios-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
  white-space: nowrap;
}

.ios-table tr:last-child td {
  border-bottom: none;
}

.ios-table tr:hover td {
  background: var(--bg-surface-hover);
}

.tag-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
}

.tag-badge.smoker-yes { background: var(--apple-red-tint); color: var(--apple-red); }
.tag-badge.smoker-no { background: var(--apple-green-tint); color: var(--apple-green); }
.tag-badge.obese { background: var(--apple-orange-tint); color: var(--apple-orange); }
.tag-badge.overweight { background: #fdf5e6; color: #8a6300; }
.tag-badge.normal { background: var(--apple-blue-tint); color: var(--apple-blue); }
.tag-badge.underweight { background: #eef7fc; color: #00779e; }

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--text-tertiary);
}

.page-controls {
  display: flex;
  gap: 6px;
}

.page-btn {
  background: #ffffff;
  border: 1px solid var(--border-hairline);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--anim-fast);
}

.page-btn:hover:not(:disabled) {
  background: var(--apple-blue);
  color: #ffffff;
  border-color: var(--apple-blue);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==============================================================================
   GALLERY & IMAGE LIGHTBOX (VISUALISASI PAGE)
   ============================================================================== */
.gallery-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 24px;
  align-items: center;
}

.gallery-img-wrap {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-hairline);
  background: #ffffff;
  cursor: zoom-in;
}

.gallery-img-wrap img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-img-wrap:hover img {
  transform: scale(1.015);
}

.zoom-hint {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffffff;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
}

.gallery-detail h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.gallery-detail .badge-pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  margin-bottom: 12px;
}

.gallery-detail p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
}

.gallery-takeaway {
  background: var(--bg-surface-secondary);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-xs);
  padding: 12px 14px;
}

.gallery-takeaway h4 {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--apple-blue);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.gallery-takeaway ul {
  padding-left: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
  position: absolute;
  top: -36px;
  right: 0;
  background: #ffffff;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==============================================================================
   MATERI KULIAH (EDITORIAL & SCHOLARLY)
   ============================================================================== */
.materi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
}

.materi-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.materi-badge-num {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--apple-blue-tint);
  color: var(--apple-blue);
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.materi-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.materi-body {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.materi-subtopic {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 18px;
  margin-top: 14px;
}

.materi-subtopic h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.math-formula {
  background: var(--bg-surface-secondary);
  border-left: 3px solid var(--apple-blue);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  color: #1e293b;
  margin: 10px 0;
  overflow-x: auto;
}

/* ==============================================================================
   CODE PLAYGROUND & TERMINAL (KODE & PLAYGROUND PAGE)
   ============================================================================== */
.playground-container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.editor-card, .console-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  box-shadow: var(--shadow-subtle);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-hairline);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}

.traffic-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.traffic-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background: #ff5f56; border: 1px solid #e0443e; }
.dot-yellow { background: #ffbd2e; border: 1px solid #dea123; }
.dot-green { background: #27c93f; border: 1px solid #1aab29; }

.editor-body-wrap {
  display: flex;
  flex: 1;
  background: #ffffff;
  min-height: 380px;
  position: relative;
}

.line-numbers {
  padding: 14px 10px;
  background: var(--bg-surface-subtle);
  color: var(--text-quaternary);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 20px;
  text-align: right;
  user-select: none;
  border-right: 1px solid var(--border-hairline);
  white-space: pre;
}

.code-textarea {
  flex: 1;
  padding: 14px;
  background: transparent;
  border: none;
  outline: none;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12.5px;
  line-height: 20px;
  color: var(--text-primary);
  resize: none;
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
}

.code-textarea:focus {
  outline: none;
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-hairline);
}

.output-console {
  flex: 1;
  padding: 16px;
  background: #19191d;
  color: #38ef7d;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-y: auto;
  min-height: 380px;
  max-height: 440px;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ==============================================================================
   FOOTER
   ============================================================================== */
.glass-footer {
  text-align: center;
  padding: 28px 20px 20px 20px;
  color: var(--text-quaternary);
  font-size: 12.5px;
  margin-top: 36px;
  border-top: 1px solid var(--border-hairline);
}

/* ==============================================================================
   RESPONSIVE DESIGN (MOBILE, TABLET, LAPTOP, DESKTOP)
   ============================================================================== */

@media (max-width: 1024px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .grid-3col {
    grid-template-columns: 1fr;
  }
  .simulator-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .playground-container {
    grid-template-columns: 1fr;
  }
}

/* Mobile (max 768px): Hide logo and adapt navbar so tabs never crowd */
@media (max-width: 768px) {
  html {
    font-size: 14.5px;
  }
  body {
    padding-bottom: 90px;
  }
  .container {
    padding: 0 14px;
  }
  .navbar-wrapper {
    top: 8px;
    padding: 0 4px;
  }
  .glass-navbar {
    flex-direction: column;
    padding: 8px;
    gap: 6px;
    border-radius: var(--radius-md);
  }
  /* HIDE LOGO on mobile as requested! */
  .brand {
    display: none !important;
  }
  .nav-status {
    display: none !important;
  }
  .nav-links {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
    padding: 2px;
  }
  .nav-link {
    padding: 6px 8px;
    font-size: 11.5px;
    flex: 1 1 auto;
    justify-content: center;
  }
  .hero-glass {
    padding: 20px 16px;
  }
  .hero-title {
    font-size: 21px;
  }
  .kpi-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .filter-select {
    width: 100%;
  }
  .editor-body-wrap, .output-console {
    min-height: 280px;
  }
}
