/* اكتشاف الحوت — حملة برعاية BingX */
.wd-screen--bingx {
  --wd-bingx-blue: #0058fb;
  --wd-bingx-blue-soft: #2954fe;
  --wd-bingx-cyan: #00c2ff;
  --wd-bingx-bg: #07090d;
  --wd-bingx-bg-mid: #0d1118;
  --wd-bingx-panel: rgba(10, 14, 22, 0.96);
  --wd-bingx-border: rgba(0, 88, 251, 0.35);
  --wd-bingx-glow: rgba(0, 88, 251, 0.22);
  --wd-ocean: var(--wd-bingx-bg-mid);
  --wd-ocean-mid: #101620;
  --wd-sand: var(--wd-bingx-cyan);
  --wd-chest: #1a3a6e;
  --wd-panel: var(--wd-bingx-panel);
}

.wd-screen {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 45% at 50% -5%, rgba(0, 88, 251, 0.18) 0%, transparent 55%),
    linear-gradient(180deg, #040508 0%, var(--wd-bingx-bg) 35%, #0a1018 100%);
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0));
}

.wd-bingx-sponsor-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: linear-gradient(90deg, rgba(0, 88, 251, 0.12), rgba(0, 194, 255, 0.08), rgba(0, 88, 251, 0.12));
  border-bottom: 1px solid var(--wd-bingx-border);
}

.wd-bingx-logo {
  display: block;
  height: 22px;
  width: auto;
}

.wd-bingx-sponsor-text {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e8f0ff;
  text-transform: uppercase;
}

.wd-topbar-center {
  flex: 1;
  text-align: center;
  min-width: 0;
}

.wd-page-sub {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--wd-bingx-cyan);
  opacity: 0.9;
}

.wd-topbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.75rem;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(4, 5, 8, 0.97), rgba(4, 5, 8, 0.75));
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 88, 251, 0.12);
}

.wd-bingx-back {
  color: #e8f0ff;
}

.wd-page-title {
  flex: 1;
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.wd-stats-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin: 0 0.75rem 0.65rem;
}

.wd-stats-strip--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 380px) {
  .wd-stats-strip--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.wd-stat-card {
  background: rgba(0, 88, 251, 0.06);
  border: 1px solid rgba(0, 88, 251, 0.2);
  border-radius: 12px;
  padding: 0.45rem 0.5rem;
  text-align: center;
}

.wd-stat-card span {
  display: block;
  font-size: 0.68rem;
  opacity: 0.75;
}

.wd-stat-card strong {
  display: block;
  font-size: 1rem;
  margin-top: 0.15rem;
  color: var(--wd-bingx-cyan);
}

.wd-season-banner {
  margin: 0 0.75rem 0.75rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 88, 251, 0.2), rgba(10, 14, 22, 0.95));
  border: 1px solid var(--wd-bingx-border);
  font-size: 0.78rem;
  line-height: 1.45;
}

.wd-season-banner strong {
  color: var(--wd-bingx-cyan);
}

.wd-map-wrap {
  position: relative;
  margin: 0 0.5rem 1rem;
  padding: 0.75rem 0.5rem 1rem;
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 55% at 50% 62%, rgba(0, 88, 251, 0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 30% at 18% 78%, rgba(0, 194, 255, 0.08) 0%, transparent 70%),
    linear-gradient(180deg, rgba(13, 18, 28, 0.9) 0%, rgba(6, 9, 14, 0.95) 100%);
  border: 2px solid var(--wd-bingx-border);
  box-shadow: inset 0 0 40px var(--wd-bingx-glow);
}

.wd-map-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.02) 18px,
      rgba(255, 255, 255, 0.02) 19px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 18px,
      rgba(255, 255, 255, 0.02) 18px,
      rgba(255, 255, 255, 0.02) 19px
    );
  pointer-events: none;
  opacity: 0.5;
}

.wd-map-label {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.72rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.wd-map-number {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.68rem;
  color: var(--wd-bingx-cyan);
  margin: 0 0 0.5rem;
}

.wd-map-wrap--golden {
  border-color: rgba(0, 194, 255, 0.65);
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(0, 88, 251, 0.35) 0%, transparent 70%),
    linear-gradient(180deg, rgba(0, 40, 100, 0.6) 0%, rgba(6, 9, 14, 0.95) 100%);
  animation: wd-golden-glow 2.5s ease-in-out infinite;
}

@keyframes wd-golden-glow {
  0%,
  100% {
    box-shadow: inset 0 0 40px rgba(0, 88, 251, 0.2);
  }
  50% {
    box-shadow: inset 0 0 55px rgba(0, 194, 255, 0.35);
  }
}

