:root {
  --bg: #eafaff;
  --panel: rgba(255, 255, 255, .72);
  --panel2: rgba(215, 244, 255, .86);
  --text: #0c2b45;
  --muted: #4d7288;
  --lime: #fff15a;
  --yellow: #ffd43b;
  --red: #ff5d73;
  --green: #21c774;
  --border: rgba(10, 110, 150, .16);
  --summer-blue: #7ee8ff;
  --summer-blue-2: #bdf6ff;
  --summer-yellow: #fff3a3;
  --summer-yellow-2: #ffd76a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at 18% 8%, rgba(255, 244, 127, .75), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(126, 232, 255, .72), transparent 34%),
    linear-gradient(135deg, #e9fbff 0%, #bff4ff 34%, #fff0a8 72%, #ffd56b 100%);
  background-attachment: fixed;
  color: var(--text);
}

.top-drops {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, .48);
  border-bottom: 1px solid rgba(10, 110, 150, .12);
}

.drop-chip {
  min-width: 92px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #471b39, #8b1d4a);
  padding: 4px;
  display: flex;
  gap: 5px;
  align-items: center;
  font-size: 10px;
  border: 1px solid rgba(255,255,255,.07);
}

.drop-chip img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.drop-chip b {
  display: block;
  white-space: nowrap;
  max-width: 48px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.drop-chip span {
  color: var(--lime);
}

/* NAVBAR */

.navbar {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 0 32px;
  background: rgba(255, 255, 255, .58);
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(10, 110, 150, .12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
}

.logo {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff244d, #1f8cff);
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}


.logo-img {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  object-fit: cover;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-text strong {
  font-size: 18px;
  line-height: 1.1;
}

.brand-text small {
  color: var(--muted);
  font-size: 12px;
}

.brand span {
  display: block;
  color: var(--lime);
  font-size: 13px;
  margin-top: 4px;
}

.nav-links {
  display: flex;
  justify-content: center;
  gap: 28px;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  opacity: .85;
}

.nav-links a:hover {
  opacity: 1;
  color: var(--lime);
}

.login-btn,
.open-btn,
.hero button,
.modal-card button,
.back-btn {
  background: var(--lime);
  color: #0c2b45;
  border: 0;
  border-radius: 6px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
}

.profile-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* PROFIL + SALDO */

.profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.balance-card {
  min-width: 128px;
  height: 52px;
  background: linear-gradient(135deg, #202a3d, #121b2e);
  border: 1px solid rgba(216,255,63,.28);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0,0,0,.22);
}

.balance-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.balance-card strong {
  color: var(--lime);
  font-size: 17px;
  line-height: 1.1;
  white-space: nowrap;
}

.profile-button {
  min-width: 230px;
  min-height: 58px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(10, 110, 150, .14);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.profile-button:hover {
  border-color: rgba(216,255,63,.35);
}

.profile-button img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, .82);
}

.profile-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.profile-info strong {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-info small {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.profile-arrow {
  margin-left: auto;
  color: var(--muted);
}

.profile-menu {
  position: absolute;
  right: 0;
  top: 66px;
  width: 360px;
  max-height: 520px;
  overflow: auto;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(10, 110, 150, .16);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
}

.menu-title {
  font-weight: 900;
  margin-bottom: 12px;
}

.inventory-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inventory-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255,255,255,.06);
}

.inventory-item img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
}

.inventory-item small {
  color: var(--muted);
}

.inventory-empty {
  color: var(--muted);
  padding: 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(255,255,255,.06);
}

/* MAIN */

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 26px 20px 70px;
}

.hero {
  min-height: 310px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(18, 24, 38, .42) 0%, rgba(18, 24, 38, .18) 45%, rgba(18, 24, 38, .08) 100%),
    url('/assets/banner.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
}




.hero > div {
  width: 100%;
  min-height: 310px;
  padding: 28px 44px 34px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  align-items: end;
  column-gap: 18px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  display: none;
}

.hero .badge {
  position: absolute;
  left: 44px;
  top: 28px;
  margin: 0;
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    filter .22s ease;
}

.hero .badge:hover {
  transform: translateY(-3px) scale(1.04);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px rgba(255, 191, 0, .25);
}

.hero p {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  color: #f3f5fa;
  max-width: 620px;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  text-shadow: 0 6px 18px rgba(0, 0, 0, .7);
}

.hero button {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    filter .22s ease;
  box-shadow: 0 12px 26px rgba(216, 255, 63, .18);
}

.hero button:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.06);
  box-shadow: 0 18px 38px rgba(216, 255, 63, .28);
}

.hero button:active {
  transform: translateY(0) scale(.99);
}

.badge {
  background: #ffbf00;
  color: #111;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 900;
}

.filters {
  display: flex;
  gap: 10px;
  margin: 26px 0;
  background: rgba(255, 255, 255, .68);
  padding: 10px;
  border-radius: 10px;
}

.filters button {
  background: transparent;
  color: var(--muted);
  border: 0;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 800;
}

.filters .active {
  background: #26324a;
  color: var(--text);
  border-radius: 8px;
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.case-card {
  background: var(--panel);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.04);
  transition: transform .15s, border .15s;
}

.case-card:hover {
  transform: translateY(-3px);
  border-color: rgba(216,255,63,.4);
}

.case-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  background: var(--yellow);
  color: #111;
  font-weight: 900;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
}

.case-card img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-top: 18px;
}

.case-card h3 {
  margin: 10px 0;
  font-size: 16px;
}

.price {
  display: inline-block;
  background: #fff;
  color: #111;
  padding: 9px 14px;
  border-radius: 6px;
  font-weight: 900;
}

.case-view {
  background: transparent;
}

.case-header {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 28px;
  align-items: center;
  background: var(--panel);
  border-radius: 14px;
  padding: 22px;
}

.case-header img {
  width: 100%;
  max-height: 310px;
  object-fit: contain;
}

.case-header h2 {
  font-size: 42px;
  margin: 0 0 10px;
}

.open-row {
  margin: 20px 0;
}

.amount-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.amount-buttons button {
  width: 42px;
  height: 38px;
  border-radius: 6px;
  border: 0;
  background: #27324a;
  color: #0c2b45;
  font-weight: 900;
  cursor: pointer;
}

.amount-buttons .active {
  background: var(--lime);
  color: #111;
}

