@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg:#020408; --bg2:#070d16; --bg3:#0d1520; --bg4:#121e2e;
  --glass:rgba(7,13,22,.88);
  --blue:#2563eb; --blue2:#3b82f6; --blue3:#60a5fa;
  --bsub:rgba(37,99,235,.13); --bord:rgba(37,99,235,.18); --bord2:rgba(59,130,246,.36);
  --text:#eaf2ff; --text2:#7a9cc0; --text3:#3d5570;
  --shadow:0 8px 32px rgba(0,0,0,.6); --sglow:0 0 28px rgba(37,99,235,.25);
  --r:14px; --rs:10px; --hh:58px; --nh:64px;
}
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'IBM Plex Sans Arabic',sans-serif;background:var(--bg);color:var(--text);direction:rtl;min-height:100vh;overflow-x:hidden}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button{cursor:pointer;border:none;background:none;font-family:inherit}
input,textarea,select{font-family:inherit}
::-webkit-scrollbar{width:3px}
::-webkit-scrollbar-track{background:var(--bg2)}
::-webkit-scrollbar-thumb{background:var(--blue);border-radius:2px}

/* ══ HEADER ══ */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--hh);
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--hh) + env(safe-area-inset-top, 0px));
  z-index: 500;
  background: rgba(2,4,8,.92);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--bord);
  display: flex;
  align-items: center;
  padding-right: 14px;
  padding-left: 14px;
  gap: 8px;
}
.header-logo {
  flex: 1;
  display: flex;
  align-items: center;
}
.header-logo-text {
  font-size: 20px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue2), var(--blue3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.header-actions { display: flex; align-items: center; gap: 7px; }
.hbtn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--bg3);
  border: 1px solid var(--bord);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2); font-size: 14px;
  position: relative; cursor: pointer;
  flex-shrink: 0; transition: all .18s;
  -webkit-tap-highlight-color: transparent;
}
.hbtn:hover { background: var(--bsub); border-color: var(--bord2); color: var(--blue3); }
.notif-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #ef4444; border: 1.5px solid var(--bg);
  position: absolute; top: 5px; left: 5px;
  display: none; animation: pulsed 2s infinite;
}
@keyframes pulsed { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }

/* ══ POPUP BACKDROP ══ */
.popup-bd {
  position: fixed; inset: 0;
  z-index: 550;
  display: none;
}
.popup-bd.open { display: block; }

/* ══ POPUP ══ */
.hpopup {
  position: fixed;
  top: calc(var(--hh) + env(safe-area-inset-top, 0px) + 4px);
  left: 8px; right: 8px;
  max-height: 75vh;
  overflow-y: auto;
  background: rgba(7,13,22,.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--bord2);
  border-radius: var(--r);
  box-shadow: var(--sglow), var(--shadow);
  z-index: 600;
  /* HIDDEN by default */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(.97);
  transition: all .22s cubic-bezier(.34,1.4,.64,1);
}
.hpopup.open {
  visibility: visible;
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}
.popup-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--bord);
  font-size: 12px; font-weight: 700; color: var(--text2);
  position: sticky; top: 0;
  background: rgba(7,13,22,.98);
}
.popup-close {
  width: 25px; height: 25px; border-radius: 7px;
  background: var(--bg3); border: 1px solid var(--bord);
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 10px; cursor: pointer;
  transition: all .15s;
}
.popup-close:hover { color: var(--text); background: var(--bsub); }

