* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0f1115;
  color: #e6e6e6;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
}
a { color: #7aa2ff; text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Sol kenar cubugu (Steam kutuphanesi ilhamli) --- */
:root { --side-w: 236px; }

.app-shell { display: flex; min-height: 100vh; }

.side-nav {
  width: var(--side-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: #12161d;
  border-right: 1px solid #1f2530;
  /* Icerik uzun olup sayfa scroll olsa bile bar ekrana sabit kalsin -
     kullanici adi/cikis alttaki gorunum sayfa uzunluguna gore kaymasin. */
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
}

.side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 14px;
  border-bottom: 1px solid #1f2530;
}
.side-brand-icon {
  flex: none;
  width: 24px; height: 24px;
  border-radius: 7px;
  background: #182634;
  box-shadow: 0 0 0 1px rgba(103,193,245,.2);
  display: flex; align-items: center; justify-content: center;
}
.side-brand {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #e6e6e6;
  white-space: nowrap;
}
.side-brand b { color: #67c1f5; }

.side-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 14px;
  padding: 8px 10px;
  background: #0d1117;
  border: 1px solid #262c38;
  border-radius: 6px;
  color: #5b6674;
}
.side-search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  color: #e6e6e6;
  font-size: 13px;
  font-family: inherit;
}
.side-search input:focus { outline: none; }
.side-search input::placeholder { color: #5b6674; }

.side-section-label {
  padding: 4px 18px 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #4b5563;
}

.side-list { display: flex; flex-direction: column; padding: 0 10px; gap: 2px; }

.side-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #aeb6c2;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
}
.side-item:hover { background: #1c2330; color: #e6e6e6; text-decoration: none; }
.side-item.active { background: #182634; color: #67c1f5; }
.side-icon { flex: none; display: flex; color: inherit; opacity: .85; }

.side-spacer { flex: 1; }

.side-foot { padding: 10px; border-top: 1px solid #1f2530; }
.side-who { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; }
.side-avatar {
  flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: #182634;
  color: #67c1f5;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 800;
}
.side-who-name { color: #c7d0da; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main-area { flex: 1; min-width: 0; }

.wrap { max-width: 1000px; margin: 0 auto; padding: 32px 32px 60px; }

h2 { margin-top: 32px; }
h2:first-child { margin-top: 0; }

.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form input[type=text] {
  flex: 1;
  padding: 8px 10px;
  background: #1b1f27;
  border: 1px solid #2a2e38;
  border-radius: 4px;
  color: #eee;
}

button, .btn-small {
  padding: 8px 14px;
  background: #2f3b57;
  border: 1px solid #3d4a6b;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
}
button:hover, .btn-small:hover { background: #3a4a6f; text-decoration: none; }
.btn-danger { background: #5a1f24; border-color: #7a2a30; }
.btn-danger:hover { background: #722930; }

.data-table { width: 100%; border-collapse: collapse; margin: 12px 0 24px; }
.data-table th, .data-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #23262f;
}
.data-table th { color: #9aa0aa; font-weight: 600; font-size: 12px; text-transform: uppercase; }

.mono { font-family: "SF Mono", Consolas, monospace; font-size: 12.5px; color: #b9c3d6; }
.muted { color: #7a8090; }
.flash { background: #1c2b1f; border: 1px solid #2e4a34; padding: 10px 14px; border-radius: 4px; }
.error { color: #ff8a8a; }

/* --- Steam kutuphanesi "oyun bilgi cubugu" ilhamli mod satiri --- */
.game-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 10px;
  column-gap: 22px;
  padding: 14px 20px;
  margin-bottom: 8px;
  background: linear-gradient(90deg, #182634 0%, #12161d 70%);
  border: 1px solid #1f2530;
  border-radius: 8px;
}
.game-bar-mode {
  flex: none;
  padding: 8px 16px;
  border-radius: 6px;
  background: linear-gradient(180deg, #3a8ee0 0%, #1a4fc4 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.game-bar-stat {
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: 22px;
  border-left: 1px solid #262f3d;
  white-space: nowrap;
}
.gb-icon { color: #67c1f5; opacity: .8; flex: none; }
.gb-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #7f8b98;
  margin-bottom: 2px;
}
.gb-value { font-size: 13.5px; font-weight: 700; color: #eef3f8; }

.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 24px;
  margin-bottom: 26px;
  background: #0d1117;
  border: 1px solid #262f3d;
  border-radius: 8px;
}
.profile-avatar-wrap { flex: none; }
.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid #2a6fd6;
  display: block;
}
.profile-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  color: #67c1f5;
  background: #161c26;
}
.profile-main { flex: 1 1 auto; min-width: 0; }
.profile-name {
  font-size: 21px;
  font-weight: 800;
  color: #eef3f8;
  line-height: 1.25;
}
.profile-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 12.5px;
  color: #8b96a5;
}
.profile-flag { display: inline-flex; align-items: center; gap: 4px; }
.profile-quote {
  margin-top: 8px;
  font-size: 13px;
  font-style: italic;
  color: #c9b25a;
}
.profile-public-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 12.5px;
  color: #67c1f5;
  text-decoration: none;
}
.profile-public-link:hover { text-decoration: underline; }
.profile-side { flex: none; display: flex; align-items: center; gap: 18px; }
.profile-level-badge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profile-hex {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: linear-gradient(180deg, #3a8ee0 0%, #1a4fc4 100%);
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
.profile-hex-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #7f8b98;
}
.profile-mini-stat { display: flex; align-items: center; gap: 8px; padding-left: 18px; border-left: 1px solid #262f3d; }
.profile-mini-stat .mini-icon { color: #67c1f5; opacity: .8; }
.mini-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #7f8b98;
  margin-bottom: 2px;
}
.mini-value { font-size: 13.5px; font-weight: 700; color: #eef3f8; }

.ammo-card {
  padding: 18px 20px;
  margin-bottom: 26px;
  background: #0d1117;
  border: 1px solid #262f3d;
  border-radius: 8px;
}
.ammo-balance-row {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 14px;
}
.ammo-balance {
  font-size: 26px;
  font-weight: 800;
  color: #f2c94c;
}
.ammo-balance span { font-size: 13px; font-weight: 700; color: #7f8b98; text-transform: uppercase; }
.ammo-balance-real { color: #67c1f5; }
.ammo-balance-empty { color: #4b5563; font-size: 20px; }
.ammo-balance-label {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #7f8b98;
}
.ammo-conflict-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: #5a1f24;
  color: #ff8a8a;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
}
.ammo-add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #10151d;
  border: 1px solid #262f3d;
  border-radius: 6px;
}
.ammo-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #7f8b98;
}
.ammo-add-form input[type=number],
.ammo-add-form input[type=text],
.ammo-add-form select {
  padding: 7px 8px;
  background: #1b1f27;
  border: 1px solid #2a2e38;
  border-radius: 4px;
  color: #eee;
  font-size: 13px;
}
.ammo-add-form input[type=number] { width: 110px; }
.ammo-note-field { flex: 1 1 200px; }
.ammo-note-field input { width: 100%; }
.ammo-pos { color: #4caf50; font-weight: 700; }
.ammo-neg { color: #e05a5a; font-weight: 700; }
.real-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 10px;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}
.real-status-ok { background: #16321c; color: #6fcf7c; }
.real-status-pending { background: #2a2410; color: #f2c94c; }
.real-status-bad { background: #5a1f24; color: #ff8a8a; }
.real-status-muted { background: #1c2330; color: #7f8b98; }

.migration-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 16px 0 26px;
}
.migration-stat {
  flex: 1 1 160px;
  padding: 16px 18px;
  background: #0d1117;
  border: 1px solid #262f3d;
  border-radius: 8px;
}
.migration-stat-val { font-size: 26px; font-weight: 800; color: #eef3f8; }
.migration-stat-lbl {
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #7f8b98;
}
.migration-stat-ok .migration-stat-val { color: #6fcf7c; }
.migration-stat-bad .migration-stat-val { color: #ff8a8a; }
.ammo-row-actions { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ammo-edit { position: relative; }
.ammo-edit > summary {
  cursor: pointer;
  font-size: 12px;
  color: #67c1f5;
  list-style: none;
}
.ammo-edit-form {
  position: absolute;
  z-index: 5;
  top: 100%;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
  padding: 10px;
  width: 200px;
  background: #10151d;
  border: 1px solid #262f3d;
  border-radius: 6px;
}
.ammo-edit-form input, .ammo-edit-form select {
  padding: 6px 7px;
  background: #1b1f27;
  border: 1px solid #2a2e38;
  border-radius: 4px;
  color: #eee;
  font-size: 12.5px;
}

.stat-edit { margin: 10px 0 0; }
.stat-edit > summary {
  cursor: pointer;
  font-size: 12.5px;
  color: #67c1f5;
  width: fit-content;
}
.stat-edit-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  margin-top: 10px;
  padding: 14px;
  background: #10151d;
  border: 1px solid #262f3d;
  border-radius: 6px;
}
.stat-edit-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #7f8b98;
}
.stat-edit-form input[type=number] {
  width: 120px;
  padding: 7px 8px;
  background: #1b1f27;
  border: 1px solid #2a2e38;
  border-radius: 4px;
  color: #eee;
  font-size: 13px;
}

.danger-heading { color: #ff8a8a; margin-top: 40px; }
.danger-box {
  border: 1px solid #5a1f24;
  background: #1a1113;
  border-radius: 6px;
  padding: 16px;
  margin-top: 24px;
}
.danger-box label { display: block; margin: 10px 0; }
.danger-box input[type=text] {
  display: block;
  margin-top: 4px;
  padding: 8px;
  width: 260px;
  background: #1b1f27;
  border: 1px solid #2a2e38;
  border-radius: 4px;
  color: #eee;
}
.season-checklist { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 10px 0; }
.season-check { display: flex !important; align-items: center; gap: 6px; margin: 0 !important; width: auto; font-weight: 400; }
.season-check input[type=checkbox] { width: auto; accent-color: #b23a41; }
.inline-form { display: inline; }

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}
.login-box {
  width: 320px;
  background: #171a21;
  border: 1px solid #2a2e38;
  border-radius: 8px;
  padding: 28px;
}
.login-box h1 { font-size: 18px; margin: 0 0 16px; }
.login-box label { display: block; margin-bottom: 12px; color: #9aa0aa; }
.login-box input {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 10px;
  background: #1b1f27;
  border: 1px solid #2a2e38;
  border-radius: 4px;
  color: #eee;
}
.login-box button { width: 100%; margin-top: 4px; padding: 10px; }

/* --- Giris ekrani --- */
.steam-body {
  height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,.16), transparent 42%),
    radial-gradient(circle at 85% 82%, rgba(103,193,245,.10), transparent 42%),
    #0b0e13;
  font-family: "Figtree", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.steam-window {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, #1b212b 0%, #14181f 100%);
  border: 1px solid rgba(255,255,255,.07);
  border-top-color: rgba(255,255,255,.13);
  border-radius: 12px;
  box-shadow: 0 40px 90px rgba(0,0,0,.6);
  animation: steam-in .35s ease;
}
@keyframes steam-in {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}

.steam-header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 26px 34px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.steam-brand-icon {
  width: 26px; height: 26px;
  flex: none;
  border-radius: 8px;
  background: #182634;
  box-shadow: 0 0 0 1px rgba(103,193,245,.25);
  display: flex; align-items: center; justify-content: center;
}
.steam-brand-text {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
  color: #f3f4f6;
}

.steam-content { padding: 8px 34px 30px; }

.steam-error {
  color: #f87171;
  font-size: 12.5px;
  margin: -6px 0 16px;
}

.steam-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8b949e;
  margin: 18px 0 6px;
}
.steam-label:first-of-type { margin-top: 0; }

.steam-input {
  width: 100%;
  padding: 12px 14px;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  color: #e5e7eb;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .12s ease;
}
.steam-input::placeholder { color: #4a5768; }
.steam-input:focus { outline: none; border-color: #2563eb; }

/* Tarayici otomatik doldurma koyu temayi bozmasin */
.steam-input:-webkit-autofill,
.steam-input:-webkit-autofill:hover,
.steam-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e5e7eb;
  -webkit-box-shadow: 0 0 0 1000px #0d1117 inset;
  box-shadow: 0 0 0 1000px #0d1117 inset;
  transition: background-color 9999s ease-in-out 0s;
}

.steam-remember {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 24px;
  color: #9ca3af;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  width: fit-content;
}
.steam-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.steam-checkbox {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid #30363d;
  background: #0d1117;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .12s ease, border-color .12s ease;
}
.steam-checkbox::after {
  content: "";
  width: 4px; height: 8px;
  border-right: 2px solid #0d1117;
  border-bottom: 2px solid #0d1117;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}
.steam-remember input:checked + .steam-checkbox {
  background: #2563eb;
  border-color: #2563eb;
}
.steam-remember input:checked + .steam-checkbox::after { opacity: 1; }
.steam-remember input:focus-visible + .steam-checkbox {
  box-shadow: 0 0 0 3px rgba(37,99,235,.25);
}

.steam-btn {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #38bdf8, #2563eb);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  cursor: pointer;
  transition: filter .12s ease, transform .12s ease;
}
.steam-btn:hover { filter: brightness(1.08); }
.steam-btn:active { filter: brightness(.94); transform: translateY(1px); }

.steam-bottom-row {
  margin-top: 22px;
  text-align: center;
}
.steam-help { color: #6b7280; font-size: 12px; letter-spacing: .01em; }

/* ============================================================
   Mobil uyum - sabit 236px yan bar telefonda ekranin cogunu
   yiyordu. 860px altinda sidebar yatay, ust sabit bir seride
   donusuyor (JS/hamburger yok - kasitli, sadece CSS).
   ============================================================ */
@media (max-width: 860px) {
  .app-shell { flex-direction: column; }

  .side-nav {
    width: 100%;
    height: auto;
    position: sticky;
    top: 0;
    z-index: 30;
    border-right: none;
    border-bottom: 1px solid #1f2530;
  }

  .side-head { padding: 12px 14px; }

  .side-search { margin: 0 14px 10px; }

  .side-section-label { display: none; }

  .side-list {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 14px 12px;
    gap: 6px;
  }
  .side-item {
    flex: none;
    white-space: nowrap;
    padding: 8px 12px;
  }

  .side-spacer { display: none; }

  .side-foot {
    border-top: 1px solid #1f2530;
    padding: 10px 14px;
  }
  .side-who { padding: 0 0 8px; }

  .wrap { padding: 18px 16px 40px; }

  h2 { margin-top: 20px; }

  /* Genis tablolar yatay scroll ile tasin, sayfa disina tasmasin */
  .data-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .profile-card { flex-wrap: wrap; }
  .profile-side {
    width: 100%;
    justify-content: flex-start;
    padding-top: 14px;
    margin-top: 4px;
    border-top: 1px solid #1f2530;
  }

  .game-bar { flex-direction: column; align-items: flex-start; gap: 12px; }
  .game-bar-stat { padding-left: 0; border-left: none; }

  .search-form, .ammo-add-form, .stat-edit-form {
    flex-direction: column;
    align-items: stretch;
  }
  .ammo-add-form input[type=number],
  .stat-edit-form input[type=number],
  .danger-box input[type=text] {
    width: 100%;
  }

  /* Absolute konumlu duzenleme kutusu dar ekranda tasabiliyordu -
     mobilde satirin altinda normal akisa donsun. */
  .ammo-edit-form {
    position: static;
    width: 100%;
    margin-top: 8px;
  }
  .ammo-row-actions { flex-wrap: wrap; }

  .login-box { width: 100%; max-width: 320px; padding: 22px; }
  .steam-window { max-width: 100%; }
  .steam-header { padding: 20px 20px 14px; }
  .steam-content { padding: 6px 20px 24px; }
}

@media (max-width: 420px) {
  .wrap { padding: 14px 12px 32px; }
  .profile-card { padding: 16px; }
  .profile-avatar, .profile-avatar-fallback { width: 56px; height: 56px; }
  .profile-name { font-size: 18px; }
}
