/* ============================================================
   arena-hub.css · התפריט הראשי של אפליקציית גיבורי העל (בתוך זירת הגיבורים), 7.11.2026
   כל הגרפיקה מ-Flow (assets/arena/hub): רקע העיר עם סמל הגיבור, כפתור כהה, מסגרת זהב, פיצוץ קומיקס, אייקונים.
   הקוד רק מסדר: border-image (9-slice) כדי שהפינות לא יימתחו
   ============================================================ */

/* כפתור התפריט בפינה העליונה */
.atop__menu { all: unset; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; border-radius: var(--r-pill); color: var(--gold-hi); font: 900 .9rem/1 var(--f-brand); transition: transform var(--t-tap) var(--ease); -webkit-tap-highlight-color: transparent; }
.atop__menu img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 0 #000); }
.atop__menu:active { transform: scale(.94); }
.atop__menu:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.arena[data-screen="hub"] .atop__menu { color: #fff; }
@media (max-width: 480px) { .atop__menu span { display: none; } .atop__menu { padding: 2px; } }

/* רקע: העיר בלילה עם סמל הגיבור, זזה לאט (תמונה אחת, רק transform) */
.arena[data-screen="hub"] .abg__art { opacity: 1; background-image: url(../assets/arena/hub/bg-wide.webp?v=1); animation: hub-drift 38s cubic-bezier(.65, 0, .35, 1) infinite alternate; }
@media (max-aspect-ratio: 1/1) { .arena[data-screen="hub"] .abg__art { background-image: url(../assets/arena/hub/bg-tall.webp?v=1); background-position: center top; } }
.arena[data-screen="hub"] .abg__art::after { background: linear-gradient(180deg, rgba(14, 10, 38, .05) 0%, rgba(14, 10, 38, .35) 38%, rgba(14, 10, 38, .88) 70%); }
.arena[data-screen="hub"] .abg__dots { opacity: .25; }
@keyframes hub-drift { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.2%, 1%, 0); } }

