:root {
  --bg-deep: #03171d;
  --bg-mid: #052f38;
  --teal-dark: #052f38;
  --teal-navbar: #052f38;
  --gold: #d8aa3b;
  --gold-light: #f7c84b;
  --cyan: #0fd6b5;
  --green: #14b982;
  --white: #ffffff;
  --ink: #071d25;
  --muted: #536a72;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #061b22;
  color: var(--white);
  font-family: "Segoe UI", Arial, sans-serif;
  scroll-behavior: smooth;
}

a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
img {
  max-width: 100%;
  display: block;
}

/* ===================== TOPBAR ===================== */
.topbar {
  width: 100%;
  background: linear-gradient(90deg, #05151d 0%, #073741 50%, #05151d 100%);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.topbar-inner {
  max-width: 1450px;
  margin: 0 auto;
  padding: 0 28px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}
.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 13px;
}
.topbar-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.topbar-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.3);
}
.topbar-right .topbar-item:hover {
  color: var(--gold-light);
  cursor: pointer;
}

/* ===================== HEADER / LOGO ===================== */
.site-header {
  width: 100%;
  background: #061923;
  text-align: center;
  padding: 18px 0;
}
.site-header .logo-wrap {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.site-header .logo-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a5b67, #042f37);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  border: 1px solid rgba(0, 255, 231, 0.3);
}
.site-header h1 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.5px;
  color: var(--white);
}
.site-header span.tag {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ===================== NAVBAR ===================== */
nav.main-nav {
  width: 100%;
  background: linear-gradient(90deg, #042a32 0%, #064b56 50%, #042a32 100%);
  border-top: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.26);
  position: relative;
  z-index: 999;
}
.main-nav ul {
  display: flex;
  justify-content: center;
  max-width: 1450px;
  margin: 0 auto;
}
.main-nav > ul > li {
  flex: 1 1 0;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  position: relative;
}
.main-nav > ul > li:last-child {
  border-right: none;
}
.main-nav > ul > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 58px;
  color: var(--white);
  font-size: 16px;
  font-weight: 900;
  text-transform: none;
  letter-spacing: 0.4px;
  transition: 0.25s ease;
  position: relative;
}
.main-nav > ul > li > a::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.main-nav > ul > li.active > a,
.main-nav > ul > li > a:hover {
  background: linear-gradient(180deg, #0a5b67 0%, #042f37 100%);
  color: var(--gold-light);
}
.main-nav > ul > li.active > a::after,
.main-nav > ul > li > a:hover::after {
  transform: scaleX(1);
}

.main-nav .has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 58px;
  left: 0;
  width: 240px;
  background: #032930;
  border-top: 3px solid var(--gold);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.38);
}
.main-nav .has-children:hover > .sub-menu {
  display: block;
}
.main-nav .sub-menu li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.main-nav .sub-menu li a {
  display: block;
  padding: 15px 18px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  text-align: left;
  color: var(--white);
}
.main-nav .sub-menu li a:hover {
  background: #0a5360;
  color: var(--gold-light);
}

/* ===================== PAGE BACKGROUND ===================== */
.medai-page {
  position: relative;
  padding: 54px 6% 74px;
  background:
    radial-gradient(circle at 12% 8%, rgba(0, 230, 220, 0.16), transparent 30%),
    radial-gradient(
      circle at 88% 10%,
      rgba(216, 170, 59, 0.12),
      transparent 28%
    ),
    radial-gradient(
      circle at 50% 80%,
      rgba(20, 185, 130, 0.12),
      transparent 35%
    ),
    linear-gradient(180deg, #03171d 0%, #052f38 46%, #03171d 100%);
  overflow: hidden;
}
.medai-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 255, 231, 0.05) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 255, 231, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.28;
  pointer-events: none;
}
.medai-page > * {
  position: relative;
  z-index: 2;
}

