:root {
  --bg0: #120807;
  --bg1: #1c0e0b;
  --card: rgba(20, 10, 8, 0.72);
  --cardBorder: rgba(255, 231, 214, 0.10);
  --text: rgba(255, 244, 236, 0.92);
  --muted: rgba(255, 244, 236, 0.70);
  --accent: #ffcf8a;
  --accent2: #b97cff;
  --shadow: rgba(0, 0, 0, 0.35);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: radial-gradient(1200px 800px at 20% 10%, #2a120e 0%, var(--bg0) 60%),
    radial-gradient(900px 700px at 80% 0%, #1b0f2b 0%, transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg0));
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.95;
  background:
    radial-gradient(600px 500px at 15% 15%, rgba(255, 207, 138, 0.18), transparent 55%),
    radial-gradient(650px 520px at 85% 20%, rgba(185, 124, 255, 0.16), transparent 60%),
    radial-gradient(700px 600px at 50% 90%, rgba(255, 132, 179, 0.10), transparent 60%);
  filter: blur(0px);
}

.shell {
  position: relative;
  max-width: 1050px;
  margin: 0 auto;
  padding: 22px 16px 50px;
}

#authView {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}

#authView .card {
  width: min(980px, 100%);
  padding: 38px;
}

#authView .card-title {
  font-size: 28px;
}

#authView .card-note {
  font-size: 16px;
}

#authView .field-label {
  font-size: 14px;
}

#authView .input {
  padding: 16px 18px;
  font-size: 16px;
  border-radius: 16px;
}

#authView .btn {
  padding: 14px 18px;
  font-size: 16px;
  border-radius: 16px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

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

.header-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 231, 214, 0.16);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: 0 14px 32px var(--shadow);
  background-size: cover;
  background-position: center;
  cursor: pointer;
  position: relative;
}

.header-avatar:hover {
  filter: brightness(1.08);
}

.header-avatar.avatar-mystical {
  background-image: var(--avatar-base);
}

.header-avatar.avatar-mystical::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--avatar-shush);
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: mystical-shush 3000ms ease-in-out infinite;
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 207, 138, 0.95), rgba(185, 124, 255, 0.9));
  box-shadow: 0 14px 32px var(--shadow);
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.2px;
  font-size: 18px;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.appnav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: -6px 0 14px;
}

.navbtn {
  border: 1px solid rgba(255, 231, 214, 0.12);
  background: rgba(10, 5, 4, 0.55);
  color: rgba(255, 231, 214, 0.92);
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.navbtn.has-unread {
  position: relative;
}

.navbtn.has-unread::after {
  content: "!";
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 1000;
  border: 1px solid rgba(255, 220, 0, 0.35);
  background: rgba(255, 60, 120, 0.92);
  color: rgba(255, 245, 220, 0.98);
  box-shadow:
    0 0 12px rgba(255, 60, 120, 0.25),
    0 0 16px rgba(255, 220, 0, 0.12);
}

.navbtn.active {
  border-color: rgba(255, 207, 138, 0.40);
  box-shadow: 0 0 0 4px rgba(255, 207, 138, 0.12);
  background: rgba(0, 0, 0, 0.35);
}

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 900px) {
  .card-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--cardBorder);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 18px 50px var(--shadow);
  backdrop-filter: blur(10px);
}

.pages {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.placeholder {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 244, 236, 0.78);
  font-size: 12px;
}

.chat {
  display: grid;
  gap: 10px;
}

.chat-list {
  height: min(380px, 48vh);
  overflow: auto;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.20);
}

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

.chat-form .input {
  flex: 1;
}

.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  line-height: 1.25;
  margin-bottom: 8px;
}

.chat-avatar {
  appearance: none;
  padding: 0;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background: rgba(0, 0, 0, 0.40);
  background-size: cover;
  background-position: center;
  flex: 0 0 auto;
  cursor: pointer;
}

.title-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.8px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background: rgba(0, 0, 0, 0.30);
  color: rgba(255, 231, 214, 0.95);
}