.roll-area {
  margin: 28px 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.result-card {
  background: rgba(255, 255, 255, .68);
  padding: 14px;
  border-radius: 12px;
  text-align: center;
  border: 1px solid rgba(216,255,63,.35);
}

.result-card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
}

.top-case-drops,
.chance-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.drop-card,
.chance-card {
  background: var(--panel);
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.05);
}

.drop-card img,
.chance-card img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}

.chance-card .chance {
  color: var(--lime);
  font-weight: 900;
}

.modal {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(216,255,63,.12), transparent 28%),
    rgba(4, 8, 17, .78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 18px;
  animation: modalFade .22s ease forwards;
}

.modal-card {
  width: min(650px, 100%);
  background:
    linear-gradient(180deg, rgba(31,42,62,.96), rgba(15,22,37,.98)),
    #151d2d;
  border: 1px solid rgba(216,255,63,.22);
  border-radius: 24px;
  padding: 86px 34px 34px;
  position: relative !important;
  overflow: hidden;
  box-shadow:
    0 28px 90px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,255,255,.04) inset,
    0 0 55px rgba(216,255,63,.08);
  animation: modalPop .28s cubic-bezier(.16, 1, .3, 1) forwards;
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(circle at 20% 0%, rgba(216,255,63,.18), transparent 28%),
    radial-gradient(circle at 85% 20%, rgba(31,140,255,.18), transparent 30%);
  pointer-events: none;
  opacity: .8;
}

.modal-card::after {
  content: "";
  position: absolute;
  left: 34px;
  right: 34px;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: .9;
}

.modal-card h2,
.modal-card p,
.modal-card input,
.modal-card button,
.modal-card small {
  position: relative;
  z-index: 1;
}

.modal-card h2 {
  margin: 0 70px 18px 0;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.modal-card p {
  margin: 0 0 28px;
  color: #d8e0ef;
  font-size: 18px;
  line-height: 1.45;
}

.modal-card input {
  width: 100%;
  height: 72px;
  background: rgba(8, 14, 27, .82);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  padding: 0 24px;
  color: #0c2b45;
  margin: 0 0 22px;
  font-size: 16px;
  outline: none;
  transition: border .18s ease, box-shadow .18s ease, background .18s ease;
}

.modal-card input::placeholder {
  color: rgba(157,169,189,.72);
}

.modal-card input:focus {
  border-color: rgba(216,255,63,.75);
  background: rgba(8, 14, 27, .96);
  box-shadow:
    0 0 0 4px rgba(216,255,63,.10),
    0 0 28px rgba(216,255,63,.08);
}

.modal-card #submitLogin {
  width: 100%;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(135deg, #d7ff3f, #a8ff1f);
  color: #0d1422;
  font-size: 20px;
  font-weight: 950;
  box-shadow:
    0 12px 28px rgba(216,255,63,.18),
    0 0 0 1px rgba(255,255,255,.25) inset;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}

.modal-card #submitLogin:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow:
    0 16px 34px rgba(216,255,63,.26),
    0 0 0 1px rgba(255,255,255,.3) inset;
}

.modal-card #submitLogin:active {
  transform: translateY(0);
}

.modal-card small {
  display: none !important;
}

/* WAŻNE: mocny selektor, żeby X zawsze był po prawej stronie */
.modal-card > .x,
button.x,
.x {
  position: absolute !important;
  left: auto !important;
  right: 22px !important;
  top: 22px !important;
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
  max-width: 52px !important;
  max-height: 52px !important;
  margin: 0 !important;
  background: rgba(255,255,255,.06) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 16px !important;
  font-size: 32px !important;
  line-height: 1 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 50 !important;
  cursor: pointer !important;
  transform: none !important;
  transition: background .16s ease, transform .16s ease, border .16s ease;
}

.modal-card > .x:hover,
button.x:hover,
.x:hover {
  background: rgba(255,70,99,.16) !important;
  border-color: rgba(255,70,99,.45) !important;
  transform: rotate(90deg) !important;
}

@keyframes modalFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hidden {
  display: none !important;
}

@media (max-width: 900px) {

  .hero {
    min-height: 280px;
    background-position: center;
  }

  .hero > div {
    min-height: 280px;
    padding: 22px 22px 26px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .hero .badge {
    left: 22px;
    top: 22px;
  }

  .hero p {
    font-size: 15px;
    max-width: 320px;
    margin: auto 0 12px;
  }

  .navbar {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 12px;
  }

  .nav-links {
    display: none;
  }

  .profile {
    flex-direction: column;
    align-items: flex-end;
  }

  .balance-card {
    width: 100%;
  }

  .profile-button {
    min-width: 190px;
  }

  .profile-menu {
    width: 300px;
  }

  .cases-grid,
  .top-case-drops,
  .chance-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-header {
    grid-template-columns: 1fr;
  }

  .modal-card {
    padding: 76px 22px 28px;
    border-radius: 20px;
  }

  .modal-card h2 {
    font-size: 28px;
  }

  .modal-card p {
    font-size: 15px;
  }

  .modal-card > .x,
  button.x,
  .x {
    right: 16px !important;
    top: 16px !important;
  }
}

/* LETNI MOTYW — jasnoniebieski + jasnożółty */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(120deg, rgba(255,255,255,.38), transparent 38%, rgba(255,255,255,.24) 72%, transparent),
    radial-gradient(circle at 12% 88%, rgba(126,232,255,.45), transparent 28%),
    radial-gradient(circle at 90% 84%, rgba(255,230,103,.45), transparent 30%);
  z-index: -1;
}

