/* ================================================================
   DAILY CHALLENGE SCREEN
   Premium standalone 10-level daily puzzle mode
   ================================================================ */

/* ── Outer wrapper — fills viewport ───────────────────────────── */
.dc-outer {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  z-index: 10;
  overflow: hidden;
}

/* Full-bleed ambient glow */
.dc-ambient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 8%, var(--section-glow, rgba(99,102,241,0.22)) 0%, transparent 52%),
    radial-gradient(ellipse at 75% 92%, var(--section-glow, rgba(99,102,241,0.18)) 0%, transparent 52%);
  opacity: 0.7;
  animation: dcAmbientShift 10s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}
@keyframes dcAmbientShift {
  0%   { transform: scale(1) translate(0, 0); opacity: 0.6; }
  100% { transform: scale(1.1) translate(2%, -3%); opacity: 0.8; }
}

/* ── Inner — capped width ─────────────────────────────────────── */
.dc-screen {
  width: 100%;
  max-width: var(--app-max-width);
  height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

/* ── TOP BAR ─────────────────────────────────────────────────── */
.dc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: max(14px, env(safe-area-inset-top, 14px));
  gap: 10px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  flex-shrink: 0;
  animation: dcSlideDown 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes dcSlideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dc-back-btn,
.dc-reset-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.dc-back-btn:active  { transform: scale(0.92); background: rgba(255,255,255,0.12); }
.dc-reset-btn:active { transform: scale(0.92) rotate(-90deg); background: rgba(255,255,255,0.12); }

/* Centre badge + level row */
.dc-title-area {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.dc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
}
.dc-badge-icon { font-size: 16px; }
.dc-badge-text {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.3px;
}
.dc-level-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 3px;
}
.dc-level-counter {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
}
.dc-level-counter strong { color: #fff; }
.dc-diff-tag {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 2px 7px;
  border-radius: 5px;
}

/* Grid badge on the right of topbar */
.dc-grid-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.dc-grid-text {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,0.55);
  line-height: 1;
}

/* ── PROGRESS SECTION ────────────────────────────────────────── */
.dc-progress-section {
  padding: 8px 16px 4px;
  animation: dcFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

/* Inner level game area — fills remaining space */
.dc-level-game-inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
@keyframes dcFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 10-dot progress indicator */
.dc-progress-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.dc-pdot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  flex-shrink: 0;
  font-size: 0;
}
.dc-pdot.done {
  background: var(--section-accent, #6366f1);
  border-color: var(--section-accent, #6366f1);
  box-shadow: 0 0 10px var(--section-glow, rgba(99,102,241,0.5));
  transform: scale(1.05);
}
.dc-pdot.active {
  border-color: var(--section-accent, #6366f1);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 14px var(--section-glow, rgba(99,102,241,0.4));
  animation: dcDotPulse 1.8s ease-in-out infinite;
}
@keyframes dcDotPulse {
  0%, 100% { box-shadow: 0 0 8px var(--section-glow, rgba(99,102,241,0.4)); }
  50% { box-shadow: 0 0 20px var(--section-glow, rgba(99,102,241,0.7)), 0 0 4px var(--section-glow); }
}
.dc-pdot.locked {
  opacity: 0.3;
}
.dc-pdot-check {
  font-size: 11px;
  font-weight: 900;
  color: #000;
  line-height: 1;
}
.dc-pdot-num {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  font-weight: 800;
  color: var(--section-accent, #6366f1);
  line-height: 1;
}

/* Meta line: completed / remaining */
.dc-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2px;
  margin-bottom: 6px;
}
.dc-completed-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--section-accent, #6366f1);
}
.dc-remaining-label {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
}

/* Thin overall-fill bar */
.dc-fill-bar-wrap {
  height: 4px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
}
.dc-fill-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--section-accent,#6366f1), color-mix(in srgb, var(--section-accent,#6366f1) 60%, #fff));
  border-radius: 3px;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px var(--section-glow, rgba(99,102,241,0.5));
}

/* ── STATS ROW (same design language as GameScreen) ───────────── */
.dc-stats-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-top: 10px;
  gap: 12px;
  animation: dcFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}