/* ===================== HERO ===================== */
.hero-card {
  max-width: 1450px;
  margin: 0 auto 64px;
  padding: 46px 52px;
  display: grid;
  grid-template-columns: 1.16fr 0.84fr;
  align-items: center;
  gap: 38px;
  border-radius: 28px;
  background:
    radial-gradient(
      circle at 88% 14%,
      rgba(0, 255, 231, 0.16),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      rgba(2, 22, 29, 0.96),
      rgba(5, 74, 82, 0.94),
      rgba(7, 128, 98, 0.88)
    );
  border: 1px solid rgba(216, 170, 59, 0.42);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.brand-logo {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(0, 255, 231, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: 0 0 26px rgba(0, 255, 220, 0.16);
}
.brand h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}
.brand p {
  margin: 5px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.hero-left h3 {
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.1;
  font-weight: 900;
  margin: 0 0 22px;
  letter-spacing: -1px;
}
.hero-desc {
  color: rgba(255, 255, 255, 0.9);
  font-size: 16px;
  line-height: 1.6;
  max-width: 820px;
  margin: 0 0 28px;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.badges span {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(0, 255, 231, 0.22);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
}
.status-grid {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.status-grid div {
  min-width: 118px;
  background: rgba(1, 18, 26, 0.7);
  border: 1px solid rgba(97, 255, 245, 0.18);
  border-radius: 15px;
  padding: 14px 18px;
}
.status-grid small {
  display: block;
  font-size: 11px;
  letter-spacing: 1.2px;
  color: #78f4ed;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.status-grid strong {
  font-size: 14px;
  font-family: Consolas, monospace;
}

.image-box {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(109, 255, 247, 0.3);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.3);
  height: 300px;
  background: linear-gradient(135deg, #0a2733, #0e5a52 60%, #0b2b26);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
}

/* ===================== SECTION TITLE ===================== */
.section-title {
  max-width: 1450px;
  margin: 62px auto 28px;
}
.section-title h2 {
  font-size: clamp(26px, 2.7vw, 40px);
  font-weight: 900;
  margin: 0 0 14px;
  letter-spacing: -0.6px;
}
.section-title p {
  color: rgba(229, 247, 246, 0.82);
  font-size: 16px;
  line-height: 1.7;
  max-width: 1020px;
  margin: 0;
}

/* ===================== UPLOAD CARD ===================== */
.upload-card {
  max-width: 1450px;
  margin: 0 auto 64px;
  background: #f7f9f9;
  border: 1px solid #d7e3e0;
  border-radius: 26px;
  padding: 28px 32px 34px;
  box-shadow: 0 18px 40px rgba(8, 38, 48, 0.1);
  color: var(--ink);
}
.upload-box {
  min-height: 170px;
  max-width: 92%;
  margin: 0 auto 30px;
  background: linear-gradient(135deg, #edf8f4 0%, #dff4ee 100%);
  border: 2px dashed var(--cyan);
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  cursor: pointer;
}
.upload-box input[type="file"] {
  display: none;
}
.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.upload-icon {
  font-size: 38px;
  margin-bottom: 10px;
}
.upload-content strong {
  font-size: 18px;
  color: var(--ink);
}
.upload-content span {
  font-size: 14px;
  color: #2f3f46;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.form-group label {
  display: block;
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 10px;
}
.form-group input {
  width: 100%;
  height: 56px;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid #cad8d5;
  background: #fff;
  color: #0f2230;
  font-size: 15px;
}

/* ===================== CLASS GRID ===================== */
.class-grid {
  max-width: 1450px;
  margin: 0 auto 78px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.class-card {
  position: relative;
  min-height: 200px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 255, 253, 0.96)
  );
  border-radius: 24px;
  padding: 28px 28px 30px;
  border: 1px solid rgba(216, 170, 59, 0.18);
  border-top: 6px solid var(--green);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  color: var(--ink);
  transition: 0.28s ease;
}
.class-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 30px 65px rgba(0, 0, 0, 0.3);
}
.class-card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 900;
  margin: 0 0 14px;
}
.class-card h3 .dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #062f36;
  box-shadow: 0 0 0 8px rgba(15, 214, 181, 0.13);
}
.class-card em {
  display: block;
  color: #647681;
  font-size: 14px;
  margin-bottom: 12px;
  font-style: normal;
}
.class-card p {
  color: #283b43;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.class-card.purple {
  border-top-color: #6672ff;
}
.class-card.green {
  border-top-color: var(--green);
}
.class-card.orange {
  border-top-color: #f59e0b;
}
.class-card.red {
  border-top-color: #ef4444;
}
.class-card.brown {
  border-top-color: #d97706;
}
.class-card.lime {
  border-top-color: #70c900;
}

/* ===================== STEP GRID ===================== */
.step-grid {
  max-width: 1450px;
  margin: 0 auto 78px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 22px;
}
.step-card {
  position: relative;
  min-height: 190px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(245, 255, 252, 0.96)
  );
  border: 1px solid rgba(15, 214, 181, 0.18);
  border-radius: 22px;
  padding: 26px 22px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  color: var(--ink);
  transition: 0.28s ease;
}
.step-card:hover {
  transform: translateY(-6px);
}
.step-card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a7f55, #14b982);
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 18px;
  box-shadow: 0 10px 24px rgba(20, 185, 130, 0.3);
}
.step-card h3 {
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 10px;
}
.step-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