.top-drops,
.navbar,
.filters,
.case-card,
.case-header,
.drop-card,
.chance-card,
.result-card,
.profile-button,
.profile-menu,
.inventory-item,
.inventory-empty {
  background: rgba(255, 255, 255, .62) !important;
  border-color: rgba(10, 110, 150, .15) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-drops {
  color: #25516a;
}

.navbar {
  box-shadow: 0 14px 38px rgba(31, 146, 178, .10);
}

.nav-links a {
  color: #0c2b45;
}

.nav-links a:hover {
  color: #0c9ec6;
}

.brand-text strong,
.case-card h3,
.case-header h2,
.menu-title,
.drop-card b,
.chance-card b,
.result-card h4 {
  color: #0c2b45;
}

.brand-text small,
.inventory-item small,
.profile-info small,
.drop-chip b,
.filters button {
  color: #4d7288;
}

.login-btn,
.open-btn,
.hero button,
.modal-card button,
.back-btn,
.filters .active {
  background: linear-gradient(135deg, #fff36a, #cfff2e) !important;
  color: #0c2b45 !important;
  box-shadow: 0 12px 26px rgba(255, 213, 80, .22);
}

.login-btn:hover,
.open-btn:hover,
.hero button:hover,
.modal-card button:hover,
.back-btn:hover,
.filters .active:hover {
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.balance-card {
  background: linear-gradient(135deg, rgba(255, 246, 142, .95), rgba(126, 232, 255, .80)) !important;
  border-color: rgba(255, 213, 80, .65) !important;
  box-shadow: 0 14px 34px rgba(31, 146, 178, .14);
}

.balance-card strong {
  color: #0c2b45;
}

.price {
  background: linear-gradient(135deg, #ffffff, #fff6be);
  color: #0c2b45;
  box-shadow: 0 8px 18px rgba(255, 213, 80, .18);
}

.case-tag,
.badge {
  background: linear-gradient(135deg, #ffd43b, #fff15a) !important;
  color: #0c2b45 !important;
  box-shadow: 0 10px 24px rgba(255, 191, 0, .24);
}

.case-card:hover {
  border-color: rgba(255, 213, 80, .75) !important;
  box-shadow: 0 18px 42px rgba(31, 146, 178, .16);
}

.drop-chip {
  background: linear-gradient(135deg, rgba(126,232,255,.85), rgba(255,243,163,.90)) !important;
  border-color: rgba(10, 110, 150, .14) !important;
}

.drop-chip span,
.chance-card .chance {
  color: #0c9ec6;
}

.modal {
  background:
    radial-gradient(circle at 25% 15%, rgba(255, 241, 90, .32), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(126, 232, 255, .34), transparent 32%),
    rgba(225, 250, 255, .72) !important;
}

.modal-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.92), rgba(219,248,255,.94)) !important;
  border-color: rgba(255, 213, 80, .50) !important;
  box-shadow:
    0 28px 90px rgba(31, 146, 178, .22),
    0 0 0 1px rgba(255,255,255,.62) inset !important;
}

.modal-card p {
  color: #315a70;
}

.modal-card input {
  background: rgba(255,255,255,.76) !important;
  color: #0c2b45 !important;
  border-color: rgba(10, 110, 150, .16) !important;
}

.modal-card input:focus {
  border-color: rgba(255, 213, 80, .9) !important;
  box-shadow:
    0 0 0 4px rgba(255, 213, 80, .18),
    0 0 28px rgba(126, 232, 255, .18) !important;
}

.modal-card > .x,
button.x,
.x {
  background: rgba(255, 255, 255, .72) !important;
  color: #0c2b45 !important;
  border-color: rgba(10, 110, 150, .16) !important;
}


/* POPRAWKI: GRADIENTOWE KARTY, SMOOTH PRZEJŚCIA, TOP DROPY DOPIERO PO DROPACH */
html {
  scroll-behavior: smooth;
}

body {
  transition: opacity .18s ease, filter .18s ease;
}

body.page-switching {
  opacity: .55;
  filter: blur(2px);
}

body.page-switched main {
  animation: softPageIn .28s ease both;
}

@keyframes softPageIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.case-card,
.drop-card,
.chance-card,
.result-card {
  background:
    linear-gradient(135deg, rgba(126, 232, 255, .82), rgba(255, 243, 163, .88)) !important;
  border: 1px solid rgba(10, 110, 150, .16) !important;
  box-shadow: 0 16px 36px rgba(31, 146, 178, .12);
}

.case-card {
  transition:
    transform .26s ease,
    border-color .26s ease,
    box-shadow .26s ease,
    filter .26s ease,
    background .26s ease;
}

.case-card img,
.drop-card img,
.chance-card img,
.result-card img {
  transition:
    transform .28s ease,
    filter .28s ease;
}

.case-card:hover {
  transform: translateY(-8px) scale(1.025);
  box-shadow: 0 24px 52px rgba(31, 146, 178, .22);
}

.case-card:hover img,
.drop-card:hover img,
.chance-card:hover img,
.result-card:hover img {
  transform: scale(1.06);
}

.drop-card,
.chance-card,
.result-card {
  transition:
    transform .24s ease,
    box-shadow .24s ease,
    filter .24s ease;
}

.drop-card:hover,
.chance-card:hover,
.result-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 42px rgba(31, 146, 178, .20);
}

.case-disabled {
  cursor: not-allowed !important;
  opacity: .62;
  filter: grayscale(.25);
}

.case-disabled:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(10, 110, 150, .12) !important;
}

.case-disabled:hover img {
  transform: none !important;
}

.case-disabled .price {
  background: linear-gradient(135deg, #e8edf2, #ffffff) !important;
  color: #6b7c88 !important;
}

.empty-top-drops {
  grid-column: 1 / -1;
  background:
    linear-gradient(135deg, rgba(126, 232, 255, .62), rgba(255, 243, 163, .72));
  border: 1px dashed rgba(10, 110, 150, .25);
  color: #0c2b45;
  border-radius: 14px;
  padding: 18px 20px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 14px 30px rgba(31, 146, 178, .10);
}

.real-drop-card {
  border-color: rgba(255, 213, 80, .55) !important;
}

.amount-buttons button,
.open-btn,
.back-btn,
.login-btn {
  transition:
    transform .2s ease,
    box-shadow .2s ease,
    filter .2s ease,
    background .2s ease;
}

.amount-buttons button:hover,
.open-btn:hover,
.back-btn:hover,
.login-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}


/* POPRAWKA: GRADIENTOWE OKNO SZCZEGÓŁÓW SKRZYNKI */
.case-header {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 243, 163, .78), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(126, 232, 255, .72), transparent 38%),
    linear-gradient(135deg, rgba(126, 232, 255, .82) 0%, rgba(212, 250, 255, .86) 42%, rgba(255, 243, 163, .88) 100%) !important;
  border: 1px solid rgba(10, 110, 150, .18) !important;
  box-shadow:
    0 24px 65px rgba(31, 146, 178, .20),
    0 0 0 1px rgba(255, 255, 255, .55) inset !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition:
    transform .28s ease,
    box-shadow .28s ease,
    border-color .28s ease,
    background .28s ease;
}