.creator-name {
  color: rgba(220, 245, 255, 0.98);
  text-shadow:
    0 0 10px rgba(80, 180, 255, 0.22),
    -1px 0 0 rgba(0, 255, 255, 0.18),
    1px 0 0 rgba(255, 0, 255, 0.24),
    0 0 18px rgba(255, 60, 120, 0.10),
    0 0 18px rgba(255, 220, 0, 0.06);
  animation: creatorGlitch 5.5s steps(1, end) infinite;
}

.chat-user.creator {
  color: rgba(220, 245, 255, 0.98);
  text-shadow:
    0 0 10px rgba(80, 180, 255, 0.22),
    -1px 0 0 rgba(0, 255, 255, 0.18),
    1px 0 0 rgba(255, 0, 255, 0.24),
    0 0 18px rgba(255, 60, 120, 0.10),
    0 0 18px rgba(255, 220, 0, 0.06);
  animation: creatorGlitch 5.5s steps(1, end) infinite;
}

.creator-name .title-badge,
.chat-user.creator .title-badge {
  border-color: rgba(255, 0, 255, 0.18);
  box-shadow:
    0 0 14px rgba(80, 180, 255, 0.14),
    0 0 20px rgba(255, 0, 255, 0.14),
    0 0 18px rgba(255, 220, 0, 0.08);
  animation: creatorGlitchBadge 5.5s steps(1, end) infinite;
}

@keyframes creatorGlitch {
  0%, 10% {
    text-shadow:
      0 0 10px rgba(80, 180, 255, 0.30),
      -1px 0 0 rgba(0, 255, 255, 0.22),
      1px 0 0 rgba(180, 70, 255, 0.22),
      0 0 18px rgba(255, 60, 120, 0.08);
  }
  11%, 12% {
    text-shadow:
      0 0 18px rgba(80, 180, 255, 0.44),
      -3px 0 0 rgba(255, 220, 0, 0.34),
      3px 0 0 rgba(255, 0, 255, 0.32),
      0 0 26px rgba(255, 60, 120, 0.22);
  }
  13%, 18% {
    text-shadow:
      0 0 12px rgba(80, 180, 255, 0.26),
      -2px 0 0 rgba(255, 0, 255, 0.26),
      2px 0 0 rgba(180, 70, 255, 0.26),
      0 0 22px rgba(255, 220, 0, 0.12);
  }
  13%, 45% {
    text-shadow:
      0 0 10px rgba(80, 180, 255, 0.30),
      -1px 0 0 rgba(0, 255, 255, 0.22),
      1px 0 0 rgba(180, 70, 255, 0.22),
      0 0 18px rgba(255, 60, 120, 0.08);
  }
  46%, 48% {
    text-shadow:
      0 0 22px rgba(80, 180, 255, 0.50),
      -4px 0 0 rgba(255, 60, 120, 0.26),
      4px 0 0 rgba(255, 220, 0, 0.18),
      0 0 28px rgba(180, 70, 255, 0.22);
  }
  48%, 100% {
    text-shadow:
      0 0 10px rgba(80, 180, 255, 0.30),
      -1px 0 0 rgba(0, 255, 255, 0.22),
      1px 0 0 rgba(180, 70, 255, 0.22),
      0 0 18px rgba(255, 60, 120, 0.08);
  }
}

