:root {
  --bg: #050810;
  --panel: #0c1220;
  --panel2: #111a2e;
  --border: #1e3a5f;
  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --green: #30d158;
  --green-dim: rgba(48, 209, 88, 0.15);
  --red: #ff2d55;
  --amber: #ffb020;
  --text: #e8edf5;
  --muted: #7a8ba3;
  --mono: "Cascadia Code", Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.scanlines {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 200;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,.04) 2px, rgba(0,0,0,.04) 4px);
}

.hex-bg {
  pointer-events: none;
  position: fixed; inset: 0; z-index: 0;
  opacity: 0.12;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'%3E%3Cpath d='M28 0 L56 16 L56 48 L28 64 L0 48 L0 16 Z' fill='none' stroke='%2300d4ff' stroke-width='0.5'/%3E%3Cpath d='M28 36 L56 52 L56 84 L28 100 L0 84 L0 52 Z' fill='none' stroke='%2300d4ff' stroke-width='0.5'/%3E%3C/svg%3E");
  background-size: 56px 100px;
}

/* ── NAV ── */
.portal-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.85rem 2rem;
  background: rgba(12, 18, 32, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.portal-brand { text-decoration: none; color: inherit; }
.brand-tag { display: block; font-size: 0.6rem; letter-spacing: 0.2em; color: var(--muted); }
.brand-title { font-size: 0.95rem; font-weight: 800; letter-spacing: 0.12em; color: var(--cyan); }

.portal-links { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.nav-link {
  background: none; border: none; color: var(--muted);
  font: inherit; font-size: 0.8rem; letter-spacing: 0.06em;
  padding: 0.45rem 0.75rem; cursor: pointer; transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--cyan); }
.nav-link.nav-accent { color: var(--cyan); border: 1px solid var(--border); border-radius: 4px; }
.nav-link.nav-accent:hover { background: var(--cyan-dim); }

.nav-play {
  text-decoration: none; font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.08em; color: var(--green);
  border: 1px solid var(--green); padding: 0.45rem 1rem; border-radius: 4px;
  transition: all 0.2s;
}
.nav-play:hover { background: var(--green-dim); box-shadow: 0 0 16px rgba(48,209,88,.25); }

.nav-user { display: flex; align-items: center; gap: 0.6rem; }
/* display kuralları `hidden` özelliğini ezmesin (giriş yokken Çıkış/OYNA görünmesin) */
[hidden] { display: none !important; }
.nav-user-name { font-size: 0.85rem; color: var(--text); font-weight: 600; }
.nav-logout {
  background: none; border: 1px solid var(--border); color: var(--muted);
  font-size: 0.75rem; padding: 0.3rem 0.6rem; cursor: pointer; border-radius: 4px;
}
.nav-logout:hover { color: var(--red); border-color: var(--red); }

/* ── BADGES (shared) ── */
.nav-user-badge, .player-badge {
  display: inline-block;
  font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em;
  padding: 0.2rem 0.5rem; border-radius: 3px; border: 1px solid;
  font-family: var(--mono);
}
.badge-init { color: var(--muted); border-color: var(--border); background: rgba(122,139,163,.08); }
.badge-op { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-dim); }
.badge-rookie { color: #7ee787; border-color: #7ee787; background: rgba(126,231,135,.1); }
.badge-hunter { color: var(--amber); border-color: var(--amber); background: rgba(255,176,32,.1); }
.badge-analyst { color: #a78bfa; border-color: #a78bfa; background: rgba(167,139,250,.1); }
.badge-guardian { color: var(--green); border-color: var(--green); background: var(--green-dim); }
.badge-elite { color: #ffd700; border-color: #ffd700; background: rgba(255,215,0,.12); box-shadow: 0 0 12px rgba(255,215,0,.2); }

/* ── VIEWS ── */
.portal-view {
  display: none;
  position: relative; z-index: 1;
  max-width: 1200px; margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  min-height: calc(100vh - 120px);
}
.portal-view.active { display: block; }

.section-label {
  font-size: 0.65rem; letter-spacing: 0.15em;
  color: var(--muted); margin-bottom: 1.25rem;
}

/* ── HERO ── */
.portal-hero { margin-bottom: 2.5rem; }
.hero-with-mascot {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}
.hero-text { flex: 1; min-width: 280px; max-width: 720px; }
.hero-mascot {
  flex-shrink: 0;
  text-align: center;
  padding: 1rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  max-width: 160px;
}
.hero-mascot-art {
  margin: 0 auto 0.75rem;
  display: flex;
  justify-content: center;
}
.zeynep-sprite {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.4));
  animation: zeynep-idle 3s ease-in-out infinite;
}
@keyframes zeynep-idle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.mascot-label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  font-weight: 700;
}
.mascot-quote {
  margin-top: 0.5rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
  font-style: italic;
}
.hero-kicker { font-family: var(--mono); font-size: 0.75rem; color: var(--cyan); margin-bottom: 0.75rem; }
.portal-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.15; letter-spacing: 0.04em;
  margin-bottom: 1rem;
}
.hero-desc { color: var(--muted); line-height: 1.7; font-size: 0.95rem; }
.hero-desc strong { color: var(--cyan); }