.case-header:hover {
  transform: translateY(-4px);
  box-shadow:
    0 32px 80px rgba(31, 146, 178, .26),
    0 0 0 1px rgba(255, 255, 255, .65) inset !important;
}

.case-header img {
  filter: drop-shadow(0 18px 28px rgba(31, 146, 178, .22));
  transition:
    transform .30s ease,
    filter .30s ease;
}

.case-header:hover img {
  transform: scale(1.035);
  filter: drop-shadow(0 22px 34px rgba(31, 146, 178, .28));
}

.case-header h2,
.case-header p,
.case-header span {
  color: #0c2b45 !important;
}

.amount-buttons button {
  background: linear-gradient(135deg, rgba(126, 232, 255, .82), rgba(255, 243, 163, .88)) !important;
  color: #0c2b45 !important;
  border: 1px solid rgba(10, 110, 150, .14) !important;
  transition:
    transform .20s ease,
    box-shadow .20s ease,
    filter .20s ease,
    background .20s ease;
}

.amount-buttons button:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 12px 24px rgba(31, 146, 178, .18);
}

.amount-buttons .active {
  background: linear-gradient(135deg, #fff15a, #cfff2e) !important;
  color: #0c2b45 !important;
  box-shadow: 0 12px 26px rgba(255, 213, 80, .22);
}


/* CASE PAGE V2 — SKRZYNKA JAK CASE OPENING, ZAKRES SZANS, INFO, CLAIM/SELL */
.case-view {
  animation: caseViewIn .28s ease both;
}

@keyframes caseViewIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.995);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.case-header {
  display: grid !important;
  grid-template-columns: 360px 1fr !important;
  gap: 34px !important;
  align-items: center !important;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 243, 163, .78), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(126, 232, 255, .72), transparent 38%),
    linear-gradient(135deg, rgba(126, 232, 255, .82) 0%, rgba(212, 250, 255, .86) 42%, rgba(255, 243, 163, .88) 100%) !important;
  border: 1px solid rgba(10, 110, 150, .18) !important;
  box-shadow: 0 24px 65px rgba(31, 146, 178, .20) !important;
  border-radius: 18px !important;
  padding: 28px !important;
}

.case-header img {
  width: 100%;
  max-height: 310px;
  object-fit: contain;
  filter: drop-shadow(0 18px 28px rgba(31, 146, 178, .25));
}

.case-header h2 {
  font-size: 42px;
  color: #0c2b45;
}

.case-extra-actions {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.range-btn {
  background: linear-gradient(135deg, #102033, #1a3550) !important;
  color: #ffffff !important;
  border: 1px solid rgba(126, 232, 255, .35);
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.range-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(16, 32, 51, .24);
  filter: brightness(1.08);
}

.chance-card,
.drop-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(18, 30, 50, .92), rgba(43, 34, 75, .82)) !important;
  color: #ffffff !important;
  border: 1px solid rgba(126, 232, 255, .18) !important;
}

.chance-card b,
.drop-card b {
  color: #ffffff !important;
}

.chance-card span,
.drop-card span {
  color: #9db7ff !important;
}

.chance-card .chance {
  color: #d7ff3f !important;
}

.rarity-normal {
  background: linear-gradient(145deg, rgba(18, 35, 60, .92), rgba(23, 49, 78, .82)) !important;
}

.rarity-rare {
  background: linear-gradient(145deg, rgba(20, 49, 88, .94), rgba(23, 72, 110, .82)) !important;
}

.rarity-epic {
  background: linear-gradient(145deg, rgba(52, 30, 88, .94), rgba(101, 43, 116, .82)) !important;
}

.rarity-legendary {
  background: linear-gradient(145deg, rgba(82, 70, 22, .95), rgba(48, 43, 20, .86)) !important;
  border-color: rgba(255, 213, 80, .45) !important;
}

.info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #172033;
  font-weight: 950;
  cursor: pointer;
  z-index: 4;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.info-btn:hover {
  transform: scale(1.12);
}

.info-btn.active {
  background: #ffffff;
  color: #ff4663;
  transform: rotate(90deg);
}

.item-info {
  position: absolute;
  inset: auto 10px 10px 10px;
  background: rgba(6, 12, 24, .88);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  animation: infoPop .18s ease both;
}

.item-info b {
  color: #ffffff !important;
}

.item-info span {
  color: #d7ff3f !important;
  font-weight: 900;
}

@keyframes infoPop {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chance-modal {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, .76);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: modalFade .22s ease both;
}

.chance-modal-card {
  width: min(980px, 100%);
  max-height: 86vh;
  overflow: hidden;
  background: #111827;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  color: white;
  box-shadow: 0 34px 90px rgba(0,0,0,.45);
  animation: modalPop .24s ease both;
}

.chance-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.chance-modal-head h3 {
  margin: 0;
}

.chance-modal-head button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: rgba(255,255,255,.10);
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.chance-modal-body {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 24px;
  padding: 22px;
  max-height: calc(86vh - 74px);
  overflow: hidden;
}

.chance-case-preview {
  background: rgba(255,255,255,.04);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.chance-case-preview img {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
}

.chance-case-preview b {
  display: block;
  margin-top: 10px;
}

.chance-case-preview span {
  display: inline-block;
  margin-top: 8px;
  background: white;
  color: #111827;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 900;
}

.range-code {
  margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,.22);
  padding-top: 18px;
}

.range-code small {
  color: #9db7ff;
  display: block;
  margin-bottom: 8px;
}

.range-code strong {
  font-size: 20px;
}

.chance-table-wrap {
  overflow: auto;
  padding-right: 8px;
}

.chance-table {
  width: 100%;
  border-collapse: collapse;
}

.chance-table th,
.chance-table td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.chance-table th {
  color: #9db7ff;
  font-size: 12px;
  text-transform: uppercase;
}

.chance-table tr:nth-child(even) {
  background: rgba(255,255,255,.035);
}

.table-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-item img {
  width: 48px;
  height: 38px;
  object-fit: contain;
}

.table-item small {
  display: block;
  color: #00a8ff;
  font-weight: 800;
}

.chance-table td strong {
  color: #d7ff3f;
}

.roll-area {
  align-items: stretch;
}

.open-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 12px;
}

