/* ===== Football Street — „Brazylijska ulica” (v0.26): girlanda flag, tła nagłówków, Kaju, ikony ===== */

/* bez widocznych pasków przewijania (przewijanie działa dalej: kółko, dotyk, klawiatura) */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
::-webkit-scrollbar { width: 0; height: 0; display: none; }
html, body { overflow-x: clip; }

/* girlanda flag nad nagłówkami widoków: dyskretna, nieruchoma, przygaszona */
.vhead, .bighead, .rk-head { position: relative; overflow: clip; }
.vhead::before, .bighead::before, .rk-head::before {
  content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 34px; z-index: 0; pointer-events: none;
  background: url(../assets/deco/flagi.png) 0 0 / auto 34px repeat-x; opacity: .38; filter: saturate(.6) brightness(.85);
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}
.vhead > *, .bighead > *, .rk-head > * { position: relative; z-index: 1; }
.bighead, .rk-head { padding-top: 34px; }

/* bigHead z grafiką w tle */
.bighead.has-bg { background-size: cover; background-position: center 40%; }

/* Kaju na pustych ekranach */
.kaju-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 10px; text-align: center; }
.kaju-empty img { width: 150px; max-width: 60%; height: auto; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); animation: kajuBob 3.2s ease-in-out infinite; }
.kaju-empty p { margin: 0; color: var(--muted); max-width: 420px; }
.kaju-side { float: right; width: 140px; margin: -10px 0 0 12px; filter: drop-shadow(0 8px 16px rgba(0,0,0,.4)); }
@keyframes kajuBob { 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .kaju-empty img { animation: none; } }

/* ekran po meczu */
.summary .card { position: relative; }
.sum-fx { display: block; width: 210px; max-width: 70%; margin: -70px auto 4px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.5)); animation: capIn .45s ease; }

/* skrzynki: rzadki drop */
.cap-res { position: relative; overflow: hidden; }
.cap-res > * { position: relative; }
.cap-res .cap-fx { position: absolute; right: -30px; top: -40px; width: 200px; opacity: .5; pointer-events: none; animation: capFxSpin 14s linear infinite; }
@keyframes capFxSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cap-res .cap-fx { animation: none; } }

/* ikony z paczki */
.sz-emb img { width: 42px; height: 42px; object-fit: contain; }
.sz-patch:not(.own) .sz-emb img { filter: grayscale(.7) brightness(.8); }
.ico.sghico { width: 26px; height: 26px; vertical-align: middle; margin-right: 4px; }
.ic .ico.bud { width: 64px; height: 64px; }
.kl-prize i img { width: 34px; height: 34px; object-fit: contain; display: block; }
.kl-log i img { width: 24px; height: 24px; object-fit: contain; display: block; }
.ico.fnico { width: 22px; height: 22px; vertical-align: middle; margin-right: 2px; }
.fn-tile.main { position: relative; }
.fn-tile .ico.fnbig { position: absolute; right: 8px; top: 8px; width: 48px; height: 48px; opacity: .9; }
.ico.rpico { width: 20px; height: 20px; vertical-align: -4px; }
.pv-h .ico.rpico { width: 24px; height: 24px; }

@media (max-width: 900px) {
  .vhead::before, .bighead::before, .rk-head::before { height: 26px; background-size: auto 26px; }
  .bighead, .rk-head { padding-top: 28px; }
  .kaju-side { width: 96px; }
  .sum-fx { width: 160px; margin-top: -50px; }
}

/* ===== tło całej strony prześwitujące przez panele ===== */
/* obrazek tła: zmień --page-bg (np. na tło eventu), reszta zostaje */
:root { --page-bg: url(../assets/bg/home_noc.jpg); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(10,12,16,.35) 0%, rgba(10,12,16,.6) 50%, rgba(10,12,16,.8) 100%), var(--page-bg) center / cover no-repeat; }
body.create::before { display: none; }
body:not(.create) { background: transparent; }
.card { background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 40%), rgba(22,26,34,.66); border-color: rgba(255,255,255,.07);
  -webkit-backdrop-filter: blur(12px) saturate(1.25); backdrop-filter: blur(12px) saturate(1.25); }
.side { background: rgba(12,14,18,.62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-right-color: rgba(255,255,255,.06); }
.top { background: rgba(12,14,18,.7); }
.vhead { background-color: transparent; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card { background: rgba(24,28,36,.94); } }
/* menu boczne bez paska: zamiast niego miękkie wygaszenie dołu, gdy jest co przewijać */
@media (min-width: 901px) { .side { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 36px;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 40px), transparent); } }