.hero-title { margin-bottom: 0.75rem; }
.hero-protocol {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  color: var(--red, #ff2d55);
  text-shadow: 0 0 24px rgba(255, 45, 85, 0.35);
}
.hero-subtitle {
  display: block;
  font-size: clamp(0.85rem, 2vw, 1.1rem);
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-top: 0.35rem;
  font-weight: 500;
}
.hero-loc { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.25rem; }

.hero-intro {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 3px solid var(--cyan);
  padding: 1.25rem 1.5rem;
  font-size: 0.9rem;
  line-height: 1.75;
  color: #c9d6e8;
  white-space: pre-line;
  margin-bottom: 2rem;
}

.lore-block { margin-bottom: 2.5rem; }
.lore-text {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  font-size: 0.88rem;
  line-height: 1.75;
  color: #b8c5d8;
  white-space: pre-line;
}
.lore-keys .lore-text { border-left: 3px solid var(--green); }

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}
.info-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.85rem 1rem;
}
.info-card-label { font-size: 0.6rem; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.35rem; }
.info-card-value { font-size: 0.8rem; color: var(--cyan); font-weight: 600; }

.score-table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: auto;
}
.score-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.score-table th {
  text-align: left; padding: 0.75rem 1rem;
  font-size: 0.65rem; letter-spacing: 0.1em;
  color: var(--muted); background: var(--panel2);
  border-bottom: 1px solid var(--border);
}
.score-table td { padding: 0.65rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.score-table .pts { color: var(--green); font-family: var(--mono); }

.rules-list-portal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.25rem 2rem;
  font-size: 0.85rem;
  line-height: 1.7;
  color: #b8c5d8;
}
.rules-list-portal li { margin-bottom: 0.5rem; }