.claim-btn,
.sell-btn {
  border: 0;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.claim-btn {
  background: linear-gradient(135deg, #21c774, #7dffb2);
  color: #052010;
}

.sell-btn {
  background: linear-gradient(135deg, #ff4663, #ff9cab);
  color: #2b050b;
}

.claim-btn:hover,
.sell-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.04);
  box-shadow: 0 16px 32px rgba(0,0,0,.18);
}

@media (max-width: 900px) {
  .case-header {
    grid-template-columns: 1fr !important;
  }

  .chance-modal-body {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .open-actions {
    flex-direction: column;
  }
}


/* POPRAWKA ZAKRESU SZANS: ŁADNY GRADIENTOWY PASEK PRZEWIJANIA */
.chance-table-wrap {
  scroll-behavior: smooth;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 12px;
  scrollbar-width: thin;
  scrollbar-color: #d7ff3f rgba(255, 255, 255, .08);
}

/* Chrome / Edge / Opera */
.chance-table-wrap::-webkit-scrollbar {
  width: 12px;
}

.chance-table-wrap::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(126, 232, 255, .12), rgba(255, 243, 163, .10));
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .06);
}

.chance-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d7ff3f, #7ee8ff);
  border-radius: 999px;
  border: 3px solid #111827;
  box-shadow:
    0 0 18px rgba(216, 255, 63, .28),
    inset 0 0 0 1px rgba(255, 255, 255, .30);
  transition:
    background .22s ease,
    box-shadow .22s ease,
    border .22s ease;
}

.chance-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fff15a, #58dfff);
  box-shadow:
    0 0 26px rgba(126, 232, 255, .34),
    0 0 20px rgba(216, 255, 63, .24),
    inset 0 0 0 1px rgba(255, 255, 255, .45);
}

/* żeby nie było drugiego brzydkiego scrolla na całym oknie modala */
.chance-modal {
  overflow: hidden;
}

.chance-modal-card {
  overflow: hidden;
}

.chance-modal-body {
  overflow: hidden;
}

.chance-table tbody tr {
  transition:
    background .18s ease,
    transform .18s ease;
}

.chance-table tbody tr:hover {
  background: rgba(216, 255, 63, .08);
}



/* FINAL FIX: WIDOCZNY PASEK PRZEWIJANIA W ZAKRESIE SZANS */
.chance-modal-card {
  width: min(1180px, calc(100vw - 48px)) !important;
  max-height: 88vh !important;
  overflow: hidden !important;
}

.chance-modal-body {
  height: calc(88vh - 82px) !important;
  max-height: calc(88vh - 82px) !important;
  overflow: hidden !important;
  display: grid !important;
  grid-template-columns: 330px minmax(0, 1fr) !important;
}

.chance-case-preview {
  height: 100% !important;
  overflow: hidden !important;
}

.chance-table-wrap {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  padding-right: 16px !important;
  scroll-behavior: smooth !important;
  scrollbar-gutter: stable !important;
  scrollbar-width: thin !important;
  scrollbar-color: #d7ff3f rgba(255, 255, 255, .08) !important;
}

/* Chrome / Edge / Opera */
.chance-table-wrap::-webkit-scrollbar {
  width: 14px !important;
}

.chance-table-wrap::-webkit-scrollbar-track {
  background: linear-gradient(180deg, rgba(126, 232, 255, .16), rgba(255, 243, 163, .14)) !important;
  border-radius: 999px !important;
  border: 1px solid rgba(255, 255, 255, .08) !important;
}

.chance-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #d7ff3f, #7ee8ff) !important;
  border-radius: 999px !important;
  border: 3px solid #111827 !important;
  box-shadow:
    0 0 18px rgba(216, 255, 63, .30),
    inset 0 0 0 1px rgba(255, 255, 255, .35) !important;
}

.chance-table-wrap::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #fff15a, #58dfff) !important;
  box-shadow:
    0 0 26px rgba(126, 232, 255, .38),
    0 0 20px rgba(216, 255, 63, .28),
    inset 0 0 0 1px rgba(255, 255, 255, .50) !important;
}

.chance-table {
  min-width: 760px !important;
}

.chance-table tbody tr {
  transition:
    background .18s ease,
    transform .18s ease;
}

.chance-table tbody tr:hover {
  background: rgba(216, 255, 63, .08) !important;
}

@media (max-width: 900px) {
  .chance-modal-card {
    width: calc(100vw - 24px) !important;
    max-height: 90vh !important;
  }

  .chance-modal-body {
    height: calc(90vh - 82px) !important;
    max-height: calc(90vh - 82px) !important;
    grid-template-columns: 1fr !important;
    overflow-y: auto !important;
  }

  .chance-table-wrap {
    height: 520px !important;
    max-height: 520px !important;
  }
}



/* EFEKT RUSZANIA SKRZYNEK */
.case-card {
  transform-style: preserve-3d;
  animation: caseFloat 4.2s ease-in-out infinite;
  will-change: transform;
}

.case-card:nth-child(1) {
  animation-delay: 0s;
}

.case-card:nth-child(2) {
  animation-delay: .25s;
}

.case-card:nth-child(3) {
  animation-delay: .5s;
}

.case-card:nth-child(4) {
  animation-delay: .75s;
}

.case-card:nth-child(5) {
  animation-delay: 1s;
}

.case-card img {
  animation: caseImageFloat 3.4s ease-in-out infinite;
  will-change: transform;
}

.case-card:nth-child(2) img {
  animation-delay: .2s;
}

.case-card:nth-child(3) img {
  animation-delay: .4s;
}

.case-card:nth-child(4) img {
  animation-delay: .6s;
}

.case-card:nth-child(5) img {
  animation-delay: .8s;
}

.case-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(120deg, transparent 0%, rgba(255,255,255,.34) 38%, transparent 62%);
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
}

.case-card:hover::after {
  animation: caseShine .75s ease forwards;
  opacity: 1;
}

.case-card:hover {
  animation-play-state: paused;
  transform: translateY(-10px) scale(1.035) rotateX(3deg) rotateY(-3deg);
}

.case-card:hover img {
  animation-play-state: paused;
  transform: scale(1.10) rotate(-1deg);
}

.case-disabled {
  animation: none !important;
}

.case-disabled img {
  animation: none !important;
}

