/* ── Base ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #F8F3F0;
  color: #1a2332;
}

/* ── Navbar ──────────────────────────────────────────────────── */
#mainNav {
  background: linear-gradient(135deg, #142E8A 0%, #1B3FAC 100%);
  padding: .75rem 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.15);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
}

.nav-pill {
  border-radius: 8px;
  transition: background .2s;
  font-size: .88rem;
  font-weight: 500;
}
.nav-pill:hover  { background: rgba(255,255,255,.10); }
.nav-pill.active { background: rgba(255,255,255,.18); }

/* ── Loading Overlay ─────────────────────────────────────────── */
.loading-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(20,46,138,.88);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #142E8A 0%, #1B3FAC 55%, #2B52CB 100%);
  color: white;
  padding: 3rem 0 4rem;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50px;
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .03em;
}

.hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin: .75rem 0 1rem;
}

.hero-subtitle {
  font-size: 1rem;
  opacity: .85;
  line-height: 1.7;
  max-width: 560px;
}

.btn-hero-primary {
  background: white;
  color: #1B3FAC;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  transition: transform .15s, box-shadow .15s;
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  color: #1B3FAC;
}

.btn-hero-outline {
  background: transparent;
  color: white;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,.5);
  border-radius: 12px;
  transition: background .15s, border-color .15s;
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,.15);
  border-color: white;
  color: white;
}

/* ANN Diagram (Hero) */
.hero-visual { padding: 2rem; }

.ann-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.ann-layer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}

.layer-label {
  font-size: .7rem;
  font-weight: 600;
  opacity: .7;
  margin-bottom: .3rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.neuron {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4);
}

.inp-neuron  { background: rgba(255,255,255,.3); }
.hid1-neuron { background: rgba(100,180,255,.5); }
.hid2-neuron { background: rgba(100,220,180,.5); }
.hid3-neuron { background: rgba(255,200,100,.5); }
.out-neuron  { background: rgba(255,120,120,.7); width:24px; height:24px; }
.neuron-dots { color: rgba(255,255,255,.5); font-size: .9rem; }

/* ── Stats Bar ───────────────────────────────────────────────── */
.stats-bar {
  background: white;
  border-bottom: 1px solid #e9ecef;
}

.stat-item { padding: .5rem; }

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: #1B3FAC;
  line-height: 1;
}

.stat-label {
  font-size: .8rem;
  color: #6c757d;
  font-weight: 500;
  margin-top: .3rem;
}

/* ── Feature Cards ───────────────────────────────────────────── */
.feature-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .2s, box-shadow .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  margin-bottom: 1.2rem;
}

.feature-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .6rem;
}

.feature-desc {
  font-size: .9rem;
  color: #6c757d;
  line-height: 1.65;
  flex-grow: 1;
}

/* Category cards */
.cat-card {
  border-radius: 12px;
  border: 2px solid;
  padding: 1rem;
  text-align: center;
}
.cat-range { font-size: 1.1rem; font-weight: 700; }
.cat-name  { font-size: .8rem; color: #6c757d; margin-top: .3rem; }
.col-lg-2half { flex: 0 0 auto; width: 20%; }
@media (max-width:768px) { .col-lg-2half { width: 50%; } }

/* ── Section Text ────────────────────────────────────────────── */
.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a2332;
}
.section-subtitle {
  color: #6c757d;
  font-size: .95rem;
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header {
  background: linear-gradient(135deg, #142E8A 0%, #1B3FAC 100%);
  color: white;
  border-bottom: 3px solid #2B52CB;
}
.page-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: .3rem;
}
.page-subtitle {
  opacity: .8;
  font-size: .95rem;
  margin-bottom: 0;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card-header-custom {
  background: linear-gradient(135deg, #142E8A, #1B3FAC);
  color: white;
  font-weight: 600;
  padding: .9rem 1.4rem;
  border-radius: 16px 16px 0 0;
  font-size: .95rem;
}

/* ── Form ────────────────────────────────────────────────────── */
.form-control, .form-select {
  border-radius: 10px;
  border: 1.5px solid #dee2e6;
  font-size: .9rem;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: #1B3FAC;
  box-shadow: 0 0 0 3px rgba(27,63,172,.12);
}
.input-group-text {
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  font-size: .85rem;
}
.form-text { font-size: .75rem; }

.btn-predict {
  background: linear-gradient(135deg, #1B3FAC, #2B52CB);
  color: white;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .15s, box-shadow .15s;
}
.btn-predict:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(27,63,172,.35);
  color: white;
}

/* ── Result Card ─────────────────────────────────────────────── */
.result-card {
  background: linear-gradient(135deg, #e8f5e9, #f1f8ff);
  border: 2px solid #b2dfdb !important;
}

.result-number {
  font-size: 4rem;
  font-weight: 800;
  color: #1b5e20;
  line-height: 1;
  margin: .5rem 0 .2rem;
}

.result-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: #388e3c;
  margin-bottom: .5rem;
}

.letter-spacing { letter-spacing: .08em; }

/* ── Range Slider ────────────────────────────────────────────── */
.form-range::-webkit-slider-thumb {
  background: #1B3FAC;
}
.form-range::-webkit-slider-runnable-track {
  background: #dee2e6;
  height: 6px;
  border-radius: 3px;
}

/* Category indicator on rekomendasi page */
.cat-indicator {
  background: #f8f9fa;
  border: 1.5px solid #dee2e6;
  transition: all .3s;
  min-height: 70px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}

/* Result mini box */
.result-mini-box { border: 1.5px solid #dee2e6; }

/* ── Architecture Diagram ────────────────────────────────────── */
.arch-diagram {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.arch-layer {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.arch-layer-box {
  border-radius: 10px;
  padding: .8rem 1rem;
  text-align: center;
  min-width: 85px;
  border: 2px solid;
}
.arch-layer-title { font-size: .7rem; font-weight: 600; color: #6c757d; text-transform: uppercase; }
.arch-layer-nodes { font-size: 1.1rem; font-weight: 700; margin: .2rem 0; }
.arch-activation  { font-size: .7rem; color: #6c757d; }

.inp-box  { background: #e3f2fd; border-color: #90caf9; color: #1565c0; }
.hid1-box { background: #e8f5e9; border-color: #a5d6a7; color: #2e7d32; }
.hid2-box { background: #fff8e1; border-color: #ffe082; color: #e65100; }
.hid3-box { background: #fce4ec; border-color: #f48fb1; color: #880e4f; }
.out-box  { background: #ede7f6; border-color: #b39ddb; color: #4527a0; }
.arch-arrow { color: #adb5bd; }

/* ── Footer ──────────────────────────────────────────────────── */
#mainFooter {
  background: linear-gradient(135deg, #142E8A, #1B3FAC);
  color: rgba(255,255,255,.85);
  font-size: .88rem;
}

/* ── Utilities ───────────────────────────────────────────────── */
.min-vh-60 { min-height: 60vh; }

.table > :not(caption) > * > * {
  padding: .6rem .8rem;
}

@media (max-width: 768px) {
  .hero-title { font-size: 1.8rem; }
  .result-number { font-size: 3rem; }
  .arch-diagram { gap: .3rem; }
  .arch-layer-box { min-width: 70px; padding: .6rem .7rem; }
}