.umay-quote-portal {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-left: 3px solid var(--red, #ff2d55);
  background: rgba(255, 45, 85, 0.06);
  color: var(--red, #ff8fa3);
  font-style: italic;
  font-size: 0.88rem;
  white-space: pre-line;
}

.hero-desc { color: var(--muted); line-height: 1.7; font-size: 0.95rem; }

.challenge-hub-section { margin-bottom: 2rem; }

.rules-section {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: rgba(12, 18, 32, 0.55);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.rules-section .score-table-wrap { margin-bottom: 1.25rem; }

.rules-view {
  max-width: 960px;
  margin: 0 auto;
}

.rules-view .section-label {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--cyan);
  margin-bottom: 1.5rem;
}

/* ── COMMAND CENTER (ana ekran) ── */
.command-center {
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 0 40px rgba(0, 212, 255, 0.06);
}

.command-center-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.command-title { margin-bottom: 0.35rem; }
.command-subtitle {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  font-weight: 400;
  margin-top: 0.35rem;
}

.command-hint {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
  margin-top: 0.75rem;
  opacity: 0.85;
}

.tabs-label {
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.tpl-stage-hero {
  min-height: 480px;
  border-color: rgba(0, 212, 255, 0.35);
  box-shadow: inset 0 0 60px rgba(0, 212, 255, 0.04);
}

.tpl-stage-label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  color: var(--cyan);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.portal-details {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(12, 18, 32, 0.5);
}

.portal-details summary {
  cursor: pointer;
  padding: 1rem 1.25rem;
  list-style: none;
  user-select: none;
}

.portal-details summary::-webkit-details-marker { display: none; }

.portal-details summary::before {
  content: "▸ ";
  color: var(--cyan);
}

.portal-details[open] summary::before { content: "▾ "; }

.details-body { padding: 0 1.25rem 1.25rem; }

.challenge-hub-layout {
  display: grid;
  grid-template-columns: 200px 1fr 300px;
  gap: 1.25rem;
  align-items: stretch;
}

@media (max-width: 1100px) {
  .challenge-hub-layout { grid-template-columns: 1fr; }
}

/* ── GRID ── */
.portal-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* ── VERTICAL MAP ── */
.vertical-map {
  display: flex; flex-direction: column; gap: 0;
  position: relative;
}

.map-node {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem; align-items: center;
  width: 100%; text-align: left;
  padding: 1rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  margin-bottom: -1px;
  cursor: pointer;
  transition: all 0.2s;
  color: inherit;
  font: inherit;
  position: relative;
}

.map-node::after {
  content: "";
  position: absolute;
  left: 25px; bottom: -1px;
  width: 2px; height: 14px;
  background: var(--border);
}
.map-node:last-child::after { display: none; }

.map-node.active, .map-node.selected {
  border-color: var(--cyan);
  box-shadow: inset 0 0 24px var(--cyan-dim), 0 0 20px rgba(0,212,255,.08);
  z-index: 1;
}
.map-node.locked { opacity: 0.55; cursor: default; }
.map-node.locked:hover { border-color: var(--border); box-shadow: none; }

.map-node-icon {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  background: var(--panel2);
}
.map-node.active .map-node-icon {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(0,212,255,.4);
  color: var(--cyan);
}
.map-node.locked .map-node-icon { color: var(--muted); font-size: 0.9rem; }

.map-node-title { display: block; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.08em; }
.map-node-sub { display: block; font-size: 0.75rem; color: var(--muted); margin: 0.15rem 0; }
.map-node-status { font-family: var(--mono); font-size: 0.65rem; letter-spacing: 0.06em; }
.map-node.active .map-node-status { color: var(--cyan); }
.map-node.locked .map-node-status { color: var(--muted); }

/* ── DETAIL PANEL ── */
.detail-panel {
  background: rgba(12, 18, 32, 0.85);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  backdrop-filter: blur(4px);
}

.detail-status {
  font-family: var(--mono); font-size: 0.7rem;
  letter-spacing: 0.08em; margin-bottom: 0.75rem;
}
.detail-status.status-active { color: var(--cyan); }
.detail-status.status-locked { color: var(--muted); }

.detail-panel h3 {
  font-size: 1.35rem; letter-spacing: 0.1em;
  color: var(--cyan); margin-bottom: 0.25rem;
}
.detail-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; }
.detail-desc { font-size: 0.85rem; line-height: 1.65; color: #c9d6e8; margin-bottom: 1.25rem; }

.detail-meta {
  display: flex; gap: 1rem;
  font-family: var(--mono); font-size: 0.75rem;
  color: var(--amber); margin-bottom: 1rem;
}

.detail-progress { margin-bottom: 1.25rem; }
.progress-bar {
  height: 4px; background: var(--panel2);
  border-radius: 2px; overflow: hidden; margin-bottom: 0.4rem;
}
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--cyan), var(--green));
  border-radius: 2px; transition: width 0.4s;
}
.progress-label { font-size: 0.72rem; color: var(--muted); font-family: var(--mono); }