@keyframes caseFloat {
  0%, 100% {
    transform: translateY(0) rotateZ(0deg);
  }

  25% {
    transform: translateY(-4px) rotateZ(.35deg);
  }

  50% {
    transform: translateY(-7px) rotateZ(0deg);
  }

  75% {
    transform: translateY(-4px) rotateZ(-.35deg);
  }
}

@keyframes caseImageFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-6px) scale(1.035);
  }
}

@keyframes caseShine {
  from {
    transform: translateX(-130%);
  }

  to {
    transform: translateX(130%);
  }
}



/* EFEKT RUSZANIA NA WIDOKU KONKRETNEJ SKRZYNKI */
.case-header {
  animation: openedCaseFloat 5s ease-in-out infinite;
  will-change: transform;
}

.case-header img#caseImage {
  animation: openedCaseImageFloat 3.6s ease-in-out infinite;
  will-change: transform;
}

.case-header h2 {
  animation: openedCaseTitleFloat 4.4s ease-in-out infinite;
  will-change: transform;
}

.open-btn,
.range-btn,
.back-btn {
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    filter .22s ease;
}

.open-btn:hover,
.range-btn:hover,
.back-btn:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.05);
  box-shadow: 0 18px 36px rgba(31, 146, 178, .22);
}

.amount-buttons button {
  transition:
    transform .20s ease,
    box-shadow .20s ease,
    filter .20s ease;
}

.amount-buttons button:hover {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.05);
}

@keyframes openedCaseFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

@keyframes openedCaseImageFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-10px) scale(1.025) rotate(-.4deg);
  }
}

@keyframes openedCaseTitleFloat {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}



/* UI UPDATE: PROFIL MENU, EKWIPUNEK, FREE CASES, EVENT, LEVELS */
.profile-menu {
  width: 450px !important;
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(126,232,255,.66), rgba(255,243,163,.72)) !important;
  border: 1px solid rgba(10,110,150,.18) !important;
  backdrop-filter: blur(18px);
}

.profile-menu-panel {
  display: grid;
  gap: 12px;
}

.profile-tile {
  border: 0;
  border-radius: 16px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.profile-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(31,146,178,.18);
  filter: brightness(1.03);
}

.profile-tile b {
  display: block;
  font-size: 18px;
}

.profile-tile span {
  display: block;
  margin-top: 4px;
  font-weight: 700;
}

.discord-tile {
  background: linear-gradient(135deg, #5865f2, #7ee8ff);
  color: white;
}

.inventory-tile {
  background: linear-gradient(135deg, #e7e7e7, #8b8f96);
  color: #111827;
}

.event-tile {
  background: linear-gradient(135deg, #7ee8ff, #fff15a);
  color: #0c2b45;
}

.custom-page-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  padding: 32px;
  overflow: auto;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: modalFade .22s ease both;
}

.inventory-page-bg {
  background:
    radial-gradient(circle at 12% 15%, rgba(255,255,255,.50), transparent 28%),
    linear-gradient(135deg, rgba(230,230,230,.82), rgba(75,78,84,.68));
}

.event-page-bg {
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 243, 163, .65), transparent 30%),
    radial-gradient(circle at 86% 18%, rgba(126, 232, 255, .75), transparent 34%),
    linear-gradient(135deg, rgba(126,232,255,.84), rgba(255,243,163,.86));
}

.custom-page-card {
  width: min(1050px, 100%);
  margin: 0 auto;
  border-radius: 26px;
  padding: 30px;
  position: relative;
  animation: modalPop .25s ease both;
}

.inventory-page-card {
  background: linear-gradient(135deg, rgba(245,245,245,.88), rgba(95,99,105,.76));
  color: #111827;
  box-shadow: 0 28px 80px rgba(0,0,0,.22);
}

.event-page-card {
  background: linear-gradient(135deg, rgba(126,232,255,.86), rgba(255,243,163,.90));
  color: #0c2b45;
  box-shadow: 0 28px 80px rgba(31,146,178,.24);
}

.custom-close {
  position: absolute;
  right: 22px;
  top: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.42);
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
}

.level-box {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  background: rgba(255,255,255,.55);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 22px;
}

.level-icon {
  font-size: 42px;
  background: rgba(255,255,255,.56);
  border-radius: 18px;
  display: grid;
  place-items: center;
  height: 70px;
}

.level-box b,
.level-box span {
  display: block;
}

.level-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(0,0,0,.12);
  margin-top: 8px;
}

.level-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ee8ff, #fff15a);
}

.inventory-page-grid,
.free-grid,
.level-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.inventory-page-item,
.free-grid button,
.level-cases-grid button,
.big-empty {
  border: 1px solid rgba(255,255,255,.30);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,.48);
  color: #111827;
  box-shadow: 0 14px 30px rgba(0,0,0,.10);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.free-grid button,
.level-cases-grid button {
  cursor: pointer;
  text-align: left;
}

.free-grid button:hover,
.level-cases-grid button:hover,
.inventory-page-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(0,0,0,.14);
  filter: brightness(1.03);
}

.inventory-page-item img {
  width: 100%;
  height: 105px;
  object-fit: contain;
}

.inventory-page-item b,
.inventory-page-item span,
.free-grid b,
.free-grid span,
.level-cases-grid b,
.level-cases-grid span {
  display: block;
}

.locked {
  opacity: .55;
  filter: grayscale(.5);
}

.event-list {
  font-size: 20px;
  line-height: 1.65;
  font-weight: 800;
  margin: 20px 0;
}

.event-discord-btn {
  background: linear-gradient(135deg, #5865f2, #7ee8ff);
  color: white;
  border: 0;
  border-radius: 16px;
  padding: 16px 22px;
  font-weight: 950;
  cursor: pointer;
}

.bunny-info {
  margin-top: 18px;
  background: rgba(255,255,255,.44);
  border-radius: 16px;
  padding: 16px;
  font-weight: 800;
}

.basket-cursor {
  cursor: grab;
}

.walking-bunny {
  position: fixed;
  left: -80px;
  z-index: 120;
  border: 0;
  background: transparent;
  font-size: 46px;
  cursor: grab;
  animation: bunnyWalk linear forwards;
  filter: drop-shadow(0 10px 14px rgba(0,0,0,.25));
}

@keyframes bunnyWalk {
  from {
    transform: translateX(-80px) translateY(0);
  }

  50% {
    transform: translateX(50vw) translateY(-20px);
  }

  to {
    transform: translateX(calc(100vw + 120px)) translateY(0);
  }
}

.result-popup {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.42);
  backdrop-filter: blur(10px);
}