@keyframes creatorGlitchBadge {
  0%, 10% {
    box-shadow:
      0 0 14px rgba(80, 180, 255, 0.20),
      0 0 18px rgba(255, 0, 255, 0.10);
    filter: saturate(1.1);
  }
  11%, 12% {
    box-shadow:
      0 0 18px rgba(80, 180, 255, 0.28),
      0 0 26px rgba(255, 220, 0, 0.16),
      0 0 22px rgba(255, 60, 120, 0.14);
    filter: saturate(1.4);
  }
  13%, 18% {
    box-shadow:
      0 0 16px rgba(80, 180, 255, 0.22),
      0 0 28px rgba(255, 0, 255, 0.18),
      0 0 24px rgba(255, 220, 0, 0.14);
    filter: saturate(1.6);
  }
  13%, 45% {
    box-shadow:
      0 0 14px rgba(80, 180, 255, 0.20),
      0 0 18px rgba(255, 0, 255, 0.10);
    filter: saturate(1.1);
  }
  46%, 47% {
    box-shadow:
      0 0 22px rgba(80, 180, 255, 0.30),
      0 0 24px rgba(255, 90, 40, 0.14),
      0 0 26px rgba(180, 70, 255, 0.16);
    filter: saturate(1.5);
  }
  48%, 50% {
    box-shadow:
      0 0 26px rgba(80, 180, 255, 0.26),
      0 0 30px rgba(255, 60, 120, 0.18),
      0 0 26px rgba(255, 220, 0, 0.16);
    filter: saturate(1.7);
  }
  48%, 100% {
    box-shadow:
      0 0 14px rgba(80, 180, 255, 0.20),
      0 0 18px rgba(255, 0, 255, 0.10);
    filter: saturate(1.1);
  }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.toast-area {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 3000;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
}

.toast {
  border: 1px solid rgba(255, 231, 214, 0.14);
  background: rgba(0, 0, 0, 0.60);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 12px;
}

.toast-title {
  font-weight: 900;
  margin-bottom: 4px;
}

.toast-text {
  color: rgba(255, 231, 214, 0.80);
  margin-bottom: 10px;
  line-height: 1.3;
}

.modal-card {
  position: relative;
  width: min(520px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 231, 214, 0.12);
  background: rgba(10, 5, 4, 0.92);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 14px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.modal-title {
  font-weight: 900;
}

.modal-body {
  display: grid;
  gap: 10px;
}

.player-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 12px;
  align-items: center;
}

.player-avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background: rgba(0, 0, 0, 0.40);
  background-size: cover;
  background-position: center;
}

.player-meta {
  display: grid;
  gap: 4px;
}

.player-name {
  font-weight: 900;
}

.player-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.player-stat {
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.22);
}

.player-stat .label {
  font-size: 11px;
  color: rgba(255, 244, 236, 0.70);
}

.player-stat .value {
  font-weight: 900;
}

.chat-main {
  display: grid;
  gap: 2px;
}

.chat-user {
  font-weight: 900;
  color: rgba(255, 207, 138, 0.92);
  white-space: nowrap;
}

.chat-user.admin {
  background: linear-gradient(
    90deg,
    rgba(255, 207, 138, 0.95),
    rgba(185, 124, 255, 0.95),
    rgba(255, 132, 179, 0.90),
    rgba(140, 245, 255, 0.92),
    rgba(255, 207, 138, 0.95)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bazaar-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.bazaar-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.22);
}

.bazaar-meta {
  display: grid;
  gap: 2px;
}

.bazaar-title {
  font-weight: 900;
}

.bazaar-sub {
  font-size: 12px;
  color: rgba(255, 244, 236, 0.72);
}

.blook-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.chat-text {
  color: rgba(255, 244, 236, 0.86);
  word-break: break-word;
}

.packs {
  display: grid;
  gap: 12px;
}

.packs-list {
  display: grid;
  gap: 12px;
}

