/* assets.css — üretilen görsel/video/ses varlıklarının arayüze yerleşimi */

/* ── Lobi arka plan videosu (canlı haritanın altında) ───────────────────── */
.lb-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; pointer-events: none;
  opacity: 0.42; filter: saturate(1.1) brightness(0.8);
}
@media (max-width: 900px) { .lb-video { position: fixed; } }
@media (prefers-reduced-motion: reduce) { .lb-video { display: none; } #lobby { background-image: url("../assets/img/bg-hero.webp"); background-size: cover; } }

/* Ses düğmeleri */
.lb-mute svg { width: 17px; height: 17px; display: block; }
.g-mute {
  position: fixed; right: 16px; bottom: 112px; z-index: 10;
  width: 42px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--g-line, rgba(234,240,247,.14)); border-radius: 10px;
  background: var(--g-panel, rgba(9, 20, 38, 0.8)); color: var(--g-ink, #EAF0F7); cursor: pointer;
  backdrop-filter: blur(8px);
}
.g-mute svg { width: 18px; height: 18px; }
.g-mute[aria-pressed="true"] { color: var(--g-muted, #8C99AE); }

/* ── Nasıl oynanır görseli ───────────────────────────────────────────────── */
.lb-how-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin: 4px 0 14px; border: 1px solid rgba(234, 240, 247, 0.1); }

/* ── Harita yükleniyor ───────────────────────────────────────────────────── */
.g-loading { background: rgba(5, 12, 24, 0.88) url("../assets/img/loading.webp") center / cover no-repeat; background-blend-mode: multiply; }
.g-loading-art { width: min(520px, 80vw); aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55); border: 1px solid rgba(234, 240, 247, 0.14); margin-bottom: 6px; }

/* ── Maç sonu / elendin ──────────────────────────────────────────────────── */
.g-end-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1; opacity: 0.55; pointer-events: none; }
#match-end, #game-over { isolation: isolate; overflow: hidden; }
#match-end { background: rgba(5, 12, 24, 0.45) center / cover no-repeat; }
#match-end.is-win { background-image: url("../assets/img/victory-bg.webp"); }
#match-end:not(.is-win) { background-image: url("../assets/img/defeat-bg.webp"); }
#game-over { background: rgba(3, 8, 16, 0.55) url("../assets/img/defeat-bg.webp") center / cover no-repeat; }
.g-end-art { display: block; width: min(340px, 80%); height: auto; margin: -8px auto 6px; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); }
.g-end-art:not([src]), .g-end-art[src=""] { display: none; }
#match-end .g-over, #game-over .g-over { background: rgba(12, 26, 48, 0.82); backdrop-filter: blur(10px); }
#match-end .g-over-title.has-art, #game-over .g-over-title { font-size: 1.6rem; }

/* ── Tam ekran efekt katmanları (sfx.js) ─────────────────────────────────── */
.fx-layer { position: fixed; inset: 0; z-index: 20000; pointer-events: none; display: grid; place-items: center; transition: opacity 0.4s; }
.fx-layer.is-out { opacity: 0; }
.fx-count img { height: min(34vh, 300px); width: auto; animation: fx-pop 0.6s cubic-bezier(.2, 1.6, .4, 1) both; filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.6)); }
.fx-count img.is-fight { height: min(42vh, 380px); animation-duration: 0.8s; }
@keyframes fx-pop { 0% { transform: scale(2.2); opacity: 0; } 35% { opacity: 1; } 100% { transform: scale(1); opacity: 1; } }

.fx-level { place-items: start center; padding-top: 12vh; }
.fx-level-in { position: relative; animation: fx-drop 0.7s cubic-bezier(.2, 1.4, .4, 1) both; }
.fx-level-in img { width: min(560px, 86vw); height: auto; display: block; filter: drop-shadow(0 14px 40px rgba(0, 0, 0, 0.55)); }
.fx-level-in { display: grid; justify-items: center; gap: 2px; }
.fx-level-in b {
  margin-top: -6px; padding: 4px 18px; border-radius: 999px; background: rgba(8, 14, 26, 0.85); border: 1px solid rgba(255, 194, 75, 0.6);
  letter-spacing: 0.04em; font-size: 1.6rem !important;
  font: 900 2.4rem/1 "Big Shoulders Display", "Russo One", sans-serif; color: #FFE7A3;
  text-shadow: 0 0 18px rgba(255, 194, 75, 0.8), 0 2px 0 #6b3d00;
}
@keyframes fx-drop { from { transform: translateY(-40px) scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }

.fx-video { pointer-events: auto; background: rgba(0, 0, 0, 0.82); cursor: pointer; }
.fx-video video { max-width: 92vw; max-height: 86vh; border-radius: 16px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7); }

