/* BalkanGames Portal — Lobi + Login (koyu, DigitalOcean tarzı; mor yok) */
:root {
  --bg: #080b12;
  --bg2: #0b0f18;
  --surface: #111725;
  --surface2: #151c2c;
  --border: #1e2636;
  --border2: #2a3446;
  --text: #e8edf5;
  --muted: #8a97ab;
  --faint: #5d6a7e;
  --accent: #2f80ff; /* DO mavi */
  --accent-ink: #0b1220;
  --teal: #1fd1a3;
  --green: #26c281;
  --amber: #f5a524;
  --danger: #ef4756;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  background:
    radial-gradient(1100px 700px at 50% -12%, rgba(47, 128, 255, 0.12), transparent 60%),
    radial-gradient(800px 500px at 100% 0%, rgba(31, 209, 163, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 70px; }

/* ---- Top bar ---- */
.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 22px; border-bottom: 1px solid var(--border);
  background: rgba(10, 14, 22, 0.72); position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(10px);
}
.topbar .logo { height: 30px; }
.topbar .brand { font-weight: 800; letter-spacing: .3px; font-size: 15px; }
.topbar .brand b { color: var(--accent); }
.topbar .spacer { flex: 1; }
.topbar .who { color: var(--muted); font-size: 13px; }
.topbar .who b { color: var(--text); }

.btn {
  border: 1px solid var(--border2); background: var(--surface2);
  color: var(--text); padding: 9px 15px; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 13px; font-family: inherit;
  transition: transform .06s, border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; }
.btn.primary:hover { background: #1f6fef; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }

input, select, textarea {
  width: 100%; background: #0c1119; border: 1px solid var(--border2); color: var(--text);
  border-radius: 10px; padding: 12px 13px; font-size: 14px; font-family: inherit;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.16); }
label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; font-weight: 500; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.err { color: var(--danger); font-size: 13px; min-height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; border: 1px solid var(--border2); color: var(--muted); }
.pill.admin { color: var(--amber); border-color: rgba(245, 165, 36, .4); background: rgba(245, 165, 36, .08); }
.pill.tester { color: var(--teal); border-color: rgba(31, 209, 163, .4); background: rgba(31, 209, 163, .08); }
.hidden { display: none !important; }

/* ---- Login ---- */
.login-page { display: grid; place-items: center; min-height: 100dvh; padding: 20px; }
.login-card { width: min(400px, 100%); padding: 34px 30px; }
.login-head { text-align: center; margin-bottom: 22px; }
.login-head .logo { height: 60px; margin-bottom: 14px; }
.login-head h1 { font-size: 19px; letter-spacing: .5px; font-weight: 800; }
.login-head h1 b { color: var(--accent); }
.login-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.login-card .btn { width: 100%; margin-top: 22px; padding: 13px; }

/* ---- Lobby ---- */
.hero { padding: 30px 0 6px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.hero h2 { font-size: 26px; font-weight: 800; letter-spacing: -.4px; }
.hero p { color: var(--muted); margin-top: 6px; font-size: 14px; max-width: 620px; }
.hero .count { color: var(--faint); font-size: 13px; font-weight: 600; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 22px; }
.game {
  position: relative; overflow: hidden; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; border-radius: 16px;
  border: 1px solid var(--border); background: var(--surface);
  transition: transform .14s ease, border-color .15s, box-shadow .15s;
}
.game:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--accent-c) 60%, var(--border2)); box-shadow: var(--shadow-lg); }
.game .thumb {
  height: 158px; position: relative; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(420px 200px at 50% 8%, color-mix(in srgb, var(--accent-c) 40%, transparent), transparent 72%),
    linear-gradient(180deg, #0c1220, #0a0e17);
}
.game .thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 11, 18, .85)); }
.game .thumb .name { position: relative; z-index: 1; font-weight: 900; font-size: 30px; letter-spacing: 2px; color: var(--accent-c); text-shadow: 0 0 26px color-mix(in srgb, var(--accent-c) 70%, transparent); }
.game .thumb .demo { position: absolute; top: 12px; left: 12px; z-index: 2; font-size: 10px; font-weight: 800; letter-spacing: 1px; padding: 3px 8px; border-radius: 20px; background: rgba(0, 0, 0, .45); border: 1px solid #ffffff2a; color: #d7e0ee; }
.game .body { padding: 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game .tag { font-size: 13.5px; color: var(--muted); line-height: 1.45; min-height: 38px; }
.game .meta { display: flex; gap: 7px; flex-wrap: wrap; font-size: 11px; }
.game .meta span { border: 1px solid var(--border2); padding: 3px 9px; border-radius: 20px; color: var(--muted); }
.game .foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }
.game .prog { flex: 1; height: 6px; border-radius: 6px; background: #0c1119; overflow: hidden; }
.game .prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-c), color-mix(in srgb, var(--accent-c) 40%, #fff)); }
.game .status { font-size: 11.5px; color: var(--accent-c); font-weight: 700; white-space: nowrap; }
.game .play { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--text); opacity: .0; transition: opacity .15s; }
.game:hover .play { opacity: 1; }

/* ---- Player wrapper (cihaz test modu) ---- */
.player { height: 100dvh; display: flex; flex-direction: column; }
.ptoolbar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: rgba(10, 14, 22, 0.9); flex-wrap: wrap; }
.ptoolbar .ptitle { font-weight: 800; font-size: 14px; letter-spacing: .3px; }
.ptoolbar .spacer { flex: 1; }
.pdevices { display: flex; gap: 4px; background: #0c1119; border: 1px solid var(--border2); border-radius: 10px; padding: 3px; }
.pdev { border: none; background: transparent; color: var(--muted); padding: 7px 12px; border-radius: 8px; cursor: pointer; font-size: 12.5px; font-weight: 600; font-family: inherit; }
.pdev:hover { color: var(--text); }
.pdev.active { background: var(--accent); color: #fff; }
.plink { color: var(--muted); font-size: 13px; cursor: pointer; }
.plink:hover { color: var(--text); }
.pdim { color: var(--faint); font-size: 12px; font-family: ui-monospace, monospace; }
.pstage { flex: 1; overflow: hidden; display: grid; place-items: center; background: radial-gradient(700px 500px at 50% 0%, rgba(47,128,255,.06), transparent 60%), #06090f; padding: 20px; }
.pframe { position: relative; border-radius: 22px; background: #000; box-shadow: 0 20px 60px rgba(0,0,0,.6), 0 0 0 2px #1e2636; overflow: hidden; }
/* iframe cihaz çözünürlüğünde (px), sol-üstten ölçeklenir; .pframe zaten ölçekli footprint boyutunda */
.pframe iframe { display: block; border: 0; background: #000; transform-origin: top left; }

/* ---- Modal (şifre değiştir) ---- */
.modal-back { position: fixed; inset: 0; background: rgba(4, 6, 10, .7); display: grid; place-items: center; z-index: 50; padding: 20px; backdrop-filter: blur(3px); }
.modal-card { width: min(380px, 100%); padding: 26px; }
.modal-card h3 { font-size: 16px; font-weight: 700; }
.modal-card .sub { color: var(--muted); font-size: 12.5px; margin: 3px 0 6px; }