.pack-card {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.pack-art {
  width: 112px;
  height: 112px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background-color: rgba(0, 0, 0, 0.55);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.pack-body {
  display: grid;
  gap: 6px;
}

.pack-name {
  font-weight: 900;
  font-size: 14px;
}

.pack-desc {
  font-size: 12px;
  color: rgba(255, 244, 236, 0.75);
}

.hint {
  font-size: 12px;
  color: rgba(255, 244, 236, 0.72);
}

.hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 11px;
  color: rgba(255, 244, 236, 0.86);
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.card-title.small {
  font-size: 14px;
}

.card-note {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.form {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  color: var(--muted);
}

.input {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background: rgba(0, 0, 0, 0.28);
  color: rgba(255, 244, 236, 0.9);
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}

select.input {
  appearance: none;
}

.input:focus {
  border-color: rgba(255, 207, 138, 0.40);
  box-shadow: 0 0 0 4px rgba(255, 207, 138, 0.12);
}

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid rgba(255, 231, 214, 0.18);
  background: linear-gradient(135deg, rgba(255, 207, 138, 0.95), rgba(255, 168, 87, 0.85));
  color: rgba(18, 8, 7, 0.92);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}

.btn-xs {
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn:active {
  transform: translateY(1px);
}

.btn-secondary {
  background: linear-gradient(135deg, rgba(185, 124, 255, 0.95), rgba(255, 132, 179, 0.80));
  color: rgba(18, 8, 7, 0.92);
}

.btn-ghost {
  background: rgba(0, 0, 0, 0.30);
  color: var(--text);
}

.msg {
  margin: 0;
  min-height: 18px;
  font-size: 12px;
  color: rgba(255, 244, 236, 0.85);
}

.rainbow-name {
  background: linear-gradient(
    90deg,
    rgba(255, 207, 138, 0.95),
    rgba(185, 124, 255, 0.95),
    rgba(255, 132, 179, 0.90),
    rgba(140, 245, 255, 0.92),
    rgba(255, 207, 138, 0.95)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.wheel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 10px;
}

.setup {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.setup summary {
  cursor: pointer;
}

.setup-list {
  margin: 10px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.setup code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
    monospace;
  font-size: 11px;
}

.account {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 14px;
  align-items: center;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255, 231, 214, 0.16);
  box-shadow: 0 16px 40px var(--shadow);
  cursor: pointer;
  position: relative;
}

.avatar:hover {
  filter: brightness(1.08);
}

.avatar.avatar-mystical {
  background-image: var(--avatar-base);
  background-size: cover;
  background-position: center;
}

.avatar.avatar-mystical::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--avatar-shush);
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: mystical-shush 3000ms ease-in-out infinite;
}

.account-meta {
  display: grid;
  gap: 12px;
}

.account-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.label {
  font-size: 11px;
  color: var(--muted);
}

.value {
  font-size: 15px;
  font-weight: 900;
  margin-top: 2px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stat {
  border-radius: 14px;
  padding: 10px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.divider {
  height: 1px;
  background: rgba(255, 231, 214, 0.10);
  margin: 14px 0;
}

.blooks {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 244, 236, 0.86);
}

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

.blooks-grid-small {
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.blooks-pack {
  display: grid;
  gap: 10px;
}

.blooks-pack-title {
  font-weight: 900;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.20);
}

.blook-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.blook-locked-label {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 3;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 244, 236, 0.22);
  background: rgba(0, 0, 0, 0.55);
  color: rgba(255, 244, 236, 0.92);
  font-weight: 900;
  font-size: 11px;
  letter-spacing: 0.3px;
}

.prob-block {
  margin-top: 10px;
}

.prob-title {
  font-weight: 900;
  font-size: 12px;
  color: rgba(255, 244, 236, 0.88);
  margin-bottom: 8px;
}

.prob-list {
  display: grid;
  gap: 8px;
}

.prob-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
}

.prob-sub {
  color: rgba(255, 244, 236, 0.62);
  font-size: 11px;
  font-weight: 700;
}

.admin-packs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.admin-pack {
  text-align: left;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.22);
  color: rgba(255, 244, 236, 0.88);
  cursor: pointer;
}

.admin-pack:hover {
  filter: brightness(1.05);
}

.admin-pack.active {
  border-color: rgba(255, 207, 138, 0.40);
  box-shadow: 0 0 0 4px rgba(255, 207, 138, 0.12);
}

.admin-pack-art {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background-size: cover;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.55);
  margin-bottom: 8px;
}

.admin-pack-name {
  font-weight: 900;
  font-size: 12px;
}

.blook-card-small {
  padding: 10px;
  border-radius: 14px;
}