.dc-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.dc-stat-lbl {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
}
.dc-stat-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: conic-gradient(var(--section-accent, #6366f1) var(--ring-pct, 0%), rgba(255,255,255,0.08) var(--ring-pct, 0%));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.dc-stat-ring::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
}
.dc-stat-val {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  position: relative;
  z-index: 1;
}
.dc-stat-num {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.dc-stat-center {
  flex: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dc-pipe-bar-wrap {
  width: 100%;
  height: 22px;
  background: rgba(255,255,255,0.06);
  border-radius: 11px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
}
.dc-pipe-bar {
  height: 100%;
  min-width: 22px;
  background: linear-gradient(90deg, var(--section-accent,#6366f1), color-mix(in srgb, var(--section-accent,#6366f1) 60%, #fff));
  border-radius: 11px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 12px var(--section-glow, rgba(99,102,241,0.5));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  animation: dcPipeGlow 2.5s ease-in-out infinite;
}
@keyframes dcPipeGlow {
  0%, 100% { box-shadow: 0 0 8px var(--section-glow, rgba(99,102,241,0.4)); }
  50%       { box-shadow: 0 0 18px var(--section-glow, rgba(99,102,241,0.7)); }
}
.dc-pipe-pct {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 6px rgba(0,0,0,0.5);
  padding-right: 8px;
  white-space: nowrap;
}
.dc-pipe-label {
  font-family: 'Outfit', sans-serif;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,0.35);
}

/* ── BOTTOM BAR ──────────────────────────────────────────────── */
.dc-bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 16px;
  gap: 14px;
  animation: dcFadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
.dc-flow-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}
.dc-fdot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--dot-color);
  opacity: 0.3;
  border: 1.5px solid rgba(255,255,255,0.1);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dc-fdot.done {
  opacity: 1;
  transform: scale(1.2);
  border-color: transparent;
  box-shadow: 0 0 10px var(--dot-glow), 0 0 20px var(--dot-glow);
}
.dc-hint-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border: 1px solid rgba(251,191,36,0.25);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(249,115,22,0.12));
  color: #FBBF24;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.25s ease;
  flex-shrink: 0;
  animation: dcHintGlow 3s ease-in-out infinite;
}
@keyframes dcHintGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); }
  50% { box-shadow: 0 0 20px 2px rgba(251,191,36,0.15); }
}
.dc-hint-btn:active { transform: scale(0.94); }
.dc-hint-icon { color: #FBBF24; flex-shrink: 0; }
.dc-hint-text { font-size: 14px; font-weight: 700; color: #FBBF24; }
.dc-hint-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 11px;
  background: linear-gradient(135deg, #FBBF24, #F97316);
  color: #000;
  font-size: 11px;
  font-weight: 800;
}

/* ── LEVEL COMPLETE OVERLAY ──────────────────────────────────── */
.dc-level-complete-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.dc-level-complete-overlay.visible { opacity: 1; }

.dc-level-complete-card {
  position: relative;
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  padding: 40px 28px 32px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  transform: scale(0.8) translateY(30px);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.dc-level-complete-card.visible { transform: scale(1) translateY(0); }

.dc-lc-glow {
  position: absolute;
  top: -80px; left: 50%;
  transform: translateX(-50%);
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--section-glow, rgba(99,102,241,0.25)) 0%, transparent 70%);
  pointer-events: none;
}
.dc-lc-badge {
  font-size: 56px;
  margin-bottom: 12px;
  animation: dcBadgeBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
@keyframes dcBadgeBounce {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.dc-lc-title {
  font-family: 'Outfit', sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  margin: 0 0 10px;
}
.dc-lc-stars {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
}
.dc-lc-star {
  font-size: 32px;
  color: rgba(255,255,255,0.15);
  transition: color 0.4s ease, text-shadow 0.4s ease;
  animation: dcStarIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.dc-lc-star.lit {
  color: #FBBF24;
  text-shadow: 0 0 24px rgba(251,191,36,0.6);
}
@keyframes dcStarIn {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.dc-lc-sub {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 24px;
  line-height: 1.4;
}
.dc-lc-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dc-lc-next-btn {
  font-size: 16px !important;
  padding: 16px 28px !important;
  animation: dcPulseBtn 2s ease-in-out infinite;
}
@keyframes dcPulseBtn {
  0%, 100% { box-shadow: 0 4px 20px rgba(99,102,241,0.3); }
  50% { box-shadow: 0 4px 30px rgba(99,102,241,0.55); }
}

/* ── ALL COMPLETE OVERLAY ─────────────────────────────────────── */
.dc-all-complete-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(145deg, #0a0a1a, #1a0a2e);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.dc-all-complete-overlay.visible { opacity: 1; }
.dc-all-complete-card {
  position: relative;
  text-align: center;
  max-width: 360px;
  width: 100%;
  transform: scale(0.85) translateY(24px);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.dc-all-complete-card.visible { transform: scale(1) translateY(0); }
.dc-all-glow {
  position: absolute;
  top: -100px; left: 50%;
  transform: translateX(-50%);
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(251,191,36,0.25) 0%, transparent 70%);
  pointer-events: none;
  animation: dcAllGlowPulse 3s ease-in-out infinite;
}
@keyframes dcAllGlowPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.15); }
}
.dc-all-trophy {
  font-size: 80px;
  margin-bottom: 16px;
  display: block;
  animation: dcTrophyIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}
@keyframes dcTrophyIn {
  0% { transform: scale(0.2) translateY(30px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.dc-all-title {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin: 0 0 12px;
  text-shadow: 0 0 40px rgba(251,191,36,0.4);
}
.dc-all-sub {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 16px;
}

/* ── Collect reward button (ad-gated) ── */
.dc-all-reward {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 18px;
  margin-bottom: 18px;
  cursor: pointer;
  border: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
/* Default — interactive CTA */
.dc-all-reward.dc-reward-btn {
  background: linear-gradient(135deg, rgba(251,191,36,0.18), rgba(249,115,22,0.14));
  border: 1.5px solid rgba(251,191,36,0.45);
  animation: dcRewardPop 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.3s both,
             dcRewardGlow 2.5s ease-in-out 1s infinite;
}
.dc-all-reward.dc-reward-btn:active { transform: scale(0.97); }
.dc-all-reward.dc-reward-btn.loading {
  opacity: 0.65;
  animation: none;
  cursor: default;
}
/* Claimed — success state */
.dc-all-reward.dc-reward-claimed {
  background: linear-gradient(135deg, rgba(16,185,129,0.18), rgba(5,150,105,0.1));
  border: 1.5px solid rgba(16,185,129,0.35);
  cursor: default;
}
@keyframes dcRewardPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes dcRewardGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(251,191,36,0.2); }
  50% { box-shadow: 0 0 26px rgba(251,191,36,0.55), 0 0 8px rgba(251,191,36,0.3); }
}
.dc-all-reward-icon {
  font-size: 28px;
  flex-shrink: 0;
  animation: dcStarSpin 3s ease-in-out infinite;
}
.dc-reward-claimed .dc-all-reward-icon {
  animation: none;
}
@keyframes dcStarSpin {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.15); }
}
.dc-all-reward-text {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 900;
  color: #34D399;
  text-shadow: 0 0 16px rgba(16,185,129,0.4);
  letter-spacing: 0.3px;
}
.dc-reward-btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.dc-reward-btn-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #FBBF24;
  line-height: 1.1;
}
.dc-reward-btn-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: rgba(251,191,36,0.65);
}
.dc-all-time {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.dc-all-time strong {
  color: #FBBF24;
  font-size: 18px;
}
.dc-all-comeback {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 28px;
}
.dc-all-back-btn {
  width: 100%;
  font-size: 16px !important;
  padding: 16px 28px !important;
}

/* ── BACK CONFIRM ────────────────────────────────────────────── */
.dc-back-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}
.dc-back-card {
  background: linear-gradient(145deg, #1a1a2e, #16213e);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  padding: 36px 24px;
  max-width: 340px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.dc-back-icon { font-size: 48px; margin-bottom: 12px; }
.dc-back-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
}
.dc-back-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.5;
  margin-bottom: 24px;
}
.dc-back-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dc-back-leave {
  background: linear-gradient(135deg, rgba(239,68,68,0.85), rgba(220,38,38,0.85)) !important;
  border-color: transparent !important;
}
