/* BlueLoreMC Web — launcher görünümünün (launcher.css) web ve telefon düzeni */
html, body { height: 100%; }
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
input, textarea, .bubble, .selectable { user-select: text; }

.app {
  grid-template-columns: 84px 1fr;
  grid-template-rows: 56px 1fr;
  height: 100vh; height: 100dvh;
}
.topbar { grid-column: 2; grid-row: 1; -webkit-app-region: none; padding-right: 16px; }
.topbar .wordmark { display: none; }
.topbar .crumb::before { display: none; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.top-user { display: flex; align-items: center; gap: 10px; padding: 5px 12px 5px 5px; border-radius: 12px; transition: background .15s; }
.top-user:hover { background: rgba(255, 255, 255, .06); }
.top-user .avatar { width: 34px; height: 34px; border-radius: 9px; }
.top-user b { font-size: 14px; font-weight: 650; }
.top-user small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.2; }
.top-user .tu-txt { display: flex; flex-direction: column; line-height: 1.25; }
.rail { grid-row: 1 / 3; padding-top: 14px; -webkit-app-region: none; }
.rail-logo { display: grid; place-items: center; margin-bottom: 18px; }
.rail-logo img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0, 0, 0, .4); }
.content { grid-column: 2; grid-row: 2; -webkit-overflow-scrolling: touch; }
.page { padding: 8px 32px 40px; }
.bnav { display: none; }

