/* Playtime: ortak stiller (renkler, düzen, üst menü, düğmeler, dashboard, Premium) */

:root {
  color-scheme: dark;
  --ink: #09070f;
  --ink-2: #0d0a17;
  --panel: #130f22;
  --panel-2: #191331;
  --line: #2a2246;
  --line-soft: #1d1736;
  --text: #f1ecff;
  --muted: #a29ac0;
  --faint: #6f6690;
  --violet: #a06bff;
  --violet-rgb: 160, 107, 255;
  --btn: #7c4dff;
  --gold: #f3c552;
  --mint: #5eead4;
  --danger: #ff7a98;
  --font-display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 14px;
  --radius-lg: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; background: var(--ink); }
body {
  margin: 0;
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(56rem 34rem at 88% -8%, rgba(var(--violet-rgb), 0.13), transparent 62%),
    radial-gradient(40rem 28rem at -6% 40%, rgba(var(--violet-rgb), 0.06), transparent 60%);
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; margin: 0; letter-spacing: -0.025em; }
p { margin: 0; }
.muted { color: var(--muted); }
.wrap { width: min(74rem, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(46rem, 100% - 2.5rem); }
.center { text-align: center; }
.inline { display: inline; margin: 0; }
.small { font-size: 0.85rem; }

:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--btn); color: #fff; padding: 0.5rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { left: 0.5rem; }