.blook-art {
  aspect-ratio: 1 / 1;
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background-color: rgba(0, 0, 0, 0.55);
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.blook-art-small {
  border-radius: 12px;
}

.blook-locked .blook-art {
  filter: brightness(0) saturate(100%) contrast(140%);
  opacity: 0.92;
}

.blook-locked .blook-rarity,
.blook-locked .blook-qty {
  opacity: 0.85;
}

.blook-meta {
  display: grid;
  gap: 6px;
}

.blook-name {
  font-weight: 900;
  font-size: 13px;
}

.blook-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.blook-rarity {
  border: 1px solid rgba(255, 231, 214, 0.14);
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.blook-qty {
  font-weight: 900;
  font-size: 11px;
  color: rgba(255, 244, 236, 0.78);
}

.rarity-uncommon {
  background: rgba(98, 220, 140, 0.14);
  border-color: rgba(98, 220, 140, 0.30);
}

.rarity-rare {
  background: rgba(123, 174, 255, 0.14);
  border-color: rgba(123, 174, 255, 0.30);
}

.rarity-epic {
  background: rgba(255, 111, 111, 0.14);
  border-color: rgba(255, 111, 111, 0.32);
}

.rarity-legendary {
  background: rgba(255, 214, 102, 0.14);
  border-color: rgba(255, 214, 102, 0.34);
}

.rarity-supreme {
  background: rgba(226, 151, 255, 0.14);
  border-color: rgba(226, 151, 255, 0.34);
}

.rarity-chroma {
  background: rgba(141, 235, 255, 0.14);
  border-color: rgba(141, 235, 255, 0.34);
}

.rarity-mystical {
  background: linear-gradient(
    90deg,
    rgba(255, 90, 90, 0.16),
    rgba(255, 170, 90, 0.16),
    rgba(255, 235, 110, 0.16),
    rgba(120, 255, 165, 0.16),
    rgba(120, 245, 255, 0.16),
    rgba(120, 165, 255, 0.16),
    rgba(200, 140, 255, 0.16)
  );
  border-color: rgba(255, 244, 236, 0.34);
}

.packopen-stage {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 16px;
  gap: 14px;
}

.packopen-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(18px) brightness(0.65);
  transform: scale(1.12);
  opacity: 0.95;
}

.packopen-pack {
  position: relative;
  z-index: 1;
  width: min(280px, 92%);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid rgba(255, 231, 214, 0.16);
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.packopen-pack:hover {
  filter: brightness(1.03);
}

.packopen-pack:active {
  transform: translateY(1px);
}

.packopen-pack-art {
  width: 84%;
  height: 84%;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background-size: cover;
  background-position: center;
  background-color: rgba(0, 0, 0, 0.55);
}

.packopen-pack-hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-weight: 900;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 231, 214, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: rgba(255, 244, 236, 0.88);
}

.packopen-result {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.reveal {
  animation: reveal-pop 520ms cubic-bezier(0.2, 0.85, 0.18, 1) both;
}

@keyframes reveal-pop {
  0% {
    transform: scale(0.7);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.explode {
  position: relative;
}

.explode::before {
  content: "";
  position: absolute;
  inset: -40px;
  border-radius: 28px;
  opacity: 0;
  transform: scale(0.7);
  animation: explode-ring 520ms ease-out both;
}

.explode-uncommon::before {
  background: radial-gradient(circle at 50% 50%, rgba(98, 220, 140, 0.70), transparent 64%);
}

.explode-rare::before {
  background: radial-gradient(circle at 50% 50%, rgba(123, 174, 255, 0.70), transparent 64%);
}

.explode-epic::before {
  background: radial-gradient(circle at 50% 50%, rgba(255, 111, 111, 0.78), transparent 65%);
}

.explode-legendary::before {
  background: radial-gradient(circle at 50% 50%, rgba(255, 214, 102, 0.86), transparent 66%);
}

.explode-supreme::before {
  background: radial-gradient(circle at 50% 50%, rgba(226, 151, 255, 0.85), transparent 66%);
}

.explode-chroma::before {
  background: radial-gradient(circle at 50% 50%, rgba(141, 235, 255, 0.80), transparent 65%);
}

.explode-mystical::before {
  background: conic-gradient(
    from 90deg,
    rgba(255, 90, 90, 0.85),
    rgba(255, 175, 90, 0.85),
    rgba(255, 235, 110, 0.85),
    rgba(120, 255, 165, 0.85),
    rgba(120, 245, 255, 0.85),
    rgba(120, 165, 255, 0.85),
    rgba(200, 140, 255, 0.85),
    rgba(255, 90, 90, 0.85)
  );
  filter: blur(4px) saturate(1.25);
}

.blook-anim {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
}

.chroma-fall {
  animation: chroma-drop 700ms cubic-bezier(0.18, 0.9, 0.18, 1) both;
  animation-delay: 200ms;
}

.epic-spin {
  animation: epic-spin 450ms ease-in-out both;
  animation-delay: 520ms;
}

.supreme-fireworks {
  overflow: visible;
}

.fireworks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.firework {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 14px;
  height: 14px;
  border-radius: 999px;
  transform: translate(-50%, -50%) scale(0.2);
  opacity: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 244, 236, 0.95), transparent 60%);
  filter: drop-shadow(0 0 16px rgba(226, 151, 255, 0.65));
  animation: firework-burst 520ms ease-out both;
  animation-delay: var(--d);
}

@keyframes firework-burst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  20% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(calc(4 * var(--s)));
  }
}