.result-popup-card {
  width: min(620px, calc(100vw - 30px));
  background: linear-gradient(135deg, rgba(126,232,255,.95), rgba(255,243,163,.95));
  border-radius: 24px;
  padding: 24px;
  color: #0c2b45;
  position: relative;
}

.result-popup-card > button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  font-size: 24px;
}

.popup-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px,1fr));
  gap: 12px;
}

.popup-results div {
  background: rgba(255,255,255,.54);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
}

.popup-results img {
  width: 100%;
  height: 110px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .profile-menu {
    width: 320px !important;
  }

  .custom-page-overlay {
    padding: 14px;
  }

  .inventory-page-grid,
  .free-grid,
  .level-cases-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}



/* FIX INVENTORY IMAGES + PRICE BUTTONS */
.level-icon-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.free-grid button img,
.level-cases-grid button img {
  width: 100%;
  height: 95px;
  object-fit: contain;
  margin-bottom: 10px;
  filter: drop-shadow(0 10px 16px rgba(0,0,0,.16));
  transition: transform .22s ease;
}

.free-grid button:hover img,
.level-cases-grid button:hover img {
  transform: translateY(-4px) scale(1.06);
}

.open-btn {
  min-width: 190px;
}

.casePriceStrong {
  font-weight: 900;
}



/* FIX: TOP BAR GRADIENT + ONLY FILTERS + TOASTY + INVENTORY BUTTONS + CS2 ROULETTE */
.top-drops {
  background:
    linear-gradient(90deg, rgba(126, 232, 255, .72), rgba(255, 243, 163, .74), rgba(126, 232, 255, .62)) !important;
  border-bottom: 1px solid rgba(10, 110, 150, .14) !important;
  box-shadow: 0 12px 34px rgba(31, 146, 178, .12);
  overflow: visible !important;
  position: relative;
  z-index: 30;
}

.empty-top-text {
  color: #0c2b45;
  font-weight: 800;
}

.rich-drop-chip {
  position: relative;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.rich-drop-chip:hover {
  transform: translateY(3px) scale(1.04);
  box-shadow: 0 14px 28px rgba(31, 146, 178, .22);
}

.drop-hover-card {
  position: absolute;
  left: 0;
  top: 54px;
  min-width: 270px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(126,232,255,.88), rgba(255,243,163,.88));
  border: 1px solid rgba(10,110,150,.16);
  border-radius: 18px;
  padding: 12px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px) scale(.96);
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 22px 48px rgba(0,0,0,.18);
  z-index: 80;
}

.rich-drop-chip:hover .drop-hover-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.drop-hover-avatar {
  width: 52px !important;
  height: 52px !important;
  border-radius: 50%;
  object-fit: cover;
}

.drop-hover-card strong,
.drop-hover-card b,
.drop-hover-card span,
.drop-hover-card small {
  display: block;
  color: #0c2b45;
}

.drop-hover-card span {
  color: #0c9ec6;
  font-weight: 950;
}

.toast-wrap {
  position: fixed;
  right: 22px;
  top: 90px;
  display: grid;
  gap: 10px;
  z-index: 999;
}

.site-toast {
  min-width: 300px;
  max-width: 430px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(126,232,255,.96), rgba(255,243,163,.96));
  color: #0c2b45;
  box-shadow: 0 18px 42px rgba(0,0,0,.18);
  opacity: 0;
  transform: translateX(20px) scale(.96);
  transition: opacity .2s ease, transform .2s ease;
}

.site-toast.error {
  background: linear-gradient(135deg, #ff9cab, #fff3a3);
}

.site-toast.show {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.inventory-page-item {
  display: grid;
  gap: 8px;
}

.inventory-sell-btn,
.inventory-redeem-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 950;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.inventory-sell-btn {
  background: linear-gradient(135deg, #ff4663, #ff9cab);
  color: #2b050b;
}

.inventory-redeem-btn {
  background: linear-gradient(135deg, #21c774, #7dffb2);
  color: #052010;
}

.inventory-sell-btn:hover,
.inventory-redeem-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px rgba(0,0,0,.16);
}

.roulette-wrap {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, #0f172a, #111827);
  border: 1px solid rgba(126, 232, 255, .20);
  padding: 18px 0;
  min-height: 190px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.roulette-pointer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #d7ff3f, transparent);
  z-index: 2;
  box-shadow: 0 0 18px rgba(216,255,63,.8);
}

.roulette-strip {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: rouletteSpin 3.8s cubic-bezier(.08,.74,.14,1) forwards;
}

.roulette-item {
  width: 150px;
  height: 150px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
}

.roulette-item img {
  width: 95px;
  height: 90px;
  object-fit: contain;
}

.roulette-item b {
  color: white;
  font-size: 12px;
}

@keyframes rouletteSpin {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-4200px);
  }
}

.filters {
  width: fit-content;
  min-width: 360px;
}

.filters button {
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.filters button:hover {
  transform: translateY(-2px);
}



/* FIX: MULTI ROULETTE BEZ SPOILERA + JEDEN NAJLEPSZY DROP */
.multi-roulette-grid {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  width: 100%;
}

.multi-roulette-grid.count-1 {
  grid-template-columns: 1fr;
}

.multi-roulette-grid.count-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.multi-roulette-grid.count-3,
.multi-roulette-grid.count-4,
.multi-roulette-grid.count-5 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.roulette-box {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, #0f172a, #111827);
  border: 1px solid rgba(126, 232, 255, .22);
  padding: 42px 0 18px;
  min-height: 190px;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.roulette-title {
  position: absolute;
  left: 14px;
  top: 10px;
  color: #d7ff3f;
  font-weight: 950;
  z-index: 3;
}

.roulette-box .roulette-pointer {
  position: absolute;
  top: 36px;
  bottom: 0;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, #d7ff3f, transparent);
  z-index: 2;
  box-shadow: 0 0 18px rgba(216,255,63,.8);
}

.roulette-box .roulette-strip {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: multiRouletteSpin 4.2s cubic-bezier(.08,.74,.14,1) forwards;
  animation-delay: var(--delay, 0ms);
}

.roulette-box .roulette-item {
  width: 132px;
  height: 126px;
  flex: 0 0 auto;
  border-radius: 14px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 10px;
  border: 1px solid rgba(255,255,255,.08);
}

.roulette-box .roulette-item img {
  width: 84px;
  height: 76px;
  object-fit: contain;
}

.roulette-box .roulette-item b {
  color: rgba(255,255,255,.65);
  font-size: 12px;
}

@keyframes multiRouletteSpin {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-2520px);
  }
}

@media (max-width: 900px) {
  .multi-roulette-grid.count-2,
  .multi-roulette-grid.count-3,
  .multi-roulette-grid.count-4,
  .multi-roulette-grid.count-5 {
    grid-template-columns: 1fr;
  }
}



/* UPDATE: NAV RAMKI, TOPKA LEVELI, HOME STATS, SMOOTH MENU, INTRO */
.nav-links {
  gap: 34px !important;
}

.nav-links a {
  padding: 12px 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(126,232,255,.58), rgba(255,243,163,.68));
  border: 1px solid rgba(10,110,150,.14);
  box-shadow: 0 12px 26px rgba(31,146,178,.10);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
}