.btn-portal {
  display: inline-block; width: 100%; text-align: center;
  font: inherit; font-size: 0.85rem; font-weight: 700;
  letter-spacing: 0.1em; padding: 0.85rem 1.5rem;
  border: none; cursor: pointer; text-decoration: none;
  transition: all 0.2s;
}
.btn-primary {
  background: rgba(0, 212, 255, 0.12);
  border: 2px solid var(--cyan); color: var(--cyan);
}
.btn-primary:hover:not(.disabled) {
  background: var(--cyan); color: var(--bg);
  box-shadow: 0 0 24px rgba(0,212,255,.35);
}
.btn-primary.disabled {
  opacity: 0.45; cursor: not-allowed;
  border-color: var(--border); color: var(--muted); background: transparent;
}

/* ── LEADERBOARD PREVIEW ── */
.lb-preview {
  grid-column: 2;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
}
.lb-preview-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.lb-preview-head .section-label { margin-bottom: 0; }
.lb-more {
  background: none; border: none; color: var(--cyan);
  font-size: 0.75rem; cursor: pointer; letter-spacing: 0.04em;
}
.lb-more:hover { text-decoration: underline; }

.lb-row {
  display: grid; grid-template-columns: 28px 1fr auto;
  gap: 0.5rem; align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: 0.85rem;
}
.lb-rank { font-family: var(--mono); color: var(--muted); font-size: 0.8rem; }
.lb-name { font-weight: 600; }
.lb-pts { font-family: var(--mono); color: var(--green); font-size: 0.8rem; }
.lb-empty, .lb-loading { color: var(--muted); font-size: 0.85rem; padding: 0.5rem 0; }

/* ── AUTH ── */
.auth-card {
  max-width: 440px; margin: 2rem auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
}
.auth-kicker { font-family: var(--mono); font-size: 0.7rem; color: var(--cyan); margin-bottom: 0.5rem; }
.auth-card h2 { font-size: 1.5rem; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.auth-desc { color: var(--muted); font-size: 0.85rem; margin-bottom: 1.5rem; line-height: 1.5; }

.auth-form label {
  display: block; font-size: 0.75rem;
  letter-spacing: 0.06em; color: var(--muted);
  margin-bottom: 1rem;
}
.auth-form input {
  display: block; width: 100%; margin-top: 0.35rem;
  background: #060a10; border: 1px solid var(--border);
  color: var(--text); padding: 0.7rem 0.85rem;
  font-family: var(--mono); font-size: 0.9rem; border-radius: 4px;
}
.auth-form input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0,212,255,.12);
}

.guide-picker {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.guide-picker legend {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--cyan);
  padding: 0 0.35rem;
}

.guide-picker-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.guide-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.guide-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.65rem;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-align: center;
}

.guide-option input { display: none; }

.guide-option.selected,
.guide-option:has(input:checked) {
  border-color: var(--cyan);
  box-shadow: inset 0 0 24px rgba(0, 212, 255, 0.08);
}

.guide-option-name {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
}

.guide-option-sub {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.35;
}

.guide-option-art {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 74px;
  padding: 0.25rem;
  border-radius: 6px;
  background: rgba(6, 10, 16, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.guide-option-art svg,
.guide-option-art img {
  display: block;
}

/* Avatar seçimi: iki kart birebir aynı boyutta, görsel kutuyu doldurur */
.guide-photo {
  display: block;
  object-fit: cover;
  object-position: center top;
  border-radius: 6px;
}
.auth-form .guide-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}
.guide-option-art:has(.guide-photo) {
  width: 100%;
  max-width: 132px;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  min-height: 0;
}
.guide-option-art .guide-photo { width: 100%; height: 100%; }

/* Ana sayfa: seçili avatar + rumuz */
.hero-mascot-art .guide-photo {
  width: 104px;
  height: 138px;
  border: 1px solid rgba(0, 212, 255, 0.35);
}


.auth-feedback {
  padding: 0.65rem 0.85rem; border-radius: 4px;
  font-size: 0.85rem; margin-bottom: 1rem;
}
.auth-feedback.ok { background: var(--green-dim); border: 1px solid var(--green); color: var(--green); }
.auth-feedback.err { background: rgba(255,45,85,.1); border: 1px solid var(--red); color: #ff8fa3; }

.verify-dev-box {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--cyan);
  background: rgba(0, 255, 255, 0.06);
  border-radius: 4px;
}
.verify-dev-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cyan);
  margin: 0 0 0.5rem;
}
.verify-dev-link {
  word-break: break-all;
  color: var(--green);
  font-size: 0.85rem;
}