.wd-boxes-remaining {
  position: relative;
  z-index: 1;
  text-align: center;
  font-size: 0.72rem;
  opacity: 0.85;
  margin: 0 0 0.55rem;
}

.wd-daily-challenge {
  margin: 0 0.75rem 0.65rem;
}

.wd-daily-challenge-inner {
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  background: rgba(0, 88, 251, 0.1);
  border: 1px solid rgba(0, 88, 251, 0.28);
}

.wd-daily-challenge-inner.is-done {
  background: rgba(80, 200, 120, 0.12);
  border-color: rgba(125, 255, 176, 0.3);
}

.wd-daily-challenge-title {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.wd-daily-challenge-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.wd-daily-challenge-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--wd-bingx-blue), var(--wd-bingx-cyan));
  border-radius: 99px;
  transition: width 0.35s ease;
}

.wd-daily-challenge-sub {
  font-size: 0.68rem;
  opacity: 0.85;
}

.wd-my-rank {
  margin: 0 0.75rem 0.65rem;
}

.wd-my-rank.hidden {
  display: none;
}

.wd-my-rank-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 88, 251, 0.16), rgba(10, 14, 22, 0.95));
  border: 1px solid var(--wd-bingx-border);
}

.wd-my-rank-label {
  font-size: 0.72rem;
  opacity: 0.8;
}

.wd-my-rank-num {
  font-size: 1.25rem;
  color: var(--wd-bingx-cyan);
}

.wd-my-rank-meta {
  margin-inline-start: auto;
  font-size: 0.72rem;
  opacity: 0.9;
}

.wd-prize-tiers {
  margin: 0 0.75rem 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 14px;
  background: var(--wd-panel);
  border: 1px solid var(--wd-bingx-border);
}

.wd-prize-tiers h3 {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
}

.wd-prize-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-prize-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  padding: 0.2rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wd-prize-list li:last-child {
  border-bottom: none;
}

.wd-new-map-banner {
  display: block;
  width: calc(100% - 1.5rem);
  margin: 0 0.75rem 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--wd-bingx-border);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0, 88, 251, 0.22), rgba(10, 14, 22, 0.95));
  color: var(--wd-bingx-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.wd-new-map-banner.hidden {
  display: none;
}

.wd-result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wd-result-new-map {
  border: none;
  border-radius: 12px;
  padding: 0.55rem 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--wd-bingx-blue), #003db8);
  color: #fff;
  cursor: pointer;
}

.wd-result-new-map.hidden {
  display: none;
}

.wd-boxes {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.35rem;
  max-width: 360px;
  margin: 0 auto;
  transform: rotate(-1.5deg);
}

.wd-box {
  aspect-ratio: 1;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  background: linear-gradient(145deg, #1a4a9e 0%, var(--wd-chest) 45%, #0a2040 100%);
  box-shadow:
    0 3px 0 #061428,
    0 6px 12px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(0, 194, 255, 0.2);
  transition: transform 0.15s ease, filter 0.15s ease;
  padding: 0;
}

.wd-box::before {
  content: "";
  position: absolute;
  inset: 22% 18% 38%;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--wd-bingx-cyan), var(--wd-bingx-blue));
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.2);
}