/* ---------- Üst menü ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(9, 7, 15, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font: 700 1.1rem var(--font-display); letter-spacing: -0.02em; }
.logo-mark { width: 1.9rem; height: 1.9rem; filter: drop-shadow(0 0 10px rgba(var(--violet-rgb), 0.45)); }
.nav { display: flex; gap: 1.6rem; margin-left: 1rem; }
.nav a { position: relative; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 0.95rem; padding: 0.25rem 0; transition: color 0.2s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--violet); transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a:hover::after { transform: scaleX(1); }
.bar-end { margin-left: auto; display: flex; align-items: center; gap: 0.75rem; }
.user-chip { display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none; font-weight: 600; font-size: 0.92rem; padding: 0.25rem 0.8rem 0.25rem 0.3rem; border: 1px solid var(--line); border-radius: 999px; transition: border-color 0.2s; }
.user-chip:hover { border-color: var(--violet); }
.user-chip img { border-radius: 50%; }
.user-chip span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lang-switch { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2rem; padding: 0 0.55rem; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-decoration: none; transition: color 0.2s, border-color 0.2s; }
.lang-switch:hover { border-color: var(--violet); color: var(--text); }

/* Dar ekran menüsü: JavaScript gerektirmeyen <details> */
.mnav { display: none; position: relative; }
.mnav summary { list-style: none; cursor: pointer; width: 2.25rem; height: 2rem; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; }
.mnav summary::-webkit-details-marker { display: none; }
.mnav summary i, .mnav summary i::before, .mnav summary i::after { display: block; width: 1rem; height: 2px; background: var(--text); border-radius: 2px; content: ""; position: relative; }
.mnav summary i::before { position: absolute; top: -5px; }
.mnav summary i::after { position: absolute; top: 5px; }
.mnav nav { position: absolute; right: 0; top: calc(100% + 0.6rem); min-width: 13rem; display: grid; gap: 0.15rem; padding: 0.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 50px -20px #000; }
.mnav nav a { padding: 0.6rem 0.75rem; border-radius: 8px; text-decoration: none; color: var(--text); font-weight: 500; }
.mnav nav a:hover { background: var(--panel-2); }

/* ---------- Düğmeler ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: 600 0.92rem var(--font-body); padding: 0.62rem 1.15rem; border-radius: 10px; border: 1px solid transparent; text-decoration: none; cursor: pointer; transition: box-shadow 0.25s, background 0.2s, border-color 0.2s, transform 0.2s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 0.9rem 1.55rem; font-size: 1rem; border-radius: 12px; }
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.85rem; }
.btn-solid { background: var(--btn); color: #fff; box-shadow: 0 0 0 0 rgba(var(--violet-rgb), 0.5); }
.btn-solid:hover { background: #8a5cff; box-shadow: 0 8px 32px -6px rgba(var(--violet-rgb), 0.7); transform: translateY(-1px); }
.btn-line { border-color: var(--line); color: var(--text); background: transparent; }
.btn-line:hover { border-color: var(--violet); background: rgba(var(--violet-rgb), 0.08); }
.btn-quiet { background: transparent; color: var(--muted); border-color: var(--line); }
.btn-quiet:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(255, 122, 152, 0.4); }
.btn-danger:hover { background: rgba(255, 122, 152, 0.1); border-color: var(--danger); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.tag { display: inline-block; font-size: 0.72rem; font-weight: 600; color: var(--violet); border: 1px solid var(--line); border-radius: 999px; padding: 0.1rem 0.6rem; vertical-align: middle; }
.tag-premium { color: #fff; background: #3b1a8f; border-color: #5b34c7; }
.tag-warn { color: var(--danger); border-color: rgba(255, 122, 152, 0.4); }
.tag-ok { color: var(--mint); border-color: rgba(94, 234, 212, 0.35); }

/* ---------- Yüklenirken tek seferlik giriş (JS varsa) ---------- */
.js [data-fx] { opacity: 0; transform: translateY(10px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js [data-fx].is-in { opacity: 1; transform: none; }

/* ---------- Dashboard ---------- */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --a: 360deg; } }

.dash { padding: 2.5rem 0 5rem; }
.profile-strip { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 2rem; }
.avatar-ring { position: relative; flex: none; width: 5rem; height: 5rem; padding: 3px; border-radius: 50%; background: conic-gradient(from var(--a), var(--violet), rgba(var(--violet-rgb), 0.08) 45%, var(--violet)); animation: spin 8s linear infinite; }
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--ink); object-fit: cover; }
.profile-strip h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.notice { padding: 1rem 1.2rem; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); margin-bottom: 1.5rem; }
.notice strong { color: var(--text); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 1.25rem; }
.stat { padding: 1.2rem 1.3rem; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s, transform 0.3s var(--ease); }
.stat:hover { border-color: rgba(var(--violet-rgb), 0.5); transform: translateY(-2px); }
.stat-label { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.stat-value { font: 700 1.6rem var(--font-display); letter-spacing: -0.02em; margin-top: 0.35rem; font-variant-numeric: tabular-nums; }
.stat-sub { color: var(--muted); font-size: 0.82rem; margin-top: 0.2rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; margin-bottom: 1.25rem; }
.panel { padding: 1.5rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 1.25rem; transition: border-color 0.3s; }
.panel:hover { border-color: rgba(var(--violet-rgb), 0.28); }
.dash-grid .panel { margin-bottom: 0; }
.panel h2 { font-size: 1.1rem; margin-bottom: 1.15rem; }

.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.games li { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr 8.5rem; align-items: center; gap: 0.9rem; }
.games-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.games-bar { height: 0.55rem; background: rgba(255, 255, 255, 0.06); border-radius: 99px; overflow: hidden; }
.games-bar i { display: block; height: 100%; width: var(--w, 100%); background: linear-gradient(90deg, #6d3df0, var(--violet)); border-radius: 99px; transform-origin: left; }
.js .games-bar i { transform: scaleX(0); transition: transform 1s var(--ease); transition-delay: calc(min(var(--d, 0), 8) * 90ms + 250ms); }
.js .is-in .games-bar i { transform: none; }
.games-time { text-align: right; font-weight: 600; font-size: 0.9rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.games-time small { display: block; color: var(--muted); font-weight: 500; font-size: 0.75rem; }

.recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.8rem; }
.recent li { display: flex; flex-direction: column; border-bottom: 1px solid var(--line-soft); padding-bottom: 0.8rem; }
.recent li:last-child { border: 0; padding-bottom: 0; }
.recent span { font-weight: 600; }
.recent small { color: var(--muted); }

.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 34rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: 0.82rem; padding: 0 0.75rem 0.7rem 0; }
.table td { padding: 0.75rem 0.75rem 0.75rem 0; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr { transition: background 0.2s; }
.table tbody tr:hover { background: rgba(var(--violet-rgb), 0.05); }
.g-cell { display: inline-flex; align-items: center; gap: 0.7rem; font-weight: 600; }
.g-icon { width: 2.5rem; height: 2.5rem; border-radius: 12px; object-fit: cover; flex: none; }
.g-fallback { display: inline-flex; align-items: center; justify-content: center; background: #2a1b52; color: var(--violet); font: 700 1rem var(--font-display); }
.addable { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.addable li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* ---------- Premium sayfası ---------- */
.page-title { font-size: clamp(1.7rem, 3.6vw, 2.4rem); margin-bottom: 1.25rem; }
.lead-sm { margin-bottom: 1.25rem; max-width: 40rem; }
.flash { padding: 0.85rem 1.1rem; border-radius: 12px; margin-bottom: 1.25rem; border: 1px solid var(--line); background: var(--panel); }
.flash-ok { border-color: #5b34c7; }
.flash-error { border-color: #b4234a; background: #1c0b13; }
.sub-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.1rem; }
.sub-head h2 { margin-bottom: 0.3rem; }
.slot-count { font: 500 0.85rem var(--font-body); color: var(--muted); text-align: right; }
.slot-count strong { font: 700 1.8rem var(--font-display); color: var(--text); }
.slot-count span { display: block; }
.slots { list-style: none; margin: 0 0 1.1rem; padding: 0; display: grid; gap: 0.6rem; }
.slots li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.7rem 0.9rem; border: 1px solid var(--line); border-radius: 12px; flex-wrap: wrap; }
.assign { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 0.5rem 0; }
.assign label { font-weight: 600; font-size: 0.9rem; }
select, input[type="text"], input[type="number"], input[type="search"] { background: var(--ink); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 0.6rem 0.8rem; font: 500 0.92rem var(--font-body); }
select:focus, input:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px rgba(var(--violet-rgb), 0.2); }
.assign select { min-width: 14rem; }
.plan-mini { margin: 1rem 0; padding-left: 1.1rem; display: grid; gap: 0.4rem; }

/* ---------- Hata sayfaları ---------- */
.err-code { font: 700 clamp(3.5rem, 11vw, 7rem) var(--font-display); letter-spacing: -0.05em; color: var(--violet); text-shadow: 0 0 60px rgba(var(--violet-rgb), 0.5); line-height: 1; }
.page-error { padding: clamp(3rem, 8vw, 6rem) 0; }
.page-error h1 { margin: 0.75rem 0 1rem; font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.page-error .lead { margin: 0 auto 1.75rem; color: var(--muted); font-size: 1.1rem; max-width: 32rem; }

/* ---------- Alt bilgi ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding: 2.75rem 0 2rem; background: var(--ink-2); }
.foot { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.foot p { margin-top: 0.6rem; font-size: 0.92rem; }
.foot-links { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: flex-start; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.93rem; transition: color 0.2s; }
.foot-links a:hover { color: var(--text); }
.fine { margin-top: 2rem; font-size: 0.8rem; }

/* ---------- Duyarlı ---------- */
@media (max-width: 62rem) {
  .stats { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 48rem) {
  .nav { display: none; }
  .mnav { display: block; }
  .bar { gap: 0.75rem; }
}
@media (max-width: 40rem) {
  .stats { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .stat { padding: 1rem; }
  .stat-value { font-size: 1.25rem; }
  .bar-end { gap: 0.5rem; }
  .bar-end .btn { white-space: nowrap; padding-inline: 0.7rem; }
  .user-chip span { display: none; }
  .games li { grid-template-columns: 1fr auto; }
  .games-bar { grid-column: 1 / 3; grid-row: 2; }
}

/* ---------- Hareketi azalt ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; }
  .js [data-fx] { opacity: 1; transform: none; }
  .js .games-bar i { transform: none; }
}

/* ---------- Çubuk genişlikleri: CSP satır içi style'a izin vermediği için sınıfla ---------- */
.w-0{--w:0%}.w-1{--w:1%}.w-2{--w:2%}.w-3{--w:3%}.w-4{--w:4%}.w-5{--w:5%}.w-6{--w:6%}.w-7{--w:7%}.w-8{--w:8%}.w-9{--w:9%}
.w-10{--w:10%}.w-11{--w:11%}.w-12{--w:12%}.w-13{--w:13%}.w-14{--w:14%}.w-15{--w:15%}.w-16{--w:16%}.w-17{--w:17%}.w-18{--w:18%}.w-19{--w:19%}
.w-20{--w:20%}.w-21{--w:21%}.w-22{--w:22%}.w-23{--w:23%}.w-24{--w:24%}.w-25{--w:25%}.w-26{--w:26%}.w-27{--w:27%}.w-28{--w:28%}.w-29{--w:29%}
.w-30{--w:30%}.w-31{--w:31%}.w-32{--w:32%}.w-33{--w:33%}.w-34{--w:34%}.w-35{--w:35%}.w-36{--w:36%}.w-37{--w:37%}.w-38{--w:38%}.w-39{--w:39%}
.w-40{--w:40%}.w-41{--w:41%}.w-42{--w:42%}.w-43{--w:43%}.w-44{--w:44%}.w-45{--w:45%}.w-46{--w:46%}.w-47{--w:47%}.w-48{--w:48%}.w-49{--w:49%}
.w-50{--w:50%}.w-51{--w:51%}.w-52{--w:52%}.w-53{--w:53%}.w-54{--w:54%}.w-55{--w:55%}.w-56{--w:56%}.w-57{--w:57%}.w-58{--w:58%}.w-59{--w:59%}
.w-60{--w:60%}.w-61{--w:61%}.w-62{--w:62%}.w-63{--w:63%}.w-64{--w:64%}.w-65{--w:65%}.w-66{--w:66%}.w-67{--w:67%}.w-68{--w:68%}.w-69{--w:69%}
.w-70{--w:70%}.w-71{--w:71%}.w-72{--w:72%}.w-73{--w:73%}.w-74{--w:74%}.w-75{--w:75%}.w-76{--w:76%}.w-77{--w:77%}.w-78{--w:78%}.w-79{--w:79%}
.w-80{--w:80%}.w-81{--w:81%}.w-82{--w:82%}.w-83{--w:83%}.w-84{--w:84%}.w-85{--w:85%}.w-86{--w:86%}.w-87{--w:87%}.w-88{--w:88%}.w-89{--w:89%}
.w-90{--w:90%}.w-91{--w:91%}.w-92{--w:92%}.w-93{--w:93%}.w-94{--w:94%}.w-95{--w:95%}.w-96{--w:96%}.w-97{--w:97%}.w-98{--w:98%}.w-99{--w:99%}
.w-100{--w:100%}

/* ---------- Sunucu sayfası ---------- */
.back-link { display: inline-block; margin-bottom: 1.25rem; color: var(--muted); text-decoration: none; font-size: 0.92rem; transition: color 0.2s; }
.back-link::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.5rem; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-1px); }
.back-link:hover { color: var(--text); }
.ring-fallback { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; border: 3px solid var(--ink); background: #2a1b52; color: var(--violet); font: 700 1.8rem var(--font-display); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 1.15rem; }
.panel-head h2 { margin: 0; }
.seg { display: inline-flex; gap: 0.2rem; padding: 0.2rem; border: 1px solid var(--line); border-radius: 10px; background: var(--ink); }
.seg a { padding: 0.3rem 0.8rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 0.85rem; font-weight: 600; transition: color 0.2s, background 0.2s; }
.seg a:hover { color: var(--text); }
.seg a[aria-current="page"] { background: var(--panel-2); color: var(--text); }

.lb { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.lb-row { display: grid; grid-template-columns: 1.8rem 2.5rem minmax(0, 1fr) 7.5rem; align-items: center; gap: 0.8rem; padding: 0.5rem 0.6rem; border-radius: 12px; transition: background 0.2s; }
.lb-row:hover { background: rgba(var(--violet-rgb), 0.06); }
.lb-me { background: rgba(var(--violet-rgb), 0.12); }
.lb-rank { text-align: center; font: 700 1rem var(--font-display); color: var(--muted); font-variant-numeric: tabular-nums; }
.lb-row:first-child .lb-rank { color: var(--gold); }
.lb-row:first-child .games-bar i { background: linear-gradient(90deg, #d9971a, var(--gold)); }
.lb-av { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; background: var(--panel-2); }
.lb-av-unknown { display: grid; place-items: center; color: var(--faint); font-weight: 700; border: 1px dashed var(--line); }
.lb-mid { min-width: 0; display: grid; gap: 0.35rem; }
.lb-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-time { text-align: right; font-weight: 600; font-size: 0.92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb-note { margin-top: 1rem; }
.games-narrow li { grid-template-columns: minmax(5rem, 9rem) 1fr 7rem; }
@media (max-width: 40rem) {
  .lb-row { grid-template-columns: 1.4rem 2.2rem minmax(0, 1fr) 6rem; gap: 0.6rem; padding: 0.45rem 0.2rem; }
  .lb-av { width: 2.2rem; height: 2.2rem; }
  .games-narrow li { grid-template-columns: 1fr auto; }
}
.g-link { text-decoration: none; transition: color 0.2s; }
.g-link:hover { color: var(--violet); }
.table td .tag { margin-left: 0.4rem; }