.auth-switch { margin-top: 1.25rem; font-size: 0.85rem; color: var(--muted); text-align: center; }
.auth-switch button {
  background: none; border: none; color: var(--cyan);
  cursor: pointer; font: inherit; text-decoration: underline;
}
.link-btn {
  background: none; border: none; color: var(--cyan);
  cursor: pointer; font: inherit; text-decoration: underline; padding: 0 0 0 0.4rem;
}
.login-email-line { margin-bottom: 1rem; }
.auth-help { text-align: center; margin: 1.25rem 0 0; font-size: 0.8rem; }

/* ── FULL LEADERBOARD ── */
.lb-full { max-width: 800px; margin: 0 auto; }
.lb-full-head h2 { font-size: 1.5rem; letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.lb-full-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.lb-full-head .lb-live-badge.lb-status-frozen {
  color: var(--amber);
  border-color: rgba(255, 176, 32, 0.4);
  background: rgba(255, 176, 32, 0.08);
}
.lb-full-head .lb-frozen { width: 100%; margin-bottom: 0; color: var(--amber); font-size: 0.85rem; }
.lb-row-self { background: rgba(0, 212, 255, 0.06); }
.lb-you {
  font-size: 0.65rem;
  color: var(--cyan);
  letter-spacing: 0.06em;
  margin-left: 0.25rem;
}

.lb-table-wrap {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.lb-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.lb-table th {
  text-align: left; padding: 0.85rem 1rem;
  font-size: 0.65rem; letter-spacing: 0.12em;
  color: var(--muted); background: var(--panel2);
  border-bottom: 1px solid var(--border);
}
.lb-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.lb-rank-cell { font-family: var(--mono); color: var(--muted); width: 48px; }
.lb-pts-cell { font-family: var(--mono); color: var(--green); font-weight: 700; }
.lb-date { font-size: 0.8rem; color: var(--muted); }

/* ── INFRA GUIDE ── */
.infra-block { margin-top: 2rem; }
.infra-overview {
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  max-width: 800px;
}
.infra-sections {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.infra-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.1rem 1.25rem;
}
.infra-card h4 {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
  color: var(--cyan);
}
.infra-card ol {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.55;
}
.infra-card li { margin-bottom: 0.35rem; }
.infra-api-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.infra-api-title {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0.85rem 1rem;
  background: var(--panel2);
  border-bottom: 1px solid var(--border);
}
.infra-api-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.infra-api-table th {
  text-align: left;
  padding: 0.65rem 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.infra-api-table td { padding: 0.6rem 1rem; border-bottom: 1px solid rgba(255,255,255,.04); }
.infra-api-table code {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--green);
}
.method-post { color: var(--amber); font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }
.method-get { color: var(--cyan); font-family: var(--mono); font-size: 0.72rem; font-weight: 700; }

.portal-footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.7rem; color: var(--muted);
  letter-spacing: 0.06em;
}

@media (max-width: 960px) {
  .portal-grid { grid-template-columns: 1fr; }
  .map-section { grid-row: auto; }
  .lb-preview { grid-column: 1; }
  .portal-nav { padding: 0.75rem 1rem; }
}

/* ── LİDERLİK TABLOSU (yeniden tasarım) ── */
.lb-full { max-width: 860px; }
.lb-full-head { justify-content: flex-start; }
.lb-full-head h2 { margin-bottom: 0; }
.lb-full-head .lb-live-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); border: 1px solid rgba(48, 209, 88, 0.4); background: rgba(48, 209, 88, 0.08);
  border-radius: 999px; padding: 0.25rem 0.7rem;
}
.lb-full-head .lb-live-badge::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 8px currentColor; animation: lb-nabiz 1.6s ease-in-out infinite;
}
.lb-full-head .lb-live-badge.lb-status-frozen::before { animation: none; }
@keyframes lb-nabiz { 50% { opacity: 0.3; } }