/* nagłówki działów jak szkło: bez własnego obrazka, bo ten sam obraz jest tłem całej strony */
.vhead { background-image: linear-gradient(90deg, rgba(10,12,16,.72) 0%, rgba(10,12,16,.35) 55%, rgba(10,12,16,0)) !important; border-bottom-color: rgba(255,255,255,.06); }
.bighead, .bighead.has-bg, .rk-head { background: linear-gradient(90deg, rgba(14,17,22,.78) 0%, rgba(14,17,22,.5) 60%, rgba(14,17,22,.25)) !important;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-color: rgba(255,255,255,.07); }
/* tła działów mają już własne girlandy, więc nakładkę z flagami wyłączamy (plik deco/flagi.png zostaje na eventy) */
.vhead::before, .bighead::before, .rk-head::before { display: none; }
.bighead, .rk-head { padding-top: 26px; }

/* trening podstawowy: 4 karty umiejętności na całą szerokość */
.trmain .tcards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1200px) { .trmain .tcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .trmain .tcards { grid-template-columns: 1fr; } }

/* otwieranie skrzynki na środku ekranu */
.cap-ovl { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; overflow-y: auto;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--cc) 22%, rgba(8,10,14,.9)), rgba(8,10,14,.95) 60%); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity .25s; }
.cap-ovl.in { opacity: 1; }
.co-stage { position: relative; display: grid; place-items: center; width: 300px; height: 280px; flex-shrink: 0; }
.co-chest { position: relative; z-index: 2; width: 240px; height: 240px; object-fit: contain; filter: drop-shadow(0 0 30px color-mix(in srgb, var(--cc) 70%, transparent)); animation: coIn .45s cubic-bezier(.2,1.4,.4,1) both; }
.co-chest.shake { animation: coIn .45s cubic-bezier(.2,1.4,.4,1) both, coShake .5s .45s ease-in-out infinite; }
.cap-ovl.open .co-chest { animation: coPop .5s ease both; }
.co-name { position: absolute; bottom: -6px; z-index: 3; font-family: var(--display); font-size: 26px; letter-spacing: 1px; color: #fff; text-shadow: 0 2px 10px #000; }
.co-rays { position: absolute; inset: -60px; z-index: 1; border-radius: 50%; opacity: 0; transform: scale(.4);
  background: repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--cc) 55%, transparent) 0 8deg, transparent 8deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 68%); mask-image: radial-gradient(circle, #000 25%, transparent 68%); }
.cap-ovl.open .co-rays { animation: coRays .6s ease forwards, coSpin 16s linear infinite; }
.co-fx { position: absolute; z-index: 1; width: 420px; max-width: none; opacity: 0; animation: coRays .6s ease forwards, coSpin 22s linear infinite reverse; }
.co-loot { width: min(760px, 100%); text-align: center; }
.co-loot h3 { margin: 6px 0 10px; font-family: var(--display); font-weight: 400; font-size: 30px; letter-spacing: 1px; }
.co-loot h3::before { display: none; }
.co-loot .sz-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.co-loot .co-it { width: 118px; }
.co-it { opacity: 0; animation: coItem .45s cubic-bezier(.2,1.4,.4,1) forwards; cursor: default; }
.co-txt { margin: 12px 0 0; }
.co-loot .btn { margin-top: 16px; min-width: 220px; opacity: 0; animation: coItem .3s .6s forwards; }
.chest-ovl .co-loot .row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chest-ovl .co-loot .btn { min-width: 0; margin-top: 0; }
.cap-ovl.rare .co-name { color: var(--cc); }
@keyframes coIn { from { transform: scale(.3) translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes coShake { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-6deg) scale(1.03); } 40% { transform: rotate(5deg); } 60% { transform: rotate(-4deg) scale(1.05); } 80% { transform: rotate(3deg); } }
@keyframes coPop { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes coRays { to { opacity: 1; transform: scale(1); } }
@keyframes coSpin { to { rotate: 360deg; } }
@keyframes coItem { from { opacity: 0; transform: translateY(18px) scale(.7); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .co-chest, .co-chest.shake, .co-rays, .co-fx, .co-it, .co-loot .btn { animation: none !important; opacity: 1; transform: none; } }
@media (max-width: 560px) { .co-stage { width: 220px; height: 210px; } .co-chest { width: 170px; height: 170px; } .co-fx { width: 300px; } }

/* powiadomienie o meczu na żywo: większe, przycisk się nie ucina */
.toast.live { max-width: min(460px, calc(100vw - 32px)); padding: 14px 18px; font-size: 15px; gap: 12px; line-height: 1.35; }
.toast.live .btn { flex-shrink: 0; white-space: nowrap; padding: 8px 14px; font-size: 14px; }