/* search */
.search-wrap { padding: 10px 12px; }
.search-field {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg3); border: 1px solid var(--bord);
  border-radius: var(--rs); padding: 9px 12px;
  transition: border-color .18s;
}
.search-field:focus-within { border-color: var(--blue2); }
.search-field i { color: var(--text3); font-size: 12px; }
.search-field input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 13px; direction: rtl;
}
.search-field input::placeholder { color: var(--text3); }
#searchResults {
  padding: 0 12px 12px;
  display: grid; grid-template-columns: repeat(3,1fr); gap: 8px;
}
.sr-empty { grid-column:1/-1; text-align:center; padding:20px; color:var(--text3); font-size:12px; }
.sr-item {
  border-radius: 9px; overflow: hidden;
  background: var(--bg3); border: 1px solid var(--bord);
  cursor: pointer; transition: all .18s;
}
.sr-item:hover { border-color: var(--bord2); transform: translateY(-2px); }
.sr-item img { width: 100%; aspect-ratio: 2/3; object-fit: cover; }
.sr-item .sr-nop { width:100%; aspect-ratio:2/3; display:flex; align-items:center; justify-content:center; background:var(--bg4); color:var(--text3); }
.sr-item span { display:block; padding:4px 6px; font-size:10px; color:var(--text2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* notif */
.notif-list { padding: 4px 0; }
.notif-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 13px; border-bottom: 1px solid var(--bord);
  cursor: pointer; transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover, .notif-item.unread { background: rgba(37,99,235,.06); }
.notif-ico {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bsub); border: 1px solid var(--bord);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue3); font-size: 12px; flex-shrink: 0;
}
.notif-bd { flex: 1; }
.notif-t { font-size: 12px; font-weight: 700; margin-bottom: 2px; }
.notif-tx { font-size: 11px; color: var(--text2); line-height: 1.4; }
.notif-tm { font-size: 10px; color: var(--text3); margin-top: 3px; }
.notif-empty { padding: 26px; text-align:center; color:var(--text3); font-size:12px; }
.notif-empty i { font-size:26px; display:block; margin-bottom:8px; }

/* ══ NAVBAR - MOBILE (bottom) ══ */
#site-navbar {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: calc(var(--nh) + env(safe-area-inset-bottom, 0px));
  z-index: 500;
  background: rgba(2,4,8,.94);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-top: 1px solid var(--bord);
  display: flex; align-items: flex-start; justify-content: space-around;
  padding-top: 6px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; padding: 5px 4px; cursor: pointer;
  color: var(--text3); text-align: center;
  -webkit-tap-highlight-color: transparent;
  transition: color .18s;
}
.nav-item i { font-size: 19px; transition: all .22s cubic-bezier(.34,1.56,.64,1); }
.nav-item span { font-size: 10px; font-weight: 500; }
.nav-item.active { color: var(--blue2); }
.nav-item.active i { transform: translateY(-2px); filter: drop-shadow(0 0 7px rgba(59,130,246,.7)); }

/* ══ MAIN ══ */
#main-content {
  padding-top: calc(var(--hh) + env(safe-area-inset-top, 0px) + 8px);
  padding-bottom: calc(var(--nh) + env(safe-area-inset-bottom, 0px) + 12px);
  min-height: 100vh;
}
.page { display: none; }
.page.active { display: block; }

