/* ===================== CoinWhales Home V2 — Web3 Premium ===================== */

.home-sync-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.home-dashboard--v2 {
  gap: 16px;
  padding-bottom: 24px;
  animation: homeFadeIn 0.55s ease both;
}

@keyframes homeFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Hero ---- */
.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 18px 16px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(14, 10, 36, 0.95) 0%, rgba(8, 18, 40, 0.92) 55%, rgba(12, 28, 48, 0.9) 100%);
  border: 1px solid rgba(22, 224, 200, 0.22);
  box-shadow:
    0 0 28px rgba(22, 224, 200, 0.12),
    0 0 40px rgba(123, 92, 255, 0.1),
    0 14px 36px rgba(0, 0, 0, 0.4);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 22px;
  padding: 1.5px;
  background: linear-gradient(135deg, #16e0c8, #7b5cff 55%, #f0c14a 110%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.home-hero-glow {
  position: absolute;
  inset: -40% -10% auto;
  height: 140%;
  background:
    radial-gradient(circle at 80% 20%, rgba(240, 193, 74, 0.16), transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(22, 224, 200, 0.18), transparent 50%);
  pointer-events: none;
}

.home-hero-content {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.home-hero-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #f0c14a;
  text-transform: uppercase;
}

.home-hero-title {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: #eafffb;
  line-height: 1.25;
}

.home-hero-balance-label {
  margin: 0;
  font-size: 11px;
  color: #94a3b8;
}

.home-hero-balance {
  margin: 2px 0 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(90deg, #eafffb, #f0c14a 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero-sub {
  margin: 2px 0 12px;
  font-size: 12px;
  color: #94a3b8;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-hero-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.home-hero-btn:active {
  transform: scale(0.97);
}

.home-hero-btn--primary {
  background: linear-gradient(135deg, #16e0c8, #0ea5e9 60%, #7b5cff);
  color: #061018;
  box-shadow: 0 0 18px rgba(22, 224, 200, 0.35);
}

.home-hero-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  border: 1px solid rgba(123, 92, 255, 0.45);
}

.home-hero-orb {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(240, 193, 74, 0.25), rgba(22, 224, 200, 0.08) 55%, transparent 70%);
  animation: homeOrbFloat 4.5s ease-in-out infinite;
}

.home-hero-orb img {
  filter: drop-shadow(0 0 16px rgba(240, 193, 74, 0.45));
}

