/* ============================================
   EARNING DASHBOARD — CINEMATIC EPIC EDITION
   ============================================ */

.earning-section {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
  isolation: isolate;
}

/* ── BACKGROUND IMAGE overlay ────────────── */
/* bg-image styles are set inline in JS — only the overlay lives here */
.earning-section .section-bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.72) 70%),
    linear-gradient(to bottom, rgba(2,8,7,0.45) 0%, rgba(2,8,7,0.80) 55%, rgba(2,8,7,0.97) 100%);
}

/* Vignette */
.section-bg-blur {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 80% at 50% 50%, transparent 25%, rgba(2,8,7,0.65) 100%);
  z-index: -2;
  pointer-events: none;
}

/* Ambient orb glow — matches image centre */
.section-bg-blur::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  top: 2%;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(243,180,60,0.13) 0%, transparent 65%);
  filter: blur(55px);
  animation: orb-pulse 6s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes orb-pulse {
  from { opacity: 0.55; transform: translateX(-50%) scale(0.88); }
  to   { opacity: 1;    transform: translateX(-50%) scale(1.12); }
}

/* Ember dot grid */
.earning-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(243,180,60,0.055) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, black, transparent 80%);
  pointer-events: none;
  z-index: -1;
}

/* Gold top hairline */
.earning-section::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(243,180,60,0.4) 35%,
    rgba(243,180,60,0.4) 65%,
    transparent
  );
  z-index: 3;
}

/* ── HEADER ──────────────────────────────── */
.earning-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.premium-eyebrow {
  color: var(--teal, #00e5c8);
  text-transform: uppercase;
  letter-spacing: 5px;
  font-size: 9px;
  font-weight: 800;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.premium-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--teal, #00e5c8);
  opacity: 0.6;
}

.s-title {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 40px rgba(0,0,0,0.7);
}

.gold-gradient {
  background: linear-gradient(100deg, #f3d47a 0%, #ffd700 40%, #c9a84c 75%, #f3d47a 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gold-sweep 5s linear infinite;
  filter: drop-shadow(0 0 22px rgba(243,180,60,0.35));
}

@keyframes gold-sweep {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Fee badge */
.fee-badge {
  background: rgba(2,8,7,0.6);
  padding: 20px 28px;
  border-radius: 20px;
  border: 1px solid rgba(243,180,60,0.2);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  text-align: right;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.05);
}

.fee-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(243,180,60,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.fee-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 10px;
  font-weight: 700;
}

.fee-amount-group {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: flex-end;
}

.fee-main {
  font-size: 30px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  text-shadow: 0 0 24px rgba(243,180,60,0.2);
}

.fee-sub {
  font-size: 18px;
  font-weight: 700;
  color: var(--teal, #00e5c8);
}

/* ── GRID ────────────────────────────────── */
.earning-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  position: relative;
  z-index: 2;
}

/* ── BASE CARD — obsidian glass tablet ───── */
.earn-card {
  background: rgba(2,8,7,0.52);
  border: 1px solid rgba(255,255,255,0.065);
  padding: 26px 28px;
  border-radius: 22px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.04);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.4s ease,
              border-color 0.4s ease,
              background 0.4s ease;
}

/* Shimmer sweep */
.earn-card::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transition: left 0.55s ease;
  pointer-events: none;
}

.earn-card:hover::before { left: 160%; }

.earn-card:hover {
  background: rgba(5,15,12,0.68);
  transform: translateY(-5px);
}

.earn-card.stream:hover {
  border-color: rgba(0,229,200,0.28);
  box-shadow: 0 20px 48px rgba(0,0,0,0.5), 0 0 28px rgba(0,229,200,0.07);
}

.earn-card.bonus:hover {
  border-color: rgba(243,180,60,0.3);
  box-shadow: 0 20px 48px rgba(0,0,0,0.5), 0 0 28px rgba(243,180,60,0.09);
}

/* ── CARD TAG ────────────────────────────── */
.card-tag {
  display: inline-block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 16px;
  background: rgba(0,229,200,0.08);
  color: var(--teal, #00e5c8);
  border: 1px solid rgba(0,229,200,0.14);
}

.bonus .card-tag {
  background: rgba(243,180,60,0.08);
  color: #f3b43c;
  border-color: rgba(243,180,60,0.16);
}

/* ── CARD CONTENT ────────────────────────── */
.earn-name {
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,0.78);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.earn-val {
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  display: flex;
  align-items: baseline;
  gap: 7px;
  letter-spacing: -0.02em;
}

.currency-tag {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
}

.earn-val small {
  font-size: 11px;
  font-weight: 700;
  color: var(--teal, #00e5c8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── GOLD HIGHLIGHT CARD ─────────────────── */
.earn-card.highlight-gold {
  background: rgba(20,10,0,0.62);
  border-color: rgba(243,180,60,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(243,180,60,0.08);
}

.earn-card.highlight-gold .earn-val {
  background: linear-gradient(100deg, #f3d47a, #ffd700, #c9a84c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 10px rgba(243,180,60,0.3));
}

/* ── TOTAL CARD ──────────────────────────── */
.total-highlight {
  grid-column: span 2;
  background: linear-gradient(130deg, #00e5c8 0%, #00b39c 55%, #007d6e 100%);
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 34px 40px;
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: 0 16px 48px rgba(0,229,200,0.22), 0 4px 16px rgba(0,0,0,0.5);
  transition: transform 0.4s cubic-bezier(0.16,1,0.3,1), box-shadow 0.4s ease;
}

.total-highlight:hover {
  transform: translateY(-5px);
  box-shadow: 0 28px 60px rgba(0,229,200,0.28), 0 8px 24px rgba(0,0,0,0.5);
}

.total-highlight .earn-name {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 3.5px;
  color: rgba(0,0,0,0.5);
  font-weight: 800;
  margin-bottom: 8px;
}

.total-val {
  font-size: 50px;
  font-weight: 900;
  color: #020807;
  line-height: 1;
  letter-spacing: -0.03em;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.per-unit {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.4;
  letter-spacing: 0.03em;
}

.total-visual-bg {
  position: absolute;
  right: -4%;
  top: -35%;
  width: 210px;
  height: 210px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  pointer-events: none;
}

.total-visual-bg::after {
  content: '';
  position: absolute;
  width: 130px;
  height: 130px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  bottom: -65px;
  right: 50px;
}

/* ── REVEAL ──────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

.reveal.v  { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 0.12s; }

/* ── RESPONSIVE ──────────────────────────── */
@media (max-width: 1024px) {
  .earning-grid { grid-template-columns: repeat(2, 1fr); }
  .total-highlight { grid-column: span 2; }
  .earning-section .section-bg-image { background-attachment: scroll; }
}

@media (max-width: 768px) {
  .earning-section { padding: 100px 0; }

  .earning-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 44px;
  }

  .fee-badge { text-align: left; width: 100%; }
  .fee-amount-group { justify-content: flex-start; }

  .earning-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .total-highlight {
    grid-column: span 2;
    flex-direction: column;
    align-items: flex-start;
    padding: 26px;
    gap: 6px;
  }

  .total-val { font-size: 38px; }
}

@media (max-width: 480px) {
  .earn-card { padding: 18px 20px; }
  .earn-val  { font-size: 19px; }
  .total-val { font-size: 32px; }
}