:root {
  --bg: #000000;
  --bg-2: #0b0b0d;
  --surface: rgba(28, 28, 30, 0.82);
  --surface-solid: #1c1c1e;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --subtle: #8e8e93;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.16);
  --blue: #2997ff;
  --blue-soft: rgba(41, 151, 255, 0.14);
  --green: #34c759;
  --red: #ff453a;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 24px 65px rgba(0, 0, 0, 0.55);
  --radius: 24px;
  --radius-sm: 17px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

html {
  font-size: 19.2px; /* 16px * 1.2 = 1.2x genel ölçekleme */
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.glass {
  background: var(--surface);
  backdrop-filter: blur(34px);
  -webkit-backdrop-filter: blur(34px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

#sidebar {
  width: 432px; /* 360px * 1.2 */
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow-y: auto;
  user-select: none;
}

.header {
  padding: 28px 26px;
  border-bottom: 1px solid var(--line);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  display: block;
  background: currentColor;
  -webkit-mask: url("https://i.ibb.co/Pv7TS2q5/logo-s.png") center/contain no-repeat;
  mask: url("https://i.ibb.co/Pv7TS2q5/logo-s.png") center/contain no-repeat;
  color: var(--text);
  transition: transform .25s ease, color .2s ease;
}

.brand-mark:hover {
  transform: rotate(8deg) scale(1.08);
  color: var(--blue);
}

.logo {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.meta-tag {
  font-size: 14px;
  color: var(--muted);
  margin-top: 7px;
}

.control-group {
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
}

.control-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 14px;
  letter-spacing: 0.05em;
}

.gen-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
  margin-bottom: 14px;
}

.gen-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 12px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 15.5px;
  font-weight: 600;
  transition: .2s ease;
}

.gen-btn:hover {
  color: var(--text);
  background: var(--blue-soft);
}

.gen-btn.active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
  box-shadow: 0 0 19px rgba(41, 151, 255, 0.4);
}

.desc-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.field {
  margin-bottom: 17px;
}

.field label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

select {
  width: 100%;
  background: var(--surface-solid) !important;
  color: var(--text) !important;
  border: 1px solid var(--line-strong) !important;
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 15.5px;
  outline: none;
  transition: border-color .2s;
}

select:focus {
  border-color: var(--blue) !important;
}

input[type=range] {
  width: 100%;
  accent-color: var(--blue);
  cursor: pointer;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 99px;
}

.footer-group {
  margin-top: auto;
  border-bottom: none;
  padding-bottom: 28px;
}

.bs-counter-card {
  margin: 17px 0;
  padding: 12px 17px;
  background: var(--blue-soft);
  border: 1px solid rgba(41, 151, 255, 0.2);
  border-radius: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
}

.counter-label {
  color: var(--muted);
}

.counter-val {
  color: var(--blue);
  font-weight: 600;
}

.footer-link-row {
  border-top: 1px solid var(--line);
  padding-top: 17px;
}

.portal-link {
  color: var(--text);
  text-decoration: none;
  font-size: 15.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: color .2s;
}

.portal-link:hover {
  color: var(--blue);
}

.portal-link .arrow {
  color: var(--blue);
  font-size: 17px;
}

#main {
  flex: 1;
  position: relative;
  background: #000;
}

#map {
  width: 100%;
  height: 100%;
}

.maplibregl-ctrl-attrib,
.maplibregl-ctrl-logo {
  display: none !important;
}

.map-banner {
  position: absolute;
  top: 26px;
  left: 26px;
  z-index: 10;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 15.5px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: none;
}

.banner-sub {
  color: var(--muted);
  font-size: 14px;
}

.status-pill {
  padding: 5px 13px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}

.status-pill-green {
  background: rgba(52, 199, 89, 0.2);
  color: var(--green);
}

#bottom-panel {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 960px; /* 800px * 1.2 */
  padding: 19px 28px;
  border-radius: var(--radius);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.time-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.sub-label {
  font-size: 13px;
  color: var(--muted);
}

#chart-canvas {
  width: 100%;
  height: 120px; /* 100px * 1.2 */
  background: rgba(0, 0, 0, 0.5);
  border-radius: 14px;
  border: 1px solid var(--line);
}

/* 1.2X KOMPAKT VE ADAPTIVE SAĞ PANEL */
#drawer {
  position: absolute;
  top: 19px;
  right: 19px;
  width: min(408px, calc(100vw - 470px)); /* 340px * 1.2 */
  max-height: calc(100vh - 38px);
  border-radius: var(--radius-sm);
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.drawer-head-compact {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}

.badge {
  font-size: 12.5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-green {
  background: rgba(52, 199, 89, 0.2);
  color: var(--green);
}

.badge-red {
  background: rgba(255, 69, 58, 0.2);
  color: var(--red);
}

.drawer-content {
  padding: 10px 14px 12px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  scrollbar-width: none;
}

.drawer-content::-webkit-scrollbar {
  display: none;
}

.sec-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--subtle);
  margin: 6px 0 2px;
  letter-spacing: 0.06em;
}

.formula-box {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1px 0 3px;
  margin: 0;
  overflow-x: hidden;
  font-size: 13px;
}

.formula-box .katex-display {
  margin: 0;
  max-width: 100%;
}

.formula-box .katex {
  font-size: 0.9em;
  line-height: 1.15;
  white-space: normal;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  padding: 3px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 7px;
}

.metric span {
  color: var(--muted);
  flex-shrink: 0;
}

.metric b {
  color: var(--text);
  font-weight: 600;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.accent-text {
  color: var(--blue) !important;
}

.diag-box {
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text);
  margin-top: 7px;
  line-height: 1.35;
  border-radius: 0 7px 7px 0;
}

.marker-ue-red {
  width: 24px; /* 20px * 1.2 */
  height: 24px;
  border-radius: 50%;
  background: var(--red);
  border: 3.5px solid #ffffff;
  box-shadow: 0 0 19px var(--red), 0 0 7px #000000;
  cursor: grab;
  pointer-events: auto;
}

.marker-ue-red:active {
  cursor: grabbing;
}