@keyframes homeOrbFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ---- Ticker ---- */
.home-ticker {
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(22, 224, 200, 0.18);
  background: rgba(8, 14, 28, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.home-ticker-track {
  display: flex;
  gap: 28px;
  width: max-content;
  padding: 8px 0;
  animation: homeTicker 28s linear infinite;
}

.home-ticker-item {
  font-size: 12px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
  cursor: pointer;
}

.home-ticker-item:active {
  opacity: 0.75;
}

.home-ticker-item strong {
  color: #16e0c8;
}

.home-ticker-item .up {
  color: #34d399;
}

.home-ticker-item .down {
  color: #f87171;
}

@keyframes homeTicker {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

html[dir="rtl"] .home-ticker-track {
  animation-name: homeTickerRtl;
}

@keyframes homeTickerRtl {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(50%);
  }
}

/* ---- Promo carousel ---- */
.home-promo {
  position: relative;
}

.home-promo-viewport {
  overflow: hidden;
  border-radius: 18px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.home-promo-viewport.is-dragging {
  cursor: grabbing;
}

.home-promo-viewport.is-dragging .home-promo-track {
  transition: none;
}

.home-promo-track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.home-promo-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(135deg, rgba(20, 12, 46, 0.9), rgba(8, 20, 40, 0.92));
  box-sizing: border-box;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.home-promo-slide--street-kings {
  border-color: rgba(251, 146, 60, 0.55);
  background:
    radial-gradient(circle at 80% 20%, rgba(251, 146, 60, 0.35), transparent 45%),
    linear-gradient(135deg, #1a0b04 0%, #0b1020 55%, #111827 100%);
}

.home-promo-slide--bingx {
  border-color: rgba(56, 189, 248, 0.45);
  background-color: #050a16;
  background-image:
    linear-gradient(90deg, rgba(5, 10, 22, 0.12) 0%, rgba(5, 10, 22, 0.28) 40%, rgba(5, 10, 22, 0.55) 100%),
    url("./assets/bingx-promo-bg.png?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-promo-slide--vip {
  border-color: rgba(212, 175, 88, 0.55);
  background-color: #070b14;
  background-image:
    linear-gradient(90deg, rgba(7, 11, 20, 0.15) 0%, rgba(7, 11, 20, 0.28) 42%, rgba(7, 11, 20, 0.55) 100%),
    url("./assets/vip-promo-bg.png?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-promo-slide--giveaway {
  border-color: rgba(168, 85, 247, 0.5);
  background-color: #0a0614;
  background-image:
    linear-gradient(90deg, rgba(10, 6, 20, 0.12) 0%, rgba(10, 6, 20, 0.28) 40%, rgba(10, 6, 20, 0.55) 100%),
    url("./assets/giveaway-promo-bg.png?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-promo-slide--features {
  border-color: rgba(56, 189, 248, 0.45);
  background-color: #050a14;
  background-image:
    linear-gradient(90deg, rgba(5, 10, 20, 0.12) 0%, rgba(5, 10, 20, 0.25) 40%, rgba(5, 10, 20, 0.55) 100%),
    url("./assets/features-promo-bg.png?v=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.home-promo-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  color: #061018;
  background: linear-gradient(90deg, #16e0c8, #f0c14a);
  margin-bottom: 8px;
}

.home-promo-slide h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 800;
  color: #f8fafc;
}

.home-promo-slide p {
  margin: 0 0 12px;
  font-size: 12px;
  color: #94a3b8;
}

.home-promo-cta {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(22, 224, 200, 0.35);
}

.home-promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.home-promo-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.home-promo-dot.is-active {
  width: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #16e0c8, #7b5cff);
}

/* ---- Rank strip under promo ---- */
.home-rank-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(14, 116, 144, 0.18), rgba(15, 23, 42, 0.94));
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: 0 0 22px rgba(22, 224, 200, 0.1);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.home-rank-strip:active {
  transform: scale(0.985);
}

.home-rank-strip.is-loading .home-rank-strip-label,
.home-rank-strip.is-loading .home-rank-strip-next {
  opacity: 0.55;
}

.home-rank-strip-emoji {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: radial-gradient(circle at 30% 25%, rgba(40, 24, 80, 0.98), rgba(8, 14, 28, 0.98));
  border: 1.5px solid rgba(240, 193, 74, 0.4);
  box-shadow: 0 0 14px rgba(22, 224, 200, 0.25);
}

.home-rank-strip-body {
  min-width: 0;
}

.home-rank-strip-top {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 6px;
}

.home-rank-strip-kicker {
  font-size: 10px;
  font-weight: 700;
  color: #f0c14a;
}

.home-rank-strip-label {
  font-size: 15px;
  font-weight: 800;
  color: #7dd3fc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-rank-strip .home-rank-progress-wrap {
  height: 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.home-rank-strip .home-rank-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #16e0c8, #38bdf8, #f0c14a);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px rgba(22, 224, 200, 0.5);
}

.home-rank-strip-next,
.home-rank-strip-xp {
  margin: 5px 0 0;
  font-size: 11px;
  color: #cbd5e1;
}

.home-rank-strip-xp {
  margin-top: 2px;
  color: #94a3b8;
  font-weight: 700;
}

.home-rank-strip-chevron {
  font-size: 22px;
  font-weight: 700;
  color: rgba(123, 92, 255, 0.85);
}

/* legacy circle rank (unused) kept minimal */
.home-rank-hero {
  display: none;
}

/* ---- Live stats ---- */
.home-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.home-stat-card {
  padding: 12px 12px 10px;
  border-radius: 16px;
  background: rgba(10, 16, 32, 0.82);
  border: 1px solid rgba(123, 92, 255, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-stat-card:hover {
  border-color: rgba(22, 224, 200, 0.4);
  box-shadow: 0 0 16px rgba(22, 224, 200, 0.12);
}

.home-stat-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  margin-bottom: 4px;
}

.home-stat-value {
  font-size: 16px;
  font-weight: 800;
  color: #eafffb;
}

.home-stat-value--up {
  color: #34d399;
}

/* ---- Daily reward ---- */
.home-daily {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(240, 193, 74, 0.14), rgba(20, 12, 46, 0.92));
  border: 1px solid rgba(240, 193, 74, 0.35);
  box-shadow: 0 0 22px rgba(240, 193, 74, 0.1);
}

.home-daily.is-claimed {
  opacity: 0.72;
  border-color: rgba(255, 255, 255, 0.12);
}

.home-daily-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(240, 193, 74, 0.15);
}

.home-daily-body h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #fde68a;
}

.home-daily-reward {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 800;
  color: #16e0c8;
}

.home-daily-hint {
  margin: 2px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.home-daily-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #f0c14a, #16e0c8);
  color: #061018;
  white-space: nowrap;
  box-shadow: 0 0 14px rgba(240, 193, 74, 0.3);
}

.home-daily-btn:disabled {
  opacity: 0.55;
  cursor: default;
  box-shadow: none;
}

/* ---- Quick grid v2 ---- */
.home-quick-grid--v2 {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.home-quick-grid--v2 .home-quick-tile {
  min-height: 92px;
  border-radius: 16px;
  border: 1px solid rgba(123, 92, 255, 0.2);
  background: rgba(10, 16, 32, 0.78);
  backdrop-filter: blur(6px);
  transition: transform 0.15s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.home-quick-grid--v2 .home-quick-tile:hover {
  border-color: rgba(22, 224, 200, 0.4);
  box-shadow: 0 0 16px rgba(22, 224, 200, 0.12);
}

.home-quick-grid--v2 .home-quick-tile:active {
  transform: scale(0.96);
}

.home-quick-grid--v2 .home-quick-icon img {
  width: 40px;
  height: 40px;
}

/* ---- Activity ---- */
.home-activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-activity-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(10, 16, 32, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.home-activity-emoji {
  font-size: 18px;
}

.home-activity-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.home-activity-detail {
  margin: 2px 0 0;
  font-size: 11px;
  color: #94a3b8;
}

.home-activity-amount {
  font-size: 12px;
  font-weight: 800;
  color: #16e0c8;
}

.home-activity-empty {
  padding: 14px;
  text-align: center;
  color: #64748b;
  font-size: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.1);
}

/* Bottom nav removed */

body.app-view-home .container,
body.app-view-section .container {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 420px) {
  .home-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}