/* ===================== TECH GRID ===================== */
.tech-grid {
  max-width: 1450px;
  margin: 0 auto 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.tech-card {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(247, 255, 253, 0.96)
  );
  border: 1px solid rgba(216, 170, 59, 0.18);
  border-radius: 22px;
  padding: 26px;
  min-height: 150px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  color: var(--ink);
  transition: 0.28s ease;
}
.tech-card:hover {
  transform: translateY(-5px);
}
.tech-card .icon {
  font-size: 28px;
  display: block;
  margin-bottom: 10px;
}
.tech-card h3 {
  font-size: 17px;
  font-weight: 900;
  margin: 0 0 8px;
}
.tech-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

/* ===================== FOOTER ===================== */
footer.site-footer {
  background: #04141a;
  border-top: 2px solid var(--gold);
  padding: 40px 6% 20px;
}
.footer-inner {
  max-width: 1450px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-inner h4 {
  margin: 0 0 10px;
  font-size: 15px;
  color: var(--gold-light);
}
.footer-inner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}
.footer-bottom {
  max-width: 1450px;
  margin: 0 auto;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}
.footer-bottom a {
  color: var(--gold-light);
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1200px) {
  .hero-card {
    grid-template-columns: 1fr;
  }
  .class-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .step-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .tech-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 920px) {
  .topbar-inner {
    flex-direction: column;
    gap: 8px;
    padding: 10px 14px;
  }
  .main-nav ul {
    flex-wrap: wrap;
  }
  .main-nav > ul > li {
    flex: 1 1 33.33%;
  }
  .main-nav > ul > li > a {
    height: 48px;
    font-size: 13px;
  }
  .medai-page {
    padding: 42px 22px 60px;
  }
  .hero-card {
    padding: 30px 26px;
  }
}
@media (max-width: 680px) {
  .main-nav > ul > li {
    flex: 1 1 50%;
  }
  .class-grid,
  .step-grid,
  .tech-grid {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ===================== DETEKSI MATA: HALAMAN PREDIKSI ===================== */
.breadcrumb {
  max-width: 1450px;
  margin: 0 auto 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}
.breadcrumb a {
  color: var(--gold-light);
}
.breadcrumb a:hover {
  text-decoration: underline;
}

.predict-layout {
  max-width: 1450px;
  margin: 0 auto 70px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
}

.predict-panel {
  background: #f7f9f9;
  border: 1px solid #d7e3e0;
  border-radius: 26px;
  padding: 28px 32px 34px;
  box-shadow: 0 18px 40px rgba(8, 38, 48, 0.1);
  color: var(--ink);
}
.predict-panel h3 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 900;
}
.predict-panel > p.hint {
  margin: 0 0 20px;
  font-size: 13px;
  color: var(--muted);
}

.eye-preview {
  margin-top: 18px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid #d7e3e0;
  max-height: 280px;
  display: none;
}
.eye-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #0e1117;
}

.predict-btn {
  margin-top: 20px;
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #0a7f55, #14b982);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.3px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(20, 185, 130, 0.3);
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.predict-btn:hover:not(:disabled) {
  transform: translateY(-2px);
}
.predict-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.api-url-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}
.api-url-row input {
  flex: 1;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #cad8d5;
  font-size: 12px;
  color: #0f2230;
}

.result-panel {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(248, 255, 253, 0.96)
  );
  border: 1px solid rgba(216, 170, 59, 0.18);
  border-radius: 26px;
  padding: 28px 32px 34px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.24);
  color: var(--ink);
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.result-empty {
  margin: auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 10px;
}
.result-empty .icon {
  font-size: 38px;
  display: block;
  margin-bottom: 14px;
}

.result-loading {
  margin: auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 40px 10px;
}
.spinner {
  width: 34px;
  height: 34px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 3px solid #d7e3e0;
  border-top-color: var(--green);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.result-error {
  margin: auto 0;
  text-align: center;
  padding: 30px 10px;
  color: #b3261e;
  font-size: 14px;
}

.result-headline {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.result-headline .badge-dot {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: rgba(20, 185, 130, 0.12);
  border: 1px solid rgba(20, 185, 130, 0.3);
}
.result-headline h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
}
.result-headline span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

.prob-row {
  margin-bottom: 14px;
}
.prob-row .prob-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}
.prob-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #e6efec;
  overflow: hidden;
}
.prob-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0a7f55, #14b982);
  transition: width 0.5s ease;
}
.prob-row.top .prob-fill {
  background: linear-gradient(90deg, #d8aa3b, #f7c84b);
}

.result-disclaimer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e2ece8;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 920px) {
  .predict-layout {
    grid-template-columns: 1fr;
  }
}
