/* Giriş paneli ve ana sayfa (lobi) stilleri. style.css'ten sonra yüklenir. */
/* ---------- Ana sayfa / giriş paneli: masanın ortasında, altın köşeli koyu panel ---------- */
:root {
  --home-bg: linear-gradient(180deg, rgba(22, 29, 34, 0.97), rgba(12, 16, 19, 0.97));
  --home-line: #b8893a;
  --navy-pill: linear-gradient(180deg, #26334a, #141c2b);
  --blue-pill: linear-gradient(180deg, #3d6fd0 0%, #1c3f8f 55%, #142d6b 100%);
}
#lobby {
  top: 54%; width: calc(40 * var(--u)); overflow: visible; max-height: none;
  padding: calc(1.2 * var(--u)) calc(2.2 * var(--u)) calc(1.6 * var(--u));
  border: calc(0.14 * var(--u)) solid var(--home-line); border-radius: calc(0.9 * var(--u));
  background: var(--home-bg);
  box-shadow: 0 0 0 calc(0.25 * var(--u)) rgba(0, 0, 0, 0.55), 0 calc(1.6 * var(--u)) calc(4 * var(--u)) rgba(0, 0, 0, 0.75);
}
/* Köşe süsleri */
#lobby::before {
  content: ''; position: absolute; inset: calc(-0.35 * var(--u)); pointer-events: none;
  --c: #e2b552; --l: calc(2.6 * var(--u)); --t: calc(0.3 * var(--u));
  background:
    linear-gradient(var(--c), var(--c)) top left / var(--l) var(--t), linear-gradient(var(--c), var(--c)) top left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) top right / var(--l) var(--t), linear-gradient(var(--c), var(--c)) top right / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom left / var(--l) var(--t), linear-gradient(var(--c), var(--c)) bottom left / var(--t) var(--l),
    linear-gradient(var(--c), var(--c)) bottom right / var(--l) var(--t), linear-gradient(var(--c), var(--c)) bottom right / var(--t) var(--l);
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 calc(0.3 * var(--u)) rgba(226, 181, 82, 0.5));
}
/* ---------- Ana sayfa: bulanık salon arka planı, cam paneller ---------- */
:root {
  --glass: linear-gradient(180deg, rgba(34, 46, 64, 0.62), rgba(14, 20, 30, 0.72));
  --glass-line: rgba(170, 195, 230, 0.22);
}
#lobby:has(> #menu:not([hidden])) {
  inset: 0; width: auto; height: auto; transform: none; max-height: none;
  padding: 0; border: 0; border-radius: 0; overflow: hidden;
  background: #0a1019; box-shadow: none;
}
/* Arka plan: masa fotoğrafı bulanık ve koyu (salon havası) */
#lobby:has(> #menu:not([hidden]))::before {
  inset: calc(-2 * var(--u)); background: url('masa.webp') center / cover no-repeat;
  filter: blur(calc(0.6 * var(--u))) brightness(0.5) saturate(0.8) hue-rotate(-15deg);
}
#lobby:has(> #menu:not([hidden]))::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(30, 70, 130, 0.3), rgba(5, 8, 14, 0.65) 85%);
}
#lobby:has(> #menu:not([hidden])) > .brand,
#lobby:has(> #menu:not([hidden])) > .rules-link { display: none; }

#menu {
  position: relative; z-index: 1; height: 100%;
  display: grid; gap: calc(1.2 * var(--u)) calc(1.4 * var(--u));
  grid-template-columns: calc(19 * var(--u)) 1fr calc(28 * var(--u));
  grid-template-rows: auto 1fr;
  grid-template-areas:
    'profile brand tiles'
    'tables tables friends';
  padding: calc(2.2 * var(--u)) calc(4.2 * var(--u)) calc(1.6 * var(--u)) calc(3 * var(--u)); /* sağda tam ekran butonuna yer */
  text-align: left;
}