.lb-table { table-layout: fixed; }
.lb-table th.lb-th-rank { width: 64px; text-align: center; }
.lb-table th.lb-th-pts { width: 140px; text-align: right; }
.lb-table th.lb-th-date { width: 170px; text-align: right; }
.lb-tr { transition: background 0.2s; }
.lb-tr:hover { background: rgba(255, 255, 255, 0.02); }
.lb-tr td { padding: 0.85rem 1rem; vertical-align: middle; }
.lb-tr:last-child td { border-bottom: none; }
.lb-rank-cell { text-align: center; }
.lb-rank-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  font-family: var(--mono); font-weight: 800; font-size: 0.85rem;
  color: var(--muted); border: 1px solid var(--border); background: var(--panel2);
}
.lb-medal-1 { color: #1a1300; background: linear-gradient(135deg, #ffe27a, #f5b400); border-color: #ffd34d; box-shadow: 0 0 12px rgba(255, 200, 40, 0.45); }
.lb-medal-2 { color: #11161d; background: linear-gradient(135deg, #f1f5fb, #aab6c6); border-color: #d6dee8; }
.lb-medal-3 { color: #1d0f05; background: linear-gradient(135deg, #f0b27a, #b9692c); border-color: #e09a5c; }
.lb-name-cell { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-top .lb-name-cell { font-weight: 800; }
.lb-pts-cell { text-align: right; font-size: 1rem; }
.lb-bolt { color: var(--amber); }
.lb-date { text-align: right; white-space: nowrap; }
.lb-row-self { background: rgba(0, 212, 255, 0.07); box-shadow: inset 3px 0 0 var(--cyan); }
.lb-row-self:hover { background: rgba(0, 212, 255, 0.1); }
.lb-you {
  display: inline-block; vertical-align: middle; margin-left: 0.5rem;
  font-family: var(--mono); font-size: 0.6rem; font-weight: 800; letter-spacing: 0.12em;
  color: #001820; background: var(--cyan); border-radius: 4px; padding: 0.12rem 0.4rem;
}
.lb-table .lb-empty, .lb-table .lb-loading { text-align: center; padding: 2rem 1rem; }

@media (max-width: 640px) {
  .lb-table th.lb-th-date, .lb-table td.lb-date { display: none; }
  .lb-table th.lb-th-pts { width: 100px; }
  .lb-table th.lb-th-rank { width: 48px; }
  .lb-tr td { padding: 0.7rem 0.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lb-full-head .lb-live-badge::before { animation: none; }
}

/* Çıkış onayı */
.modal { position: fixed; inset: 0; z-index: 250; background: rgba(2, 5, 10, 0.75); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal[hidden] { display: none; }
.modal-box { width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--amber, #ffb020); border-radius: 10px; padding: 1.25rem 1.4rem; box-shadow: 0 0 30px rgba(255, 176, 32, 0.15); }
.modal-box h3 { color: var(--amber, #ffb020); margin-bottom: 0.75rem; font-size: 1.05rem; }
.modal-list { margin-left: 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.modal-list li { color: var(--text); line-height: 1.55; font-size: 0.9rem; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: flex-end; margin-top: 1.1rem; flex-wrap: wrap; }
.modal-actions .btn-portal { width: auto; min-width: 140px; margin: 0; }
#logout-cancel { background: transparent; color: var(--text); border: 1px solid var(--border); }
#logout-cancel:hover { border-color: var(--cyan); color: var(--cyan); }