/* ══ CAROUSEL ══ */
.hero-carousel {
  position: relative; overflow: hidden;
  height: 330px; margin-bottom: 20px;
  background: #070f1a;
}
.hero-track {
  display: flex; height: 100%;
  transition: transform .5s cubic-bezier(.25,.46,.45,.94);
  will-change: transform;
}
.hero-slide {
  position: relative; min-width: 100%; width: 100%; height: 100%;
  flex-shrink: 0; overflow: hidden; background: #070f1a;
}
.hero-slide > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center top; z-index: 0;
}
.hero-loading-slide { background: linear-gradient(160deg,#0a1525,#0f2040); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to top, rgba(2,4,8,1) 0%, rgba(2,4,8,.6) 45%, rgba(2,4,8,.05) 100%);
}
.hero-content { position: absolute; bottom: 0; left: 0; right: 0; padding: 16px 14px 16px; z-index: 2; }
.hero-badges { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.badge { padding: 3px 9px; border-radius: 20px; font-size: 10px; font-weight: 600; }
.badge-imdb { background: #f5c518; color: #000; }
.badge-genre { background: var(--bsub); border: 1px solid var(--bord2); color: var(--blue3); }
.hero-title { font-size: 19px; font-weight: 800; line-height: 1.25; margin-bottom: 5px; text-shadow: 0 2px 8px rgba(0,0,0,.8); }
.hero-desc { font-size: 11px; color: var(--text2); line-height: 1.5; margin-bottom: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero-actions { display: flex; gap: 8px; }
.btn-watch {
  flex: 1; padding: 10px 12px; background: var(--blue); border-radius: var(--rs);
  color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  box-shadow: 0 4px 14px rgba(37,99,235,.4); transition: background .18s;
}
.btn-watch:hover { background: #1d4ed8; }
.btn-save {
  width: 40px; height: 40px; border-radius: var(--rs); flex-shrink: 0;
  background: rgba(7,13,22,.7); border: 1px solid var(--bord2);
  color: var(--text); font-size: 14px;
  display: flex; align-items: center; justify-content: center; transition: all .18s;
}
.btn-save:hover, .btn-save.saved { background: var(--bsub); color: var(--blue3); border-color: var(--blue2); }
.hero-dots {
  position: absolute; bottom: 4px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px; z-index: 3;
}
.hero-dot {
  width: 5px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.22); transition: all .28s; cursor: pointer;
}
.hero-dot.active { width: 18px; background: var(--blue2); }

/* ══ SECTIONS ══ */
.section { margin-bottom: 24px; }
.section-header { display: flex; align-items: center; gap: 9px; padding: 0 13px; margin-bottom: 10px; }
.section-logo-wrap {
  width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0;
  background: var(--bg3); border: 1px solid var(--bord);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.section-title { font-size: 13px; font-weight: 700; flex: 1; }
/* الأسهم مخفية على الموبايل — تظهر فقط في الديسكتوب عبر desktop.css */
.section-arrows { display: none; }
.section-more { font-size: 11px; color: var(--blue2); display: flex; align-items: center; gap: 3px; }
.cards-scroll {
  display: flex; gap: 10px; padding: 0 13px;
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.cards-scroll::-webkit-scrollbar { display: none; }

/* ══ MOVIE CARD ══ */
.movie-card {
  min-width: 120px; width: 120px; border-radius: 12px;
  overflow: hidden; background: var(--bg3); border: 1px solid var(--bord);
  flex-shrink: 0; scroll-snap-align: start; cursor: pointer; transition: all .2s;
}
.movie-card:hover { border-color: var(--bord2); transform: translateY(-3px); }
.mc-img { position: relative; aspect-ratio: 2/3; overflow: hidden; background: var(--bg4); }
.mc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.movie-card:hover .mc-img img { transform: scale(1.04); }
.noimg { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 20px; }
.mc-save {
  position: absolute; top: 6px; left: 6px;
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(2,4,8,.72); backdrop-filter: blur(6px);
  border: 1px solid var(--bord); color: var(--text2); font-size: 10px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s; z-index: 2;
}
.mc-save:hover, .mc-save.saved { background: var(--blue); color: #fff; border-color: var(--blue); }
.mc-rating {
  position: absolute; bottom: 6px; right: 6px;
  background: rgba(0,0,0,.8); border-radius: 5px;
  padding: 2px 5px; font-size: 10px; font-weight: 700; color: #f5c518;
  display: flex; align-items: center; gap: 2px;
}
.mc-info { padding: 6px 8px 8px; }
.mc-title { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.mc-meta { font-size: 10px; color: var(--text3); }

/* ══ CATEGORIES ══ */
.cat-tabs { display: flex; gap: 8px; padding: 0 13px; margin-bottom: 12px; }
.cat-tab {
  flex: 1; padding: 9px; border-radius: var(--rs);
  font-size: 13px; font-weight: 600; text-align: center;
  border: 1px solid var(--bord); background: var(--bg3);
  color: var(--text2); transition: all .18s; cursor: pointer;
}
.cat-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.genres-scroll { display: flex; gap: 7px; padding: 0 13px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.genres-scroll::-webkit-scrollbar { display: none; }
.genre-chip {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  border: 1.5px solid var(--bord2); color: var(--text2);
  background: transparent; cursor: pointer; transition: all .18s; white-space: nowrap;
}
.genre-chip:hover, .genre-chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
#catResults { padding: 0 13px; display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }

/* ══ AUTH ══ */
.auth-page {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 24px 16px;
  background: var(--bg);
  background-image: radial-gradient(ellipse 80% 55% at 50% -5%, rgba(37,99,235,.16) 0%, transparent 60%);
}
.auth-logo { font-size: 28px; font-weight: 800; margin-bottom: 5px; text-align: center; background: linear-gradient(135deg,var(--blue2),var(--blue3)); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.auth-sub { font-size: 12px; color: var(--text3); margin-bottom: 26px; text-align: center; }
.auth-card { width: 100%; max-width: 360px; background: var(--bg3); border: 1px solid var(--bord); border-radius: 18px; padding: 24px 20px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 17px; font-weight: 800; margin-bottom: 18px; }
.form-group { margin-bottom: 13px; }
.form-group label { display: block; font-size: 12px; font-weight: 500; color: var(--text2); margin-bottom: 6px; }
.form-input { width: 100%; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--bord); border-radius: var(--rs); color: var(--text); font-size: 13px; direction: rtl; outline: none; transition: all .18s; }
.form-input:focus { border-color: var(--blue2); box-shadow: 0 0 0 3px rgba(59,130,246,.11); }
.form-input::placeholder { color: var(--text3); }
.btn-primary { width: 100%; padding: 12px; background: var(--blue); border-radius: var(--rs); color: #fff; font-size: 14px; font-weight: 700; margin-top: 5px; transition: all .18s; box-shadow: 0 4px 16px rgba(37,99,235,.42); cursor: pointer; border: none; font-family: inherit; }
.btn-primary:hover { background: #1d4ed8; }
.auth-switch { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text3); }
.auth-switch a { color: var(--blue2); font-weight: 600; }
.form-error { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.28); border-radius: 8px; padding: 8px 12px; font-size: 12px; color: #fca5a5; margin-bottom: 12px; display: none; }
.form-error.show { display: block; }

/* ══ ACCOUNT ══ */
.account-page { padding: 13px; }
.profile-section { display: flex; flex-direction: column; align-items: center; padding: 18px 13px; }
.profile-avatar { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; border: 3px solid var(--blue); box-shadow: 0 0 16px rgba(37,99,235,.38); }
.profile-avatar-wrap { position: relative; margin-bottom: 12px; }
.profile-avatar-edit { position: absolute; bottom: 0; left: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--blue); border: 2px solid var(--bg); display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; cursor: pointer; }
.profile-name { font-size: 16px; font-weight: 700; margin-bottom: 3px; }
.profile-email { font-size: 11px; color: var(--text3); }
.settings-card { background: var(--bg3); border: 1px solid var(--bord); border-radius: var(--r); overflow: hidden; margin-bottom: 12px; }
.settings-item { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border-bottom: 1px solid var(--bord); cursor: pointer; transition: background .15s; }
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { background: var(--bsub); }
.si-icon { width: 28px; height: 28px; border-radius: 7px; background: var(--bsub); display: flex; align-items: center; justify-content: center; color: var(--blue3); font-size: 12px; flex-shrink: 0; }
.si-text { flex: 1; font-size: 13px; font-weight: 500; }
.si-sub { font-size: 10px; color: var(--text3); }
.si-arrow { color: var(--text3); font-size: 10px; }
.btn-logout { width: 100%; padding: 12px; background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.28); border-radius: var(--rs); color: #f87171; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-family: inherit; transition: all .18s; }
.btn-logout:hover { background: rgba(239,68,68,.18); }

/* ══ FAVORITES ══ */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 60px 24px; text-align: center; gap: 12px; }
.empty-state i { font-size: 42px; color: var(--text3); }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text2); }
.empty-state p { font-size: 12px; color: var(--text3); line-height: 1.6; }

/* ══ DETAILS ══ */
.details-backdrop-wrap { position: relative; margin-bottom: -65px; }
.details-backdrop { width: 100%; height: 230px; object-fit: cover; object-position: top; }
.details-backdrop-overlay { position: absolute; inset: 0; background: linear-gradient(to top, var(--bg) 25%, transparent 100%); }
.details-main { position: relative; padding: 0 13px 22px; }
.details-poster-row { display: flex; gap: 13px; align-items: flex-end; margin-bottom: 13px; }
.details-poster { width: 100px; border-radius: 11px; flex-shrink: 0; box-shadow: 0 8px 22px rgba(0,0,0,.6); border: 2px solid var(--bord); }
.details-info { flex: 1; padding-bottom: 5px; }
.details-title { font-size: 18px; font-weight: 800; line-height: 1.2; margin-bottom: 6px; }
.details-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.meta-item { display: flex; align-items: center; gap: 3px; font-size: 11px; color: var(--text2); }
.meta-item i { color: var(--blue3); font-size: 10px; }
.details-actions { display: flex; gap: 8px; margin-bottom: 16px; }
.details-desc { font-size: 13px; color: var(--text2); line-height: 1.7; margin-bottom: 16px; }
.dsec-title { font-size: 13px; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 7px; }
.dsec-title::after { content: ''; flex: 1; height: 1px; background: var(--bord); }
.rating-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 13px; }
.rating-num { font-size: 36px; font-weight: 800; color: var(--blue2); line-height: 1; }
.stars { display: flex; gap: 2px; color: #f5c518; font-size: 12px; }
.rating-count { font-size: 10px; color: var(--text3); margin-top: 3px; }
.class-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.class-badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 600; border: 1.5px solid; }
.class-badge.all { border-color:#3b82f6;color:#3b82f6;background:rgba(59,130,246,.1) }
.class-badge.pg  { border-color:#10b981;color:#10b981;background:rgba(16,185,129,.1) }
.class-badge.teen{ border-color:#f59e0b;color:#f59e0b;background:rgba(245,158,11,.1) }
.class-badge.adult{border-color:#ef4444;color:#ef4444;background:rgba(239,68,68,.1) }
.cast-scroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.cast-scroll::-webkit-scrollbar { display: none; }
.cast-item { flex-shrink: 0; text-align: center; width: 70px; }
.cast-img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; margin: 0 auto 4px; border: 2px solid var(--bord); }
.cast-nophoto { width: 56px; height: 56px; border-radius: 50%; background: var(--bg3); border: 2px solid var(--bord); margin: 0 auto 4px; display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 16px; }
.cast-name { font-size: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cast-role { font-size: 9px; color: var(--text3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ══ WATCH ══ */
.watch-player { width: 100%; background: #000; aspect-ratio: 16/9; overflow: hidden; }
.watch-player iframe { width: 100%; height: 100%; border: none; }
.watch-info { padding: 13px; }
.server-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; }
.server-tabs::-webkit-scrollbar { display: none; }
.server-tab { flex-shrink: 0; padding: 7px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; border: 1px solid var(--bord); background: var(--bg3); color: var(--text2); cursor: pointer; transition: all .18s; }
.server-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* ══ PWA BANNER ══ */
.pwa-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.76); backdrop-filter: blur(5px); z-index: 1900; opacity: 0; pointer-events: none; transition: opacity .28s; }
.pwa-overlay.show { opacity: 1; pointer-events: all; }
.pwa-banner {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.9);
  width: calc(100% - 32px); max-width: 330px;
  background: var(--bg3); border: 1px solid var(--bord2);
  border-radius: 20px; padding: 24px 20px;
  box-shadow: var(--sglow), var(--shadow);
  z-index: 1901; text-align: center;
  opacity: 0; pointer-events: none;
  transition: all .32s cubic-bezier(.34,1.56,.64,1);
}
.pwa-banner.show { opacity: 1; pointer-events: all; transform: translate(-50%,-50%) scale(1); }
.pwa-icon { width: 58px; height: 58px; border-radius: 14px; background: linear-gradient(135deg,var(--blue),var(--blue3)); margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; box-shadow: 0 7px 20px rgba(37,99,235,.44); }
.pwa-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.pwa-desc { font-size: 12px; color: var(--text2); margin-bottom: 16px; line-height: 1.5; }
.pwa-ios-steps { background: var(--bg2); border-radius: 10px; padding: 12px; margin-bottom: 16px; text-align: right; }
.pwa-step { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 12px; color: var(--text2); }
.pwa-step:last-child { margin-bottom: 0; }
.pwa-step-n { width: 19px; height: 19px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pwa-btn { width: 100%; padding: 12px; background: var(--blue); border: none; border-radius: 12px; color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 8px; cursor: pointer; font-family: inherit; transition: all .18s; box-shadow: 0 4px 16px rgba(37,99,235,.42); }
.pwa-btn:hover { background: #1d4ed8; }
.pwa-skip { background: none; border: none; color: var(--text3); font-size: 12px; cursor: pointer; font-family: inherit; padding: 6px; }

/* ══ MISC ══ */
.toast {
  position: fixed;
  bottom: calc(var(--nh) + env(safe-area-inset-bottom, 0px) + 10px);
  left: 50%; transform: translateX(-50%) translateY(14px);
  background: var(--bg3); border: 1px solid var(--bord2);
  border-radius: 10px; padding: 8px 16px;
  font-size: 12px; font-weight: 600; color: var(--text);
  z-index: 2000; opacity: 0; transition: all .25s; white-space: nowrap;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.page-head { padding: 13px 13px 0; margin-bottom: 12px; }
.page-head h2 { font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.page-head p { font-size: 11px; color: var(--text3); }