/* ── Lobi: mod kartları, harita önizlemesi, avatar, rütbe ───────────────── */
.hub-mode { isolation: isolate; }
.hub-mode > *:not(.hub-live):not(.hub-mode-bg) { position: relative; z-index: 1; }
.hub-mode > .hub-live { z-index: 2; }
.hub-mode > .hub-mode-bg {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -1;
  opacity: 0.42; transition: opacity 0.25s, transform 0.5s; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.15) 100%);
          mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.75) 45%, rgba(0,0,0,.15) 100%);
}
.hub-mode:hover > .hub-mode-bg, .hub-mode.is-on > .hub-mode-bg { opacity: 0.7; transform: scale(1.04); }
.hub-mode > .hub-mode-art { filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.hub-mode b, .hub-mode-d { text-shadow: 0 1px 8px rgba(0, 0, 0, 0.7); }
#lobby[data-theme="light"] .hub-mode > .hub-mode-bg { opacity: 0.25; }
.hub-room { grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.hub-room > img { grid-row: 1 / 3; }
.hub-room > b, .hub-room > span { grid-column: 2; }
.hub-avatar.has-img { background-size: cover !important; background-position: center !important; cursor: pointer; }
.hub-avatar.has-img > span { display: none; }
.hub-avatar { position: relative; overflow: visible !important; }
.hub-avatar-rank {
  position: absolute; right: -8px; bottom: -8px; width: 28px; height: 32px; object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.7)); pointer-events: none;
}
.hub-avatar { cursor: pointer; }
.hub-avatars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 10px 0 2px; }
.hub-avatars[hidden] { display: none; }
.hub-avatars button { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; padding: 0; overflow: hidden; background: rgba(234, 240, 247, 0.05); cursor: pointer; }
.hub-avatars button img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hub-avatars button.is-on { border-color: #3DF5FF; }
.hub-avatars button.is-none { color: #8C99AE; font: 600 0.7rem/1 inherit; }
.hub-room-badge { width: 34px; height: 40px; object-fit: contain; flex: none; }

/* ── Oyun içi sıralama armaları ──────────────────────────────────────────── */
.g-crest { width: 16px; height: 18px; object-fit: contain; flex: none; vertical-align: middle; margin-right: 2px; }
.g-emo-img { width: 26px; height: 26px; object-fit: contain; display: block; }

/* Lobi kuşanma yuvaları: görseller 42 px kutuya otursun */
.hub-slot-ic .bp-ic:has(.ic-img) { transform: none; width: 100%; height: 100%; }
.hub-slot-ic .ic-img { width: 34px; height: 34px; object-fit: contain; filter: none; }
.hub-slot-ic .ic-img.t-skin, .hub-slot-ic .ic-img.t-border, .hub-slot-ic .ic-img.t-wake { width: 42px; height: 42px; object-fit: cover; border-radius: 0; }
.hub-slot-ic .ic-img.t-ship { width: 40px; }
.hub-slot-ic .ic-img.t-title { width: 40px; height: 16px; }
/* Savaş Bileti kuşanma/envanter: kare kaplama görselleri kırpılarak kutuyu doldursun */
.bp-ic .ic-img.t-skin, .bp-ic .ic-img.t-border, .bp-ic .ic-img.t-wake { object-fit: cover; width: 52px; height: 52px; border-radius: 10px; }
.bp-slot .ic-img.t-skin, .bp-slot .ic-img.t-border, .bp-slot .ic-img.t-wake,
.bp-item .ic-img.t-skin, .bp-item .ic-img.t-border, .bp-item .ic-img.t-wake { width: 44px; height: 44px; }
