:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-2: #eef4fa;
  --navy: #0b1f3a;
  --navy-2: #122d52;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --teal-soft: #ccfbf1;
  --accent: #ef4444;
  --amber: #f59e0b;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(11, 31, 58, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 31, 58, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: #fff;
}
.topbar-inner {
  max-width: 1320px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 10px; cursor: pointer; text-decoration: none; color: #fff;
}
.brand-logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #14b8a6, #0284c7);
  display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff;
  box-shadow: 0 4px 14px rgba(20,184,166,0.35);
}
.brand-title { font-size: 19px; font-weight: 800; letter-spacing: -0.3px; }
.brand-sub { font-size: 11px; color: #94a3b8; display: block; margin-top: -3px; }

.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav-btn {
  background: transparent; border: none; color: #cbd5e1;
  padding: 8px 12px; border-radius: 10px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
}
.nav-btn:hover { color: #fff; background: rgba(255,255,255,0.09); }
.nav-btn.active { background: var(--teal); color: #fff; }

.topbar-actions { display: flex; align-items: center; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 11px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.18s;
  text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-danger { background: var(--accent); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-glass { background: rgba(255,255,255,0.12); color: #fff; border-color: rgba(255,255,255,0.2); }
.btn-glass:hover { background: rgba(255,255,255,0.2); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }

/* Hero */
.hero {
  background: radial-gradient(circle at 80% 20%, rgba(20,184,166,0.22), transparent 50%),
              linear-gradient(135deg, #0b1f3a 0%, #102a4c 60%, #0f3d4c 100%);
  color: #fff; padding: 42px 20px 48px;
}
.hero-inner { max-width: 1320px; margin: 0 auto; }
.hero-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 28px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(20,184,166,0.18); border: 1px solid rgba(45,212,191,0.35);
  color: #5eead4; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.15; font-weight: 800; margin-bottom: 14px; }
.hero p { color: #cbd5e1; font-size: 16px; max-width: 640px; margin-bottom: 22px; }
.hero-search {
  display: flex; gap: 8px; background: rgba(255,255,255,0.98); padding: 7px; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25); max-width: 640px;
}
.hero-search input {
  flex: 1; border: none; outline: none; padding: 10px 14px; font-size: 15px; color: var(--text);
  background: transparent;
}
.hero-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
}
.stat-card {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px; padding: 16px; backdrop-filter: blur(8px);
}
.stat-val { font-size: 26px; font-weight: 800; color: #5eead4; }
.stat-lbl { font-size: 12.5px; color: #cbd5e1; margin-top: 2px; }

/* Main Container */
.container { max-width: 1320px; margin: 0 auto; padding: 28px 20px 64px; }
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 20px; flex-wrap: wrap;
}
.section-head h2 { font-size: 26px; font-weight: 800; color: var(--navy); }
.section-head p { color: var(--muted); font-size: 14.5px; margin-top: 4px; }

/* Cards & Grids */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; }

/* Filters */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px;
  background: var(--surface); padding: 14px; border-radius: 14px; border: 1px solid var(--border);
}
.input, select, textarea {
  padding: 10px 13px; border: 1px solid var(--border); border-radius: 10px;
  font-size: 14px; font-family: inherit; color: var(--text); background: #fff; outline: none;
}
.input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.filter-bar .input { flex: 1; min-width: 210px; }

/* Doctor Card */
.doc-card {
  display: flex; flex-direction: column; gap: 14px;
  transition: transform 0.18s, box-shadow 0.18s;
}
.doc-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(11,31,58,0.11); }
.doc-top { display: flex; gap: 14px; align-items: center; }
.doc-avatar {
  width: 68px; height: 68px; border-radius: 16px; object-fit: cover; flex-shrink: 0;
  background: linear-gradient(135deg, #0d9488, #0284c7); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 22px;
}
.doc-name { font-size: 16.5px; font-weight: 700; color: var(--navy); }
.doc-title { font-size: 12.5px; font-weight: 700; color: var(--teal-dark); }
.doc-meta { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700;
}
.badge-teal { background: var(--teal-soft); color: var(--teal-dark); }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-red { background: #fee2e2; color: #b91c1c; }

/* Symptom Checker */
.stepper { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.step-pill {
  padding: 8px 14px; border-radius: 999px; background: var(--surface-2);
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.step-pill.active { background: var(--navy); color: #fff; }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 260px; overflow-y: auto; padding: 4px 0; }
.chip {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }
.chip.selected { background: var(--teal); color: #fff; border-color: var(--teal); font-weight: 600; }

/* AI Chat */
.ai-branches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ai-box {
  background: #f8fafc; border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; min-height: 220px; max-height: 460px; overflow-y: auto;
  white-space: pre-wrap; font-size: 14.5px; line-height: 1.65;
}

/* Biometric Lab */
.bio-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.bio-stage {
  position: relative; background: #091322; border-radius: 16px; overflow: hidden;
  min-height: 300px; display: flex; align-items: center; justify-content: center; color: #fff;
}
.bio-stage video, .bio-stage canvas { width: 100%; max-height: 360px; object-fit: cover; display: block; }
.bio-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-top: 14px; }
.metric-box {
  background: var(--surface-2); border-radius: 12px; padding: 12px; text-align: center;
}
.metric-box .mv { font-size: 22px; font-weight: 800; color: var(--navy); }
.metric-box .ml { font-size: 12px; color: var(--muted); }
.eye-target {
  position: absolute; width: 28px; height: 28px; border-radius: 50%;
  background: #22d3ee; box-shadow: 0 0 24px #22d3ee;
  transform: translate(-50%, -50%); transition: all 0.45s ease-in-out;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11,31,58,0.65); backdrop-filter: blur(4px);
  z-index: 999; display: none; align-items: center; justify-content: center; padding: 18px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 20px; max-width: 780px; width: 100%;
  max-height: 88vh; overflow-y: auto; padding: 26px; position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.3);
}
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px;
  border-radius: 50%; border: none; background: var(--surface-2); cursor: pointer; font-size: 18px;
}

.disclaimer-bar {
  margin-top: 26px; padding: 14px 18px; border-radius: 12px;
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e; font-size: 13px;
}
.footer {
  background: var(--navy); color: #94a3b8; padding: 32px 20px; font-size: 13.5px;
}
.footer-inner {
  max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}

/* Interactive Anatomical Human Body Figure (Hastalık Sorgulama) */
.gender-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.gender-card {
  flex: 1; min-width: 150px; padding: 14px 18px; border-radius: 14px;
  border: 2px solid var(--border); background: #fff; cursor: pointer;
  display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 15px;
  transition: all 0.18s;
}
.gender-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.gender-card.female.active { border-color: #ec4899; background: #fdf2f8; color: #be185d; }
.gender-card.male.active { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.gender-icon {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  font-size: 22px; color: #fff; flex-shrink: 0;
}
.gender-card.female .gender-icon { background: linear-gradient(135deg, #f472b6, #db2777); }
.gender-card.male .gender-icon { background: linear-gradient(135deg, #38bdf8, #2563eb); }

.body-inquiry-layout {
  display: grid; grid-template-columns: 360px 1fr; gap: 22px; align-items: start;
}
.body-stage {
  background: radial-gradient(circle at 50% 35%, #f0fdfa 0%, #eef4fa 70%, #e2e8f0 100%);
  border: 1px solid var(--border); border-radius: 18px; padding: 16px;
  display: flex; flex-direction: column; align-items: center; position: relative;
}
.body-view-toggle {
  display: flex; gap: 6px; margin-bottom: 10px; width: 100%; justify-content: center;
}
.body-svg {
  width: 100%; max-width: 280px; height: auto; user-select: none;
  filter: drop-shadow(0 8px 18px rgba(11,31,58,0.08));
}
.body-zone {
  fill: #cbd5e1; stroke: #64748b; stroke-width: 1.6;
  cursor: pointer; transition: fill 0.18s, stroke 0.18s, filter 0.18s;
}
.body-zone:hover {
  fill: #5eead4; stroke: #0f766e; filter: drop-shadow(0 0 6px rgba(13,148,136,0.45));
}
.body-zone.active {
  fill: #0d9488; stroke: #0b1f3a; stroke-width: 2.2;
}
.body-zone-label {
  font-size: 11px; font-weight: 700; fill: #0b1f3a; pointer-events: none; text-anchor: middle;
}
.body-hover-tip {
  margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--navy);
  background: #fff; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border);
  min-height: 32px; display: inline-flex; align-items: center; gap: 6px;
}
.subpart-bar {
  display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 14px;
  padding: 10px; background: var(--surface-2); border-radius: 12px;
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .body-inquiry-layout { grid-template-columns: 1fr; }
}