.nav-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(31,146,178,.18);
  filter: brightness(1.04);
}

.profile-menu {
  display: block !important;
  opacity: 1;
  transform: translateY(0) scale(1);
  max-height: 620px;
  overflow: hidden auto;
  transition:
    opacity .22s ease,
    transform .22s ease,
    max-height .28s ease;
}

.profile-menu.hidden {
  display: block !important;
  opacity: 0;
  transform: translateY(-12px) scale(.96);
  max-height: 0;
  pointer-events: none;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border-width: 0 !important;
}

.top-levels-page-bg {
  background:
    radial-gradient(circle at 14% 18%, rgba(126,232,255,.70), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(255,243,163,.72), transparent 34%),
    linear-gradient(135deg, rgba(126,232,255,.82), rgba(255,243,163,.86));
}

.top-levels-page-card {
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(126,232,255,.74), rgba(255,243,163,.80));
  color: #0c2b45;
  box-shadow: 0 32px 90px rgba(31,146,178,.24);
}

.top-page-subtitle {
  font-weight: 800;
  color: #426378;
}

.top-levels-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.top-level-row {
  display: grid;
  grid-template-columns: 64px 56px 52px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(10,110,150,.14);
  box-shadow: 0 14px 30px rgba(31,146,178,.10);
  transition: transform .22s ease, box-shadow .22s ease;
}

.top-level-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(31,146,178,.16);
}

.rank-place {
  font-size: 22px;
  font-weight: 950;
  color: #0c9ec6;
}

.rank-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.rank-level-icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.top-level-row b,
.top-level-row span {
  display: block;
}

.top-level-row span {
  color: #4d7288;
  font-weight: 800;
}

.rank-1 {
  background: linear-gradient(135deg, rgba(255,215,80,.82), rgba(255,255,255,.62));
}

.rank-2 {
  background: linear-gradient(135deg, rgba(210,220,230,.88), rgba(255,255,255,.62));
}

.rank-3 {
  background: linear-gradient(135deg, rgba(205,140,70,.72), rgba(255,255,255,.62));
}

.home-stats-section {
  margin-top: 38px;
  padding-bottom: 50px;
}

.home-stats-section h2 {
  margin: 28px 0 14px;
  color: #0c2b45;
  font-size: 28px;
}

.home-stats-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 4px 18px;
  scroll-behavior: smooth;
}

.home-stat-card {
  min-width: 230px;
  border-radius: 18px;
  padding: 12px;
  background: linear-gradient(135deg, rgba(126,232,255,.76), rgba(255,243,163,.82));
  border: 1px solid rgba(10,110,150,.14);
  box-shadow: 0 16px 34px rgba(31,146,178,.12);
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
  transition: transform .22s ease, box-shadow .22s ease;
}

.home-stat-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 24px 48px rgba(31,146,178,.20);
}

.stat-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
}

.stat-item {
  width: 42px;
  height: 42px;
  object-fit: contain;
  grid-column: 1;
  justify-self: end;
  margin-top: -18px;
}

.home-stat-card b,
.home-stat-card span,
.home-stat-card strong {
  display: block;
}

.home-stat-card span {
  color: #4d7288;
  font-weight: 800;
}

.home-stat-card strong {
  color: #0c9ec6;
  font-weight: 950;
}

.payout-card {
  grid-template-columns: 52px 42px 1fr;
  min-width: 310px;
}

.payout-card .stat-item {
  grid-column: 2;
  margin: 0;
}




/* FIX: OVERWRITETYPE, PANEL PROFILU, ROULETTE MYSTERY, FILTRY */
.filters button:nth-child(n+3) {
  display: none !important;
}

.profile-wrap {
  position: relative;
}

.profile-button {
  position: relative;
  z-index: 35;
}

.profile-button .profile-arrow,
.profile-arrow {
  transition: transform .24s ease;
}

.profile-button.open .profile-arrow,
.profile-button.open .profile-arrow {
  transform: rotate(180deg);
}

.profile-menu {
  transform-origin: top right;
  border-top-right-radius: 0 !important;
  box-shadow:
    0 22px 70px rgba(0,0,0,.18),
    0 0 0 1px rgba(255,255,255,.25) inset !important;
}

.profile-menu::before {
  content: "";
  position: absolute;
  right: 28px;
  top: -10px;
  width: 22px;
  height: 22px;
  background: inherit;
  transform: rotate(45deg);
  border-left: 1px solid rgba(10,110,150,.14);
  border-top: 1px solid rgba(10,110,150,.14);
}

.profile-tile {
  animation: profileTileIn .28s ease both;
}

.profile-tile:nth-child(2) {
  animation-delay: .04s;
}

.profile-tile:nth-child(3) {
  animation-delay: .08s;
}

@keyframes profileTileIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.roulette-item.mystery-item img {
  filter:
    drop-shadow(0 10px 18px rgba(126,232,255,.22))
    saturate(.8)
    brightness(.95);
  opacity: .78;
}

.roulette-item.mystery-item b {
  color: #d7ff3f !important;
  letter-spacing: 1px;
}

.result-reveal {
  animation: resultReveal .34s ease both;
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: translateY(10px) scale(.94);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.home-stats-row {
  min-height: 92px;
}

.home-stat-card {
  animation: statCardIn .28s ease both;
}

@keyframes statCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