/* Başlık avatarları (skin'den çizilir) */
canvas.head, img.head { image-rendering: pixelated; background: #1a2440; border-radius: 9px; display: block; }
.fav canvas.head { width: 38px; height: 38px; }
.letter-av { display: grid; place-items: center; font-weight: 800; color: #cfe0ff; background: linear-gradient(135deg, #2a3d6e, #1a2440); border-radius: 9px; }

/* Ana sayfa */
.web-home { display: flex; flex-direction: column; min-height: 100%; }
.web-home .hero { margin-top: 8vh; }
.home-skins { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.home-skins .skin-card { flex: 0 0 132px; }
.dl-card { display: flex; align-items: center; gap: 18px; padding: 20px; margin-top: 26px; }
.dl-card .share-ico { background: linear-gradient(135deg, #2fd46b33, #19a64c22); color: #86efac; }
.dl-card h3 { margin: 0 0 4px; font-size: 17px; }
.dl-card p { margin: 0; color: var(--muted); font-size: 13.5px; }
.dl-card .btn { margin-left: auto; }

/* Skin galerisi */
.skins-top { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.skins-top .search { max-width: 360px; }
.skins-count { color: var(--muted); font-size: 13px; }
.skin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.skin-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px 12px; text-align: center; transition: transform .15s, border-color .15s, background .15s; cursor: pointer; }
.skin-card:hover { transform: translateY(-3px); border-color: var(--stroke-3); background: var(--glass-2); }
.skin-card .body { height: 150px; display: grid; place-items: end center; background: radial-gradient(ellipse at 50% 90%, rgba(79, 141, 255, .22), transparent 65%); width: 100%; border-radius: 10px; }
.skin-card canvas.full { height: 136px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.skin-card b { font-size: 14px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.skin-card .badges { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; min-height: 21px; }
.skin-card .badge { font-size: 10px; padding: 2px 7px; }
.more-row { display: flex; justify-content: center; margin-top: 18px; }
.profile-view { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; }
.profile-side h2 { margin: 0 0 6px; font: 700 30px/1.1 var(--display); letter-spacing: -.4px; }
.profile-side .set-card { padding: 22px; }
.profile-side .kv:first-of-type { margin-top: 14px; }
.profile-side .btn { width: 100%; justify-content: center; margin-top: 10px; }
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; margin-bottom: 10px; }
.back-link .ico { width: 16px; height: 16px; }
.back-link:hover { color: #fff; }

/* Profil istatistikleri */
.profile-stats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); margin-top: 0; }
.profile-view + .sec-h { margin-top: 24px; }

/* Giriş */
.auth-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 16px; align-items: start; max-width: 1100px; }
.auth-art { position: relative; min-height: 420px; overflow: hidden; display: flex; align-items: flex-end; padding: 32px; }
.auth-art .scene { position: absolute; inset: 0; }
.auth-art .shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6, 10, 19, .92), rgba(6, 10, 19, .1) 60%); }
.auth-art .txt { position: relative; }
.auth-art h2 { margin: 0 0 8px; font: 750 44px/1.05 var(--display); letter-spacing: -1.2px; background: linear-gradient(180deg, #fff 30%, #9cc6ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { margin: 0; color: #c5cee0; max-width: 440px; }
.auth-card { padding: 26px; }
.auth-card h1 { margin: 0 0 4px; font: 700 24px/1.2 var(--display); }
.auth-card .lead { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; }
.auth-card .field label { justify-content: flex-start; }
.auth-card .btn.wide { width: 100%; justify-content: center; height: 46px; }
.pair-code { font: 800 34px/1 "Cascadia Mono", Consolas, monospace; letter-spacing: 4px; text-align: center; padding: 18px; border-radius: 12px; background: rgba(0, 0, 0, .3); border: 1px dashed var(--stroke-3); margin: 14px 0; user-select: all; }
.steps { margin: 0; padding-left: 20px; color: #cdd5e5; font-size: 13.5px; line-height: 1.7; }
.steps b { color: #fff; }

/* Arkadaşlar (web) */
.friends { height: calc(100dvh - 56px - 120px); }
.chat-back { display: none; }
.fav .letter-av { width: 38px; height: 38px; font-size: 15px; }
.chat-head .fav { flex: none; }
.load-older { align-self: center; margin-bottom: 6px; }

/* Hesap */
.acc-hero .skin canvas.full { height: 200px; width: auto; image-rendering: pixelated; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .5)); }
.acc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }

/* Bildirim yeri (telefonda üstte ortada) */
.toasts { top: 68px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .auth-wrap, .profile-view { grid-template-columns: 1fr; }
  .auth-art { min-height: 200px; }
  .acc-grid { grid-template-columns: 1fr; }
}

/* ---------- Telefon ---------- */
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; grid-template-rows: calc(52px + env(safe-area-inset-top)) 1fr calc(62px + env(safe-area-inset-bottom)); }
  .rail { display: none; }
  .topbar { grid-column: 1; padding: 0 12px 0 16px; padding-top: env(safe-area-inset-top); }
  .topbar .wordmark { display: block; }
  .topbar .crumb { display: none; }
  .top-user .tu-txt { display: none; }
  .top-user { padding: 4px; }
  .content { grid-column: 1; grid-row: 2; }
  .page { padding: 4px 14px 28px; }
  .page-head { flex-direction: column; align-items: stretch; margin: 4px 0 16px; }
  .page-head h1 { font-size: 24px; }
  .page-head .seg { align-self: flex-start; }
  .bnav {
    display: flex; grid-column: 1; grid-row: 3; z-index: 30;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(8, 12, 22, .92); border-top: 1px solid var(--stroke); backdrop-filter: var(--blur);
  }
  .bnav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border-radius: 12px; color: var(--muted); }
  .bnav a .ni { width: 22px; height: 22px; }
  .bnav a .nl { font-size: 10.5px; font-weight: 650; }
  .bnav a.active { color: #fff; background: var(--accent-soft); }
  .bnav a.active .ni { color: var(--accent-2); }
  .bnav .nav-badge { top: 1px; right: calc(50% - 22px); }

  .hero h1 { font-size: 46px; letter-spacing: -1.5px; }
  .hero p { font-size: 15px; }
  .web-home .hero { margin-top: 12px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
  .stat b { white-space: normal; font-size: 14px; line-height: 1.25; }
  .page-head > div, .page-head p { min-width: 0; }
  .chat-head .ftxt { min-width: 0; }
  .dl-card { flex-wrap: wrap; }
  .dl-card .btn { margin-left: 0; width: 100%; justify-content: center; }
  .community { grid-template-columns: 1fr; }

  .skin-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
  .skin-card .body { height: 120px; }
  .skin-card canvas.full { height: 108px; }
  .skins-top .search { max-width: none; }

  .look { grid-template-columns: 1fr; }
  .look-view { min-height: 340px; }

  /* Arkadaşlar: liste ya da sohbet tam ekran */
  .friends { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 52px - 62px - env(safe-area-inset-bottom) - 110px); min-height: 380px; }
  .friends.chatting .flist { display: none; }
  /* Sohbet açıkken üst çubuk ile alt menü arasını tamamen kapla */
  .friends.chatting {
    position: fixed; z-index: 25; left: 0; right: 0;
    top: calc(52px + env(safe-area-inset-top)); bottom: calc(62px + env(safe-area-inset-bottom));
    height: auto; min-height: 0; padding: 6px 8px 8px; background: var(--bg);
  }
  .friends.chatting .chat { border-radius: 14px; }
  .friends:not(.chatting) .chat { display: none; }
  .chat-back { display: inline-flex; }
  .msg { max-width: 86%; }
  .mimg { max-width: 220px; }
  .share-card { flex-wrap: wrap; }

  .acc-hero { grid-template-columns: 1fr; }
  .acc-hero .info { padding: 18px 20px 22px; }
  .acc-hero .info h2 { font-size: 26px; }
  .auth-card { padding: 20px; }
  .auth-art h2 { font-size: 34px; }
  .toasts { left: 12px; right: 12px; top: calc(58px + env(safe-area-inset-top)); }
  .toast { min-width: 0; max-width: none; }
  .modal { width: calc(100vw - 32px); }
}