.glass {
  border: calc(0.08 * var(--u)) solid var(--glass-line); border-radius: calc(1 * var(--u));
  background: var(--glass); backdrop-filter: blur(calc(0.4 * var(--u)));
  box-shadow: 0 calc(1 * var(--u)) calc(2.4 * var(--u)) rgba(0, 0, 0, 0.5), inset 0 calc(0.08 * var(--u)) 0 rgba(255, 255, 255, 0.08);
}

/* Sol üst: küçük profil kartı */
.profile-card {
  grid-area: profile; align-self: start;
  display: flex; align-items: center; gap: calc(0.9 * var(--u)); padding: calc(0.8 * var(--u)) calc(1 * var(--u));
  border: calc(0.12 * var(--u)) solid #c99a3e; border-radius: calc(1 * var(--u)); background: var(--glass);
  box-shadow: 0 0 calc(0.9 * var(--u)) rgba(70, 150, 255, 0.45), inset 0 0 calc(0.8 * var(--u)) rgba(70, 150, 255, 0.2);
}
.avatar {
  display: grid; place-items: center; flex-shrink: 0; width: calc(4 * var(--u)); height: calc(4 * var(--u)); border-radius: 50%;
  border: calc(0.18 * var(--u)) solid #e2b552; background: radial-gradient(circle at 50% 35%, #2b3c58, #0d1420);
  box-shadow: 0 0 calc(0.6 * var(--u)) rgba(226, 181, 82, 0.5);
}
.avatar img { width: calc(2.4 * var(--u)); height: calc(2.4 * var(--u)); }
.profile-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: calc(0.3 * var(--u)); }
.profile-info b { font: 800 calc(1.35 * var(--u)) var(--font-ui); color: #fff; letter-spacing: 0.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.level-line { display: flex; align-items: center; gap: calc(0.35 * var(--u)); font: 600 calc(0.95 * var(--u)) var(--font-ui); color: #f6ecd2; }
.level-line .ico { width: calc(1.1 * var(--u)); height: calc(1.1 * var(--u)); }
.profile-info .xp { width: 100%; height: calc(0.65 * var(--u)); border: calc(0.08 * var(--u)) solid rgba(120, 170, 255, 0.5); background: #070b12; }
.profile-info .xp i { background: linear-gradient(90deg, #2f6fe0, #7fc4ff); box-shadow: 0 0 calc(0.4 * var(--u)) #7fc4ff; }
.points { font: 600 calc(0.9 * var(--u)) var(--font-ui); color: #f3dc9b; }
.points::before { content: '★ '; color: #f3c94a; }

/* Orta üst: logo, el sayısı, oyun butonları */
.home-brand { grid-area: brand; margin: 0; align-self: start; }
.home-brand h1.logo { width: calc(24 * var(--u)); font-size: calc(2.6 * var(--u)); }
.home-brand .card-fan { transform: scale(0.85); transform-origin: 50% 100%; }
.suit-row.four-color { margin: calc(0.2 * var(--u)) 0 calc(1.4 * var(--u)); font-size: calc(1.9 * var(--u)); }
.suit-row.four-color span { -webkit-text-stroke: calc(0.05 * var(--u)) rgba(0, 0, 0, 0.6); }
.suit-row .h { color: #e0283c; }
.suit-row .s { color: #2fbf5a; }
.suit-row .d { color: #f08a1c; }
.suit-row .c { color: #3a8ef0; }
.home-brand .create { display: flex; gap: calc(1.6 * var(--u)); }
button.btn-play {
  min-height: 0; padding: calc(0.8 * var(--u)) calc(2.6 * var(--u)) !important; gap: calc(0.6 * var(--u)); border: 0; border-image: none;
  font: 800 calc(1.45 * var(--u)) var(--font-ui); text-transform: uppercase; letter-spacing: 0.03em;
  clip-path: polygon(calc(1.2 * var(--u)) 0, calc(100% - calc(1.2 * var(--u))) 0, 100% 50%, calc(100% - calc(1.2 * var(--u))) 100%, calc(1.2 * var(--u)) 100%, 0 50%);
}
button.btn-play.orange { color: #3a1503; text-shadow: 0 calc(0.06 * var(--u)) 0 rgba(255, 220, 170, 0.6); background: linear-gradient(180deg, #ffd27a 0%, #ff9a2e 40%, #e0620e 75%, #ff9b3a 100%); filter: drop-shadow(0 0 calc(0.7 * var(--u)) rgba(255, 140, 40, 0.55)); }
button.btn-play.cyan { color: #062033; text-shadow: 0 calc(0.06 * var(--u)) 0 rgba(200, 240, 255, 0.6); background: linear-gradient(180deg, #b6f0ff 0%, #39c2f0 40%, #1287c4 75%, #43c9f2 100%); filter: drop-shadow(0 0 calc(0.7 * var(--u)) rgba(60, 190, 255, 0.55)); }
button.btn-play .ico { width: 1.3em; height: 1.3em; color: inherit; fill: currentColor; filter: none; }
button.btn-play img.ico { filter: brightness(0.2); }
button.btn-play:hover:not(:disabled) { filter: brightness(1.12) drop-shadow(0 0 calc(1 * var(--u)) rgba(255, 220, 150, 0.6)); }

/* Sağ üst: kare butonlar (ikon üstte, yazı altta) */
.tile-nav { grid-area: tiles; align-self: start; display: grid; grid-template-columns: repeat(6, 1fr); gap: calc(0.5 * var(--u)); }
button.tile {
  position: relative; flex-direction: column; gap: calc(0.3 * var(--u)); min-height: 0; aspect-ratio: 1; padding: calc(0.4 * var(--u)) !important;
  border: calc(0.08 * var(--u)) solid var(--glass-line); border-image: none; border-radius: calc(0.8 * var(--u));
  background: var(--glass); box-shadow: inset 0 calc(-0.25 * var(--u)) 0 rgba(226, 181, 82, 0.55), 0 calc(0.6 * var(--u)) calc(1.2 * var(--u)) rgba(0, 0, 0, 0.45);
  width: 100%; min-width: 0; font: 600 calc(0.78 * var(--u)) var(--font-ui); text-transform: none; letter-spacing: 0; white-space: nowrap; color: #fff; text-shadow: 0 calc(0.06 * var(--u)) 0 #000; filter: none;
}
button.tile .ico { width: calc(2 * var(--u)); height: calc(2 * var(--u)); }
#btn-logout.tile { box-shadow: inset 0 calc(-0.25 * var(--u)) 0 rgba(220, 70, 120, 0.7), 0 calc(0.6 * var(--u)) calc(1.2 * var(--u)) rgba(0, 0, 0, 0.45); }
button.tile:hover:not(:disabled) { filter: brightness(1.2); }
button.tile .count-badge { position: absolute; top: calc(0.3 * var(--u)); right: calc(0.3 * var(--u)); }

/* Alt sol: aktif masalar */
#tables-box { grid-area: tables; min-height: 0; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
#tables-box .tables-head {
  display: flex; justify-content: space-between; align-items: center; gap: calc(1 * var(--u)); padding: calc(0.6 * var(--u)) calc(1.2 * var(--u)) calc(0.6 * var(--u)) calc(1.6 * var(--u));
  border-bottom: calc(0.1 * var(--u)) solid; border-image: linear-gradient(90deg, transparent, #c99a3e 15%, #c99a3e 85%, transparent) 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent);
}
#tables-box h2 { margin: 0; font: 700 calc(1.5 * var(--u)) var(--font-ui); color: #f3cf62; }
#tables-box #table-list { flex: 1; min-height: 0; padding: calc(1 * var(--u)) calc(1.4 * var(--u)); }
#tables-box #table-list:has(> .empty) { display: grid; place-items: center; align-content: center; }
#table-list .empty { font-size: calc(1.1 * var(--u)); opacity: 0.9; margin: 0 auto; max-width: 90%; text-align: center; }
#code-form { display: flex; gap: calc(0.6 * var(--u)); align-items: center; }
#lobby #code-form input {
  width: calc(10 * var(--u)); padding: calc(0.5 * var(--u)) calc(0.8 * var(--u)); border: calc(0.08 * var(--u)) solid rgba(226, 181, 82, 0.5); border-radius: calc(0.4 * var(--u));
  background: rgba(0, 0, 0, 0.35); color: #f6ecd2; font: 600 calc(1.05 * var(--u)) var(--font-ui); text-transform: uppercase; letter-spacing: 0.04em;
}
#lobby #code-form input::placeholder { color: rgba(246, 236, 210, 0.4); }
#lobby #code-form input:focus { outline: none; border-color: #f3cf62; box-shadow: 0 0 calc(0.4 * var(--u)) rgba(243, 207, 98, 0.5); }

/* Ortak haplar */
button.pill {
  min-height: 0; padding: calc(0.45 * var(--u)) calc(1.2 * var(--u)) !important; gap: calc(0.4 * var(--u)); border: calc(0.08 * var(--u)) solid rgba(150, 170, 210, 0.35); border-image: none; border-radius: calc(2 * var(--u));
  background: linear-gradient(180deg, #26334a, #141c2b); font: 600 calc(0.95 * var(--u)) var(--font-ui); text-transform: none; color: #f3dc9b; text-shadow: 0 calc(0.06 * var(--u)) 0 #000;
  filter: drop-shadow(0 calc(0.15 * var(--u)) calc(0.25 * var(--u)) rgba(0, 0, 0, 0.6));
}
button.pill.blue { background: linear-gradient(180deg, #4b82e6 0%, #1f47a3 55%, #163579 100%); border-color: rgba(140, 180, 255, 0.7); color: #fff; text-transform: uppercase; font-weight: 800; box-shadow: inset 0 calc(0.1 * var(--u)) 0 rgba(255, 255, 255, 0.25); }
button.pill:hover:not(:disabled) { filter: brightness(1.18); }

/* Sağ: çevrimiçi arkadaşlar */
#online-friends { grid-area: friends; min-height: 0; display: flex; flex-direction: column; padding: calc(0.9 * var(--u)) calc(0.9 * var(--u)) calc(1 * var(--u)); }
#online-friends h2 { margin: 0 0 calc(0.5 * var(--u)); padding: 0 calc(0.3 * var(--u)) calc(0.6 * var(--u)); font: 700 calc(1.2 * var(--u)) var(--font-ui); color: #f3dc9b; border-bottom: calc(0.08 * var(--u)) solid var(--glass-line); }
#online-list { flex: 1; min-height: 0; overflow-y: auto; list-style: none; margin: 0 0 calc(0.8 * var(--u)); padding: 0; }
#online-list li + li { border-top: calc(0.06 * var(--u)) solid var(--glass-line); }
#online-list .empty { padding: calc(1 * var(--u)) calc(0.3 * var(--u)); font-size: calc(0.95 * var(--u)); opacity: 0.75; }
button.friend-row {
  width: 100%; justify-content: flex-start; gap: calc(0.7 * var(--u)); min-height: 0; padding: calc(0.5 * var(--u)) calc(0.3 * var(--u)) !important;
  border: 0; border-image: none; background: none; filter: none; text-transform: none; text-align: left; color: #fff;
}
button.friend-row:hover:not(:disabled) { background: rgba(255, 255, 255, 0.06); filter: none; transform: none; }
.f-avatar {
  position: relative; display: grid; place-items: center; flex-shrink: 0; width: calc(2.8 * var(--u)); height: calc(2.8 * var(--u)); border-radius: 50%;
  border: calc(0.12 * var(--u)) solid #e2b552; background: radial-gradient(circle at 50% 35%, #3a4f73, #141d2c); font: 800 calc(1.2 * var(--u)) var(--font-ui); color: #f3dc9b;
}
.f-dot { position: absolute; right: calc(-0.05 * var(--u)); bottom: calc(-0.05 * var(--u)); width: calc(0.75 * var(--u)); height: calc(0.75 * var(--u)); border-radius: 50%; background: #3ddc6a; border: calc(0.12 * var(--u)) solid #0d1420; }
.f-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.f-info b { font: 700 calc(1.1 * var(--u)) var(--font-ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-info small { font: 500 calc(0.8 * var(--u)) var(--font-ui); color: #8fe0a6; }
.f-info small::before { content: '● '; color: #3ddc6a; }
.f-info small.playing { color: #ffc56a; }
.f-info small.playing::before { color: #f0a020; }
#btn-all-friends { align-self: stretch; border-color: rgba(226, 181, 82, 0.6); }


/* Sıralama paneli */
#leaderboard-panel { width: calc(36 * var(--u)); }
#leaderboard { text-align: left; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: calc(0.6 * var(--u)); margin-bottom: calc(0.4 * var(--u)); }
.board-head h2 { margin: 0; font-size: calc(1.7 * var(--u)); display: flex; align-items: center; gap: calc(0.4 * var(--u)); color: #e8c06a; }
#leaderboard .tabs.small .tab {
  min-height: 0; padding: calc(0.25 * var(--u)) calc(0.8 * var(--u)) !important; border: calc(0.08 * var(--u)) solid rgba(140, 180, 255, 0.6); border-image: none; border-radius: calc(2 * var(--u));
  background: linear-gradient(180deg, #4b82e6 0%, #1f47a3 55%, #163579 100%); color: #fff; font: 700 calc(0.75 * var(--u)) var(--font-ui); filter: none;
}
#leaderboard .tabs.small .tab.active { background: rgba(0, 0, 0, 0.5); border-color: #e2b552; color: #f3cf62; }
#leaderboard-list { font-size: calc(1.05 * var(--u)); max-height: calc(26 * var(--u)); margin-top: calc(0.4 * var(--u)); }
#leaderboard-list .empty { opacity: 0.85; }

/* El sayısı sorusu (Masa Kur / Botlarla Oyna'ya basınca) */
#rounds-dialog { z-index: 26; min-width: calc(30 * var(--u)); }
#rounds-dialog p { margin: 0 0 calc(1 * var(--u)); font-size: calc(1.15 * var(--u)); color: #f6ecd2; }
/* Botlarla Oyna: bot zorluğu, üç kart (seçilen altın çerçeveli; kolay yeşil, orta altın, zor kırmızı ton) */
.bot-level { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(0.6 * var(--u)); margin: 0 0 calc(1.2 * var(--u)); padding: 0; border: 0; }
.bot-level[hidden] { display: none; }
.bot-level legend { padding: 0; margin-bottom: calc(0.6 * var(--u)); font-size: calc(1.15 * var(--u)); color: #f6ecd2; }
.bot-level label {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: calc(0.15 * var(--u));
  padding: calc(0.7 * var(--u)) calc(0.5 * var(--u)); border: calc(0.12 * var(--u)) solid rgba(217, 180, 90, 0.35);
  border-radius: calc(0.8 * var(--u)); background: rgba(20, 12, 4, 0.75); cursor: pointer;
  transition: border-color 140ms var(--ease), background 140ms var(--ease), transform 140ms var(--ease);
}
.bot-level label:hover { border-color: rgba(243, 201, 74, 0.7); transform: translateY(calc(-0.1 * var(--u))); }
.bot-level input { position: absolute; opacity: 0; pointer-events: none; }
.bot-level b { font: 800 calc(1.15 * var(--u)) var(--font-ui); letter-spacing: 0.04em; text-transform: uppercase; }
.bot-level small { font-size: calc(0.8 * var(--u)); color: #cbbd98; text-align: center; }
.bot-level label:nth-of-type(1) b { color: #8ff0b4; }
.bot-level label:nth-of-type(2) b { color: #f6d56e; }
.bot-level label:nth-of-type(3) b { color: #ff8a7a; }
.bot-level label:has(input:checked) {
  border-color: #f3c94a; background: linear-gradient(180deg, rgba(90, 62, 14, 0.85), rgba(36, 22, 6, 0.9));
  box-shadow: 0 0 calc(0.8 * var(--u)) rgba(243, 201, 74, 0.45);
}
.bot-level label:has(input:focus-visible) { outline: calc(0.15 * var(--u)) solid #ffd76a; outline-offset: calc(0.15 * var(--u)); }
.rounds-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: calc(0.7 * var(--u)); margin-bottom: calc(1.2 * var(--u)); }
button.round-choice {
  min-height: 0; padding: calc(0.7 * var(--u)) 0 !important; border: calc(0.1 * var(--u)) solid #c99a3e; border-image: none; border-radius: calc(0.6 * var(--u));
  background: linear-gradient(180deg, #26334a, #141c2b); font: 800 calc(1.3 * var(--u)) var(--font-ui); text-transform: none; color: #f3dc9b; filter: none;
}
button.round-choice:hover:not(:disabled), button.round-choice:focus-visible { background: linear-gradient(180deg, #ffd27a, #e0960e); color: #2a1505; text-shadow: none; filter: drop-shadow(0 0 calc(0.5 * var(--u)) rgba(255, 190, 70, 0.6)); }

/* ---------- Ayarlar penceresi ---------- */
#settings-panel { width: calc(40 * var(--u)); z-index: 27; }
.set-group { margin: 0 0 calc(0.7 * var(--u)); padding: calc(0.6 * var(--u)) calc(1 * var(--u)) calc(0.8 * var(--u)); border: calc(0.08 * var(--u)) solid rgba(217, 180, 90, 0.35); border-radius: calc(0.7 * var(--u)); background: rgba(0, 0, 0, 0.3); }
.side-panel .set-group h3 { margin: 0 0 calc(0.4 * var(--u)); font: 700 calc(1.05 * var(--u)) var(--font-ui); color: #f3cf62; letter-spacing: 0.04em; text-transform: uppercase; }
.set-row { display: flex; justify-content: space-between; align-items: center; gap: calc(1.2 * var(--u)); min-height: calc(2.2 * var(--u)); font-size: calc(1 * var(--u)); }
.set-row + .set-row { border-top: calc(0.06 * var(--u)) solid rgba(217, 180, 90, 0.15); }
.set-row select {
  font: 600 calc(0.95 * var(--u)) var(--font-ui); padding: calc(0.3 * var(--u)) calc(0.6 * var(--u)); min-width: calc(13 * var(--u));
  border: calc(0.08 * var(--u)) solid #c79a3e; border-radius: calc(0.4 * var(--u)); background: #1e1208; color: #f6ecd2;
}
.set-row input[type='range'] { width: calc(13 * var(--u)); accent-color: #e0a52a; }
.set-row input[type='range']:disabled { opacity: 0.4; }
/* Aç / kapa anahtarı */
input.switch {
  appearance: none; position: relative; width: calc(3.2 * var(--u)); height: calc(1.7 * var(--u)); margin: 0; cursor: pointer;
  border: calc(0.08 * var(--u)) solid #8a6a2c; border-radius: 2em; background: #0a0c0e; transition: background 150ms;
}
input.switch::after {
  content: ''; position: absolute; top: 50%; left: calc(0.2 * var(--u)); width: calc(1.2 * var(--u)); height: calc(1.2 * var(--u));
  border-radius: 50%; background: #9a8a6a; transform: translateY(-50%); transition: left 150ms var(--ease), background 150ms;
}
input.switch:checked { background: linear-gradient(180deg, #f5d36b, #c08a26); }
input.switch:checked::after { left: calc(1.75 * var(--u)); background: #fff8e1; }
input.switch:focus-visible { outline: calc(0.15 * var(--u)) solid #ffd76a; outline-offset: calc(0.15 * var(--u)); }
/* Kart boyutu: üçlü seçim */
.segmented { display: inline-flex; border: calc(0.08 * var(--u)) solid #c79a3e; border-radius: calc(0.5 * var(--u)); overflow: hidden; }
.segmented button {
  min-height: 0; padding: calc(0.35 * var(--u)) calc(1 * var(--u)) !important; border: 0; border-image: none; border-radius: 0;
  background: #1e1208; font: 600 calc(0.9 * var(--u)) var(--font-ui); text-transform: none; color: #e9d9a8; filter: none;
}
.segmented button + button { border-left: calc(0.08 * var(--u)) solid #c79a3e; }
.segmented button.active { background: linear-gradient(180deg, #f5d36b, #c08a26); color: #2a1406; text-shadow: none; }
.segmented button:hover:not(:disabled) { transform: none; filter: brightness(1.15); }
.card-preview { display: flex; justify-content: center; gap: calc(0.4 * var(--u)); margin-top: calc(0.5 * var(--u)); padding: calc(0.6 * var(--u)) 0; border-radius: calc(0.6 * var(--u)); background: radial-gradient(ellipse at center, #1d6a33, #0b3d17 80%); }
.card-preview .card { --cw: calc(3.6 * var(--u) * var(--card-scale)); transition: width 150ms var(--ease), height 150ms var(--ease); }

/* ---------- Profil: seviye çubuğu ---------- */
.level-box { align-items: center; gap: calc(1.2 * var(--u)); padding: calc(0.8 * var(--u)) calc(1 * var(--u)); border: calc(0.08 * var(--u)) solid rgba(217, 180, 90, 0.35); border-radius: calc(0.8 * var(--u)); background: rgba(0, 0, 0, 0.3); }
.level-info { gap: calc(0.35 * var(--u)); }
.level-ends { display: flex; justify-content: space-between; align-items: baseline; font: 600 calc(0.9 * var(--u)) var(--font-ui); color: rgba(246, 236, 210, 0.6); }
.level-ends b { font-size: calc(1.15 * var(--u)); color: #f3cf62; }
.level-track {
  position: relative; height: calc(1.8 * var(--u)); border-radius: 2em; overflow: hidden;
  background: linear-gradient(180deg, #050608, #15181d); border: calc(0.1 * var(--u)) solid #8a6a2c;
  box-shadow: inset 0 calc(0.15 * var(--u)) calc(0.35 * var(--u)) rgba(0, 0, 0, 0.8);
}
.level-track i {
  position: absolute; inset: 0 auto 0 0; display: block; min-width: calc(1.8 * var(--u)); border-radius: 2em;
  background: linear-gradient(180deg, #fff0b0 0%, #f5cd5c 35%, #d99a26 70%, #f0be4c 100%);
  box-shadow: 0 0 calc(0.6 * var(--u)) rgba(255, 200, 80, 0.55);
  transition: width 600ms var(--ease);
}
/* Parlama: dolu kısmın üstünde yavaşça kayan ışık */
.level-track i::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%) -150% 0 / 60% 100% no-repeat;
  animation: level-shine 3s ease-in-out infinite;
}
@keyframes level-shine { to { background-position: 250% 0; } }
.level-track span {
  position: absolute; inset: 0; display: grid; place-items: center;
  font: 700 calc(0.95 * var(--u)) var(--font-ui); color: #fff; text-shadow: 0 calc(0.08 * var(--u)) calc(0.2 * var(--u)) #000, 0 0 calc(0.3 * var(--u)) #000;
}
#pf-xp-left { font-size: calc(0.85 * var(--u)); color: rgba(246, 236, 210, 0.7); }