.hub { width: min(760px, 100% - 32px); margin: 0 auto; padding: 11vh 0 calc(40px + env(safe-area-inset-bottom)); }
/* התפריט הראשי הוא הבית של האפליקציה: הלשוניות שייכות לזירה, ולא מופיעות כאן */
.arena[data-screen="hub"] .atabs { display: none !important; }
@media (min-width: 900px) { .hub { padding-top: 26vh; } }
.arena .hub__t { margin: 0 auto 6px; animation: hub-in 360ms var(--ease) both; }   /* הלוגו של האפליקציה, באותו כתב של "זירת הגיבורים" (.hlogo) */
.arena .hub__hi { margin: 0 0 44px; text-align: center; color: var(--text); font: 700 1.05rem var(--f-text); text-shadow: 0 1px 3px #000; }
.hub__hi b { color: var(--gold-hi); }
/* בבית של האפליקציה רק כפתור הצליל: המונים וה"?" שייכים לזירה */
.arena[data-screen="hub"] .atop__hud, .arena[data-screen="hub"] .atop__how { visibility: hidden; }
.arena .hub__h { margin: 26px 0 12px; font: 900 1.3rem/1 var(--f-brand); color: var(--gold-hi); text-shadow: 2px 2px 0 var(--ink); }

/* הכרטיס הגדול: החלפת קלפים */
.hub__trade { position: relative; display: grid; gap: 12px; padding: 22px 18px 18px; animation: hub-in 360ms var(--ease) 60ms both;
  border: 30px solid transparent; border-image: url(../assets/arena/hub/frame.webp?v=1) 15% 9% fill / 30px 32px stretch; }
.hub__trade::before { content: ""; position: absolute; inset: -14px; z-index: -1; border-radius: 10px; background: rgba(10, 9, 34, .82); }
.hub__burst { position: absolute; width: 104px; top: -50px; inset-inline-end: -26px; transform: rotate(10deg); pointer-events: none; animation: hub-burst 2.6s cubic-bezier(.65, 0, .35, 1) infinite alternate; display: grid; place-items: center; }
.hub__burst img { grid-area: 1 / 1; width: 100%; display: block; }
.hub__burst b { grid-area: 1 / 1; transform: rotate(-14deg); font: 900 1rem/1 var(--f-brand); color: var(--ink); text-shadow: 0 1px 0 #fff6c4; white-space: nowrap; }   /* בועת קומיקס ריקה נראית כמו תקלה: היא אומרת משהו */
.hub__go { width: 100%; min-height: 64px; font-size: 1.25rem; }
@keyframes hub-burst { to { transform: rotate(16deg) scale(1.07); } }
.hub__tt h2 img { flex: none; width: 50px; height: 50px; object-fit: contain; margin-block: -12px; filter: drop-shadow(0 2px 0 #000); }
.hub__tt h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font: 900 1.55rem/1 var(--f-brand); color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
.hub__tt p { margin: 0; line-height: 1.45; color: var(--text); max-width: 34ch; }
.hub__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* כפתורים מתמונות Flow */
.hbtn { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; padding: 6px 16px; text-align: center; font: 900 1.15rem/1.05 var(--f-brand); -webkit-tap-highlight-color: transparent; transition: transform 90ms var(--ease), filter 160ms var(--ease); }
.hbtn--gold { color: var(--ink); white-space: nowrap; font-size: 1.08rem; padding-inline: 6px; border: 14px solid transparent; border-image: url(../assets/arena/ui/btn-gold.webp?v=1) 34% 12% fill / 14px 22px stretch; text-shadow: 0 1px 0 rgba(255, 240, 190, .7); }
.hbtn--dark { color: var(--gold-hi); border: 16px solid transparent; border-image: url(../assets/arena/hub/btn-dark.webp?v=1) 30% 13% fill / 16px 30px stretch; text-shadow: 2px 2px 0 var(--ink); }
.hbtn:hover { filter: brightness(1.08); }
.hbtn:active { transform: scale(.97); }
.hbtn:focus-visible { outline: 3px solid var(--teal-hi); outline-offset: 3px; }
.hub__album { justify-content: flex-start; gap: 10px; min-height: 64px; }
.hub__album img { width: 46px; height: 46px; object-fit: contain; margin-block: -10px; filter: drop-shadow(0 2px 0 #000); }
.hub__album b { margin-inline-start: auto; font: 900 1.2rem/1 var(--f-brand); color: #fff; }
.hub__album b small { font-size: .7em; color: var(--muted); }

/* משחקים: אריחים במסגרת הזהב */
.hub__games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (min-width: 640px) { .hub__games { grid-template-columns: repeat(3, 1fr); } }
.hub__games li { animation: hub-in 360ms var(--ease) both; }
.hub__games li:nth-child(2) { animation-delay: 40ms; } .hub__games li:nth-child(3) { animation-delay: 80ms; } .hub__games li:nth-child(4) { animation-delay: 120ms; } .hub__games li:nth-child(5) { animation-delay: 160ms; }
.htile { all: unset; box-sizing: border-box; cursor: pointer; position: relative; display: grid; width: 100%; -webkit-tap-highlight-color: transparent; transition: transform 160ms var(--ease); }
.htile__art { display: block; aspect-ratio: 1200 / 651; overflow: hidden; border-radius: 6%/11%; margin: 4.5% 3%; }
.htile__art img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 360ms var(--ease); }
.htile__frame { position: absolute; inset-inline: 0; top: 0; aspect-ratio: 1200 / 651; background: url(../assets/arena/hub/frame.webp?v=1) center / 100% 100% no-repeat; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.htile__txt { display: grid; gap: 2px; padding: 0 4px; margin-top: -2px; }
.htile__txt b { font: 900 1.05rem/1.1 var(--f-brand); color: var(--gold-hi); text-shadow: 2px 2px 0 var(--ink); }
.htile__txt small { font-size: .82rem; color: var(--muted); line-height: 1.3; }
.htile:hover .htile__art img { transform: scale(1.05); }
.htile:active { transform: scale(.97); }
.htile:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 12px; }

@keyframes hub-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  .arena[data-screen="hub"] .abg__art, .hub__burst, .hub__t, .hub__trade, .hub__games li { animation: none !important; }
}

/* UX audit 7.11.2026: טוקנים של הזירה במקום מספרים, ושתי עמודות במסך רחב */
.hub__t, .hub__trade, .hub__games li { animation-duration: var(--t-enter) !important; }
.hbtn { transition-duration: var(--t-tap), var(--t-state); }
@media (min-width: 1200px) {
  .hub { width: min(1180px, 100% - 64px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "t t" "hi hi" "trade h" "trade games"; column-gap: 44px; align-items: start; padding-top: 16vh; }
  .arena .hub__t { grid-area: t; margin-bottom: 0; } .arena .hub__hi { grid-area: hi; margin-bottom: 56px; } .hub__trade { grid-area: trade; } .arena .hub__h { grid-area: h; margin: 0 0 4px; } .hub__games { grid-area: games; grid-template-columns: repeat(2, 1fr) !important; }
}


/* ===================================================================== סבב 11 (7.11.2026): התפריט הראשי עם הביקון של גברמלך
   העיר בין המגדלים (Flow), והביקון (שריר וכתר עשויים מאור) עם האלומה כשכבות נפרדות שנושמות. */
.arena[data-screen="hub"] .abg__art { background-image: url(../assets/arena/ui2/bg-hub-wide.webp?v=1); }
@media (max-aspect-ratio: 1/1) { .arena[data-screen="hub"] .abg__art { background-image: url(../assets/arena/ui2/bg-hub-tall.webp?v=1); background-position: center top; } }
.arena[data-screen="hub"] .abg__art::after { background: linear-gradient(180deg, rgba(14, 10, 38, 0) 0%, rgba(14, 10, 38, .12) 38%, rgba(14, 10, 38, .7) 78%); }
.arena[data-screen="hub"] .abg__beacon { display: block; z-index: 1; left: 50%; top: 1.5%; width: min(52vw, 340px); aspect-ratio: 758 / 908; translate: -50% 0; background: url(../assets/arena/ui2/beacon.webp?v=1) center / contain no-repeat; opacity: .9; }
.arena[data-screen="hub"] .abg__beam { display: block; z-index: 1; left: calc(50% - min(44vw, 260px)); bottom: 2%; width: min(40vw, 230px); height: 68%; background: url(../assets/arena/ui2/beam.webp?v=1) center bottom / 100% 100% no-repeat; opacity: .55; transform-origin: 0 100%; }
@keyframes a11beacon { 0%, 100% { opacity: .78; scale: 1; } 50% { opacity: 1; scale: 1.035; } }
@keyframes a11beam { 0%, 100% { rotate: -1.5deg; opacity: .45; } 50% { rotate: 1.5deg; opacity: .62; } }
.js-motion .arena[data-screen="hub"] .abg__beacon { animation: a11beacon 4.2s ease-in-out infinite; }
.js-motion .arena[data-screen="hub"] .abg__beam { animation: a11beam 7s ease-in-out infinite; }

/* בועת דיבור לברכה, איור ההחלפה, סרט זהב לכותרת המשחקים */
.arena .hub__hi { width: fit-content; max-width: 92%; margin-inline: auto; box-sizing: border-box; border-style: solid; border-color: transparent; border-width: 6px 18px 20px 26px; border-image: url(../assets/arena/ui2/bubble.webp?v=1) 22% 12% 42% 22% fill / 13px 18px 24px 30px stretch; color: var(--ink); text-shadow: none; font-weight: 800; padding: 2px 4px 0; }
.arena .hub__hi b { color: #c2283a; }
.hub__art { display: block; width: min(100%, 300px); height: auto; margin: -4px auto 2px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.arena .hub__h { width: fit-content; margin-inline: auto; box-sizing: border-box; border-style: solid; border-color: transparent; border-width: 3px 36px 11px; border-image: url(../assets/arena/ui2/ribbon-label.webp?v=1) 22% 17% 40% fill / 8px 38px 13px stretch; color: var(--ink); text-shadow: 0 1px 0 rgba(255, 245, 200, .6); padding: 2px 6px 0; font-size: 1.1rem; }
@media (min-width: 1200px) { .arena .hub__h { margin-inline: 0; } }

/* טלפון: הכותרת יורדת קצת, כך שהביקון כולו בשמיים והכותרת מוארת ממנו */
@media (max-aspect-ratio: 1/1) { .hub { padding-top: 21vh !important; } }
@media (min-aspect-ratio: 1/1) { .arena[data-screen="hub"] .abg__beacon { width: min(20vw, 270px); top: 5.5%; } }

/* ===================================================================== 8.11.2026: התפריט הראשי = מסך אחד בלי גלילה (דניאל: "אני לא רוצה צורך בגלילה")
   עמודה גמישה בגובה המסך: לוגו, ברכה, פאנל ההחלפה (האיור מתכווץ לפי המקום), ושורה אחת של 5 משחקים קטנים. */
@media (max-width: 899px) {
  .hub { height: calc(100dvh - 52px - env(safe-area-inset-bottom)); box-sizing: border-box; padding: 0 0 max(8px, env(safe-area-inset-bottom)) !important; display: flex; flex-direction: column; gap: 1.1dvh; overflow: hidden; }
  .arena .hub__t { flex: none; margin: 0 auto !important; }
  .hub__t.hlogo--img img { max-height: 12dvh !important; }
  .arena .hub__hi { flex: none; margin: 0 auto !important; font-size: .95rem; }
  .hub__trade { flex: 1 1 auto; min-height: 0; display: flex !important; flex-direction: column; gap: .9dvh !important; padding: 2.2dvh 14px 12px !important; margin-top: 1.4dvh; }
  .hub__art { flex: 1 1 auto; min-height: 0; height: 0; width: 100%; max-height: 24dvh; object-fit: contain; margin: 0 auto !important; }
  .hub__tt h2 { font-size: 1.3rem !important; margin-bottom: 2px !important; }
  .hub__tt p { font-size: .88rem; line-height: 1.35; }
  .hub__go, .hub__album { flex: none; min-height: 52px !important; }
  .hub__burst { width: 78px; top: -30px; inset-inline-end: -14px; }
  .hub__burst b { font-size: .8rem; }
  .arena .hub__h { flex: none; margin: .4dvh auto 0 !important; font-size: .95rem !important; }
  .hub__games { flex: none; display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)) !important; gap: 6px !important; }
  .htile__txt { padding: 0 1px; margin-top: 1px; }
  .htile__txt b { font-size: 12px !important; line-height: 1.1; text-align: center; text-shadow: 1px 1px 0 var(--ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  .htile__txt small { display: none; }
  .htile__art, .htile__frame { aspect-ratio: 1 / 1; }
}
@media (min-width: 900px) {
  .hub { padding-top: 4vh !important; padding-bottom: 16px !important; }
  .hub__t.hlogo--img img { max-height: 15dvh !important; }
  .arena .hub__hi { margin-bottom: 2.4vh !important; }
  .hub__art { max-height: 20dvh; width: auto; margin: 0 auto; }
  .hub__trade { gap: 1.2vh !important; padding: 2.4vh 18px 16px !important; }
  .hub__games { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 12px !important; }
  .htile__txt small { display: none; }
  .htile__txt b { font-size: .95rem !important; }
}
@media (min-width: 900px) {
  .arena[data-screen="hub"] { padding-bottom: 0 !important; }
  .hub { padding-top: 2vh !important; padding-bottom: 8px !important; }
  .hub__t.hlogo--img img { max-height: 13dvh !important; }
  .arena .hub__hi { margin-bottom: 1.6vh !important; }
  .hub__art { max-height: 15dvh; }
  .hub__go, .hub__album { min-height: 52px !important; }
  .hub__tt h2 { font-size: 1.35rem !important; }
}

/* ===================================================================== 8.11.2026: התפריט הראשי v2 - הזירה במרכז (דניאל: "האפליקציה בעיקר לזירת הגיבורים")
   כפתור "החלפה" קטן למעלה שפותח חלון, פאנל גדול לזירה, ושורה של עוד 4 משחקים. מסך אחד בכל גודל. */
.hub.hub--v2 { display: flex !important; flex-direction: column; align-items: stretch; width: min(560px, 100% - 32px); margin-inline: auto; height: calc(100dvh - 52px - env(safe-area-inset-bottom)); box-sizing: border-box; padding: 0 0 max(10px, env(safe-area-inset-bottom)) !important; gap: 1.2dvh; overflow: hidden; }
@media (min-width: 900px) { .hub.hub--v2 { width: min(760px, 100% - 64px); height: calc(100dvh - 104px); padding-top: 1vh !important; } }
.arena[data-screen="hub"] .atop__brand { visibility: hidden; }
.hub__swap { all: unset; box-sizing: border-box; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 6px; border-style: solid; border-color: transparent; border-width: 5px 10px 7px; border-image: url(../assets/arena/ui2/btn-navy.webp?v=1) 42% 11% fill / 22px 14px stretch; color: var(--gold-hi); font: 900 .95rem var(--f-brand); text-shadow: 1px 1px 0 var(--ink); filter: drop-shadow(2px 3px 0 rgba(10, 11, 34, .6)); transition: transform var(--t-tap, 120ms); }
.hub__swap img { width: 30px; height: 30px; object-fit: contain; margin-block: -6px; }
.hub__swap:active { transform: translateY(2px); }
.hub__swap:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
/* הפאנל של הזירה: התמונה במסגרת, כפתור זהב גדול */
.hub__play { all: unset; box-sizing: border-box; cursor: pointer; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.4dvh; -webkit-tap-highlight-color: transparent; }
.hub__playart { position: relative; flex: none; height: min(30dvh, calc((100vw - 32px) * .5425), 330px); aspect-ratio: 1200 / 651; max-width: 100%; transition: transform var(--t-state, 220ms) var(--ease); }
.hub__playart img { position: absolute; inset: 4.5% 3%; width: 94%; height: 91%; object-fit: cover; border-radius: 6% / 11%; }
.hub__playart .htile__frame { inset: 0; height: 100%; }
.hub__play:hover .hub__playart { transform: scale(1.02); }
.hub__play:active .hub__playart { transform: scale(.98); }
.hub__play:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; border-radius: 16px; }
.hub__playgo { display: grid; place-items: center; min-width: min(78%, 340px); min-height: 60px; font-size: 1.55rem !important; }
.hub__play small { font: 700 .88rem var(--f-text); color: #eef0ff; text-shadow: 0 1px 3px #000; }
.hub--v2 .hub__h { margin-inline: auto !important; }
.hub--v2 .hub__games { flex: none; display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 8px !important; width: 100%; }
@media (min-width: 900px) { .hub--v2 .hub__games { gap: 14px !important; } }
/* חלון ההחלפה: הפאנל הכהה עם מסגרת הזהב */
.adlg--hswap .adlg__box { background: transparent !important; color: var(--text); border-style: solid !important; border-color: transparent !important; border-width: 14px !important; border-image: url(../assets/arena/ui2/panel-navy.webp?v=1) 9% 7% fill / 30px 26px stretch !important; border-radius: 0 !important; box-shadow: none !important; }
.hswapd { position: relative; display: grid; gap: 12px; justify-items: center; text-align: center; padding-top: 6px; }
.hswapd__art { width: min(100%, 320px); height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.hswapd h2 { margin: 0; font: 900 1.5rem/1 var(--f-brand); color: var(--gold); text-shadow: 2px 2px 0 var(--ink); }
.hswapd p { margin: 0; color: var(--text); line-height: 1.45; max-width: 32ch; }
.hswapd .hbtn { width: 100%; box-sizing: border-box; }
.hswapd .hub__burst { top: 2px; inset-inline-end: auto; inset-inline-start: 4px; width: 76px; }   /* מול כפתור הסגירה, לא מתחתיו */
.arena:not([data-screen="hub"]) .hub__swap { display: none; }
.hub__playart .htile__frame { aspect-ratio: auto !important; inset: 0 !important; width: 100%; height: 100%; }

/* 8.11.2026: הגדרות מהתפריט הראשי (גלגל שיניים ליד הרמקול) + שורת החשבון בחלון */
.arena:not([data-screen="hub"]) .hub__gear { display: none !important; }
.hub__gear .dic { width: 22px; height: 22px; }
.setl__acct { display: grid; gap: 10px; margin: 0 0 14px; padding: 12px; border-radius: 14px; border: 2px solid var(--ink); background: #fff8e1; }
.setl__acct.is-on { background: #e9fbef; }
.setl__st { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: center; }
.setl__st .dic { grid-row: span 2; width: 30px; height: 30px; }
.setl__st b { font: 900 1rem var(--f-brand); }
.setl__st small { font-size: .82rem; color: #4a4560; line-height: 1.35; }
.setl__acct .btn { justify-self: stretch; }