.wd-box::after {
  content: "📦";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.wd-box:nth-child(odd) {
  transform: translateY(2px) rotate(1deg);
}

.wd-box:nth-child(3n) {
  transform: translateY(-1px) rotate(-1deg);
}

.wd-box:active:not(:disabled) {
  transform: scale(0.94);
}

.wd-box:disabled {
  cursor: default;
}

.wd-box.is-open {
  cursor: default;
  opacity: 1;
  filter: none;
}

.wd-box.is-open::before {
  opacity: 0.35;
}

.wd-box.is-open::after {
  content: attr(data-revealed);
  font-size: 1.15rem;
  filter: none;
}

.wd-box.is-revealed-whale.is-open {
  background: linear-gradient(145deg, var(--wd-bingx-blue-soft) 0%, var(--wd-bingx-blue) 45%, #003080 100%);
  box-shadow: 0 0 16px rgba(0, 88, 251, 0.55);
}

.wd-box.is-shaking {
  animation: wd-shake 0.38s ease-in-out;
  z-index: 2;
}

.wd-box.is-revealing {
  animation: wd-reveal 0.32s ease forwards;
}

@keyframes wd-shake {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  20% {
    transform: rotate(-4deg) scale(1.05);
  }
  40% {
    transform: rotate(4deg) scale(1.08);
  }
  60% {
    transform: rotate(-3deg) scale(1.06);
  }
  80% {
    transform: rotate(3deg) scale(1.04);
  }
}

@keyframes wd-reveal {
  0% {
    transform: scale(1.1);
  }
  50% {
    transform: scale(0.92);
  }
  100% {
    transform: scale(1);
  }
}

.wd-confetti {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 110;
  overflow: hidden;
}

.wd-confetti-piece {
  position: absolute;
  top: 35%;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  animation: wd-confetti-fall 1.8s ease-out forwards;
}

@keyframes wd-confetti-fall {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(120px) translateX(var(--wd-dx, 0)) rotate(540deg);
    opacity: 0;
  }
}

.wd-box.is-busy {
  pointer-events: none;
  opacity: 0.6;
}

.wd-leaderboard {
  margin: 0 0.75rem 1rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  background: var(--wd-panel);
  border: 1px solid var(--wd-bingx-border);
}

.wd-leaderboard h3 {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
}

.wd-lb-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wd-lb-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.78rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wd-lb-list li:last-child {
  border-bottom: none;
}

.wd-lb-rank {
  width: 1.5rem;
  text-align: center;
  font-weight: 700;
  color: var(--wd-bingx-cyan);
}

.wd-lb-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wd-lb-score {
  font-weight: 600;
}

.wd-status-text {
  text-align: center;
  font-size: 0.78rem;
  opacity: 0.8;
  margin: 0 0.75rem 0.5rem;
  min-height: 1.2em;
}

.wd-tasks-tab {
  position: fixed;
  z-index: 90;
  top: 50%;
  right: 0;
  left: auto;
  transform: translateY(-50%);
  border: none;
  border-radius: 12px 0 0 12px;
  padding: 0.65rem 0.25rem 0.65rem 0.35rem;
  background: linear-gradient(135deg, var(--wd-bingx-blue), #003080);
  color: #fff;
  box-shadow: -4px 0 16px rgba(0, 88, 251, 0.25);
  cursor: pointer;
  writing-mode: vertical-rl;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.wd-tasks-tab.is-open .wd-tasks-tab-icon {
  transform: rotate(180deg);
}

.wd-tasks-tab-icon {
  display: block;
  writing-mode: horizontal-tb;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  transition: transform 0.2s ease;
}

.wd-tasks-drawer {
  position: fixed;
  z-index: 95;
  top: 0;
  right: 0;
  left: auto;
  width: min(88vw, 320px);
  height: 100dvh;
  background: var(--wd-panel);
  border-left: 1px solid var(--wd-bingx-border);
  box-shadow: -8px 0 32px rgba(0, 88, 251, 0.15);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  padding-top: env(safe-area-inset-top, 0);
}

.wd-tasks-drawer.is-open {
  transform: translateX(0);
}

.wd-tasks-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wd-tasks-drawer-head h2 {
  margin: 0;
  font-size: 0.95rem;
}

.wd-tasks-close {
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
}

.wd-tasks-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.65rem 0.75rem 1rem;
}

.wd-task-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 0.65rem 0.7rem;
  margin-bottom: 0.55rem;
}

.wd-task-card h4 {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
}

.wd-task-card p {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  opacity: 0.8;
  line-height: 1.4;
}

.wd-task-reward {
  font-size: 0.72rem;
  color: var(--wd-bingx-cyan);
  margin-bottom: 0.45rem;
}

.wd-task-btn {
  width: 100%;
  border: none;
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, var(--wd-bingx-blue), #003db8);
  color: #fff;
}

.wd-task-btn:disabled {
  opacity: 0.45;
  cursor: default;
}

.wd-task-btn.is-done {
  background: rgba(80, 200, 120, 0.2);
  color: #7dffb0;
}

.wd-tasks-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.wd-tasks-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.wd-result-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.65);
}

.wd-result-modal.hidden {
  display: none;
}

.wd-result-card {
  width: min(100%, 280px);
  text-align: center;
  padding: 1.25rem 1rem;
  border-radius: 18px;
  background: linear-gradient(160deg, #0d1525, var(--wd-bingx-bg));
  border: 1px solid var(--wd-bingx-border);
  animation: wd-pop 0.35s ease;
}

@keyframes wd-pop {
  from {
    transform: scale(0.85);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.wd-result-emoji {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.wd-result-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.wd-result-sub {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  opacity: 0.85;
}

.wd-result-close {
  border: none;
  border-radius: 12px;
  padding: 0.55rem 1.25rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--wd-bingx-blue), #003db8);
  color: #fff;
  cursor: pointer;
}

.drawer-item.tile-soon {
  position: relative;
  opacity: 0.92;
}

.home-quick-tile.tile-soon {
  opacity: 0.92;
}