.supreme-flip {
  transform-style: preserve-3d;
  animation: supreme-flip 400ms cubic-bezier(0.2, 0.9, 0.2, 1) both;
  animation-delay: 600ms;
}

.mystical-rainbow {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  transform: scale(0.82);
  background: conic-gradient(
    from 90deg,
    rgba(255, 90, 90, 0.55),
    rgba(255, 175, 90, 0.55),
    rgba(255, 235, 110, 0.55),
    rgba(120, 255, 165, 0.55),
    rgba(120, 245, 255, 0.55),
    rgba(120, 165, 255, 0.55),
    rgba(200, 140, 255, 0.55),
    rgba(255, 90, 90, 0.55)
  );
  filter: blur(36px) saturate(1.4);
  animation: mystical-rainbow 900ms ease-out both;
}

@keyframes mystical-rainbow {
  0% {
    opacity: 0;
    transform: scale(0.76);
  }
  22% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: scale(1.2);
  }
}

.mystical-frog {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(240px, 62vw);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  z-index: 45;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 18px rgba(255, 244, 236, 0.25));
}

.mystical-teleport {
  animation: mystical-teleport 200ms ease-out both;
}

@keyframes mystical-teleport {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35) rotate(-6deg);
  }
  35% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.72) rotate(6deg);
  }
}

.mystical-center {
  animation: mystical-center 420ms cubic-bezier(0.2, 0.95, 0.2, 1) both;
}

@keyframes mystical-center {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45) rotate(-8deg);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
  }
}

.mystical-hide {
  opacity: 0;
  transition: opacity 180ms ease;
}

.mystical-final {
  z-index: 46;
}

.mystical-shush .blook-art {
  position: relative;
  background-image: var(--mystical-base, none);
  background-size: cover;
  background-position: center;
}

.mystical-shush .blook-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-image: var(--mystical-shush);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  animation: mystical-shush 3000ms ease-in-out infinite;
}

@keyframes mystical-shush {
  0% {
    opacity: 0;
    transform: scale(1);
    filter: brightness(1);
  }
  5% {
    opacity: 1;
    transform: scale(1.02);
    filter: brightness(1.06);
  }
  14% {
    opacity: 1;
    transform: scale(1.01);
    filter: brightness(1.03);
  }
  20% {
    opacity: 0;
    transform: scale(1);
    filter: brightness(1);
  }
  100% {
    opacity: 0;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes supreme-flip {
  0% {
    transform: scale(0.15) rotateY(180deg);
    opacity: 0;
  }
  35% {
    opacity: 1;
  }
  100% {
    transform: scale(1) rotateY(0deg);
    opacity: 1;
  }
}

.legendary-sweep {
  animation: legendary-sweep 950ms cubic-bezier(0.2, 0.9, 0.18, 1) both;
}

@keyframes epic-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes legendary-sweep {
  0% {
    transform: translate(-70vw, -55vh);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  38% {
    transform: translate(70vw, -55vh);
  }
  68% {
    transform: translate(-70vw, -55vh);
  }
  100% {
    transform: translate(0, 0);
    opacity: 1;
  }
}

@keyframes chroma-drop {
  0% {
    transform: translateY(-80vh) rotate(0deg);
    opacity: 0;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: translateY(0) rotate(360deg);
    opacity: 1;
  }
}

@keyframes explode-ring {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  35% {
    opacity: 1;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

.blook-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 231, 214, 0.10);
  background: rgba(0, 0, 0, 0.25);
}

.footer {
  margin-top: 18px;
  display: flex;
  justify-content: center;
}

.footer-text {
  font-size: 12px;
  color: rgba(255, 244, 236, 0.55);
}
