/* ════════════════════════════════════════════════════════
   DAILY CHECK-IN — daily.css
   ════════════════════════════════════════════════════════ */

/* ── CHIP trong bottom-bar ─────────────────────────────── */
#daily-chip {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; padding: 0 4px;
  background: none; border: none; color: inherit;
  font-family: "Poppins", sans-serif; transition: opacity .2s;
}
#daily-chip:hover { opacity: .8; }

.dc-chip-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,.25); flex-shrink: 0; transition: background .4s;
}
#daily-chip.dc-chip-ready .dc-chip-dot {
  background: #4ade80;
  box-shadow: 0 0 6px #4ade80, 0 0 12px rgba(74,222,128,.5);
  animation: dcDotPulse 1.4s ease-in-out infinite;
}
@keyframes dcDotPulse {
  0%,100% { box-shadow: 0 0 6px #4ade80, 0 0 12px rgba(74,222,128,.5); }
  50%     { box-shadow: 0 0 10px #4ade80, 0 0 22px rgba(74,222,128,.7); }
}
.dc-chip-svg { width: 24px; height: 24px; color: rgba(255,215,0,.75); flex-shrink: 0; }
.dc-chip-body { display: flex; flex-direction: column; line-height: 1.2; }
.dc-chip-label { font-size: 14.5px; font-weight: 700; color: rgba(255,255,255,.85); letter-spacing: .3px; }
.dc-chip-sub { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.45); transition: color .3s; }
#daily-chip.dc-chip-ready .dc-chip-sub { color: #4ade80; font-weight: 700; }

/* ── OVERLAY ───────────────────────────────────────────── */
#daily-overlay {
  display: none; position: fixed; inset: 0; z-index: 99000;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  align-items: center; justify-content: center;
}
#daily-overlay.show { display: flex; }

/* ── POPUP — hình chữ nhật ngang ───────────────────────── */
#daily-popup {
  position: relative;
  background: linear-gradient(155deg, #0e0c18 0%, #1a1530 55%, #0a0814 100%);
  border: 1px solid rgba(212,175,55,.35);
  border-radius: 16px;
  padding: 22px 22px 20px;
  width: 540px; max-width: 96vw;
  box-shadow: 0 0 0 1px rgba(212,175,55,.08), 0 30px 80px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
  font-family: "Poppins", sans-serif;
  overflow: hidden;
}

/* Confetti */
#dc-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: 16px; z-index: 10; }
.dc-cfp { position: absolute; border-radius: 2px; animation: dcCfFall linear forwards; }
@keyframes dcCfFall {
  0%   { transform: translateY(-10px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(340px) rotate(720deg); opacity: 0; }
}

/* Close */
.dc-x {
  position: absolute; top: 12px; right: 12px;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.45); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, color .2s; z-index: 20;
}
.dc-x:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ── TOP ROW ────────────────────────────────────────────── */
.dc-top-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-right: 30px;
}
.dc-title {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, #ffd700, #fff8a0, #c8960c);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dc-streak-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700;
  background: rgba(255,165,0,.12); border: 1px solid rgba(255,165,0,.3);
  border-radius: 20px; padding: 4px 12px; color: #ffd27a; white-space: nowrap;
}
.dc-streak-pill.dc-broken {
  background: rgba(255,80,80,.1); border-color: rgba(255,80,80,.3); color: #ff9999;
}

/* ── 7-DAY GRID ─────────────────────────────────────────── */
.dc-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 16px; }

.dc-day {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px; transition: transform .2s;
}
.dc-day-name { font-size: 10px; font-weight: 600; color: rgba(255,255,255,.28); letter-spacing: .4px; margin-bottom: 6px; }
.dc-day-num {
  font-size: 34px; font-weight: 800; line-height: 1; margin-bottom: 5px;
  background: linear-gradient(175deg, #fff8dc, #f5d060, #d4a820);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dc-day-sub { font-size: 11px; font-weight: 700; color: rgba(255,215,0,.45); }

/* Done */
.dc-day.dc-done { background: rgba(74,222,128,.09); border-color: rgba(74,222,128,.28); }
.dc-day.dc-done .dc-day-name { color: rgba(74,222,128,.5); }
.dc-day.dc-done .dc-day-num {
  font-size: 28px;
  background: linear-gradient(135deg, #4ade80, #22c55e);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dc-day.dc-done .dc-day-sub { color: rgba(74,222,128,.65); }

/* Today */
.dc-day.dc-today {
  background: rgba(212,175,55,.13); border: 2px solid rgba(212,175,55,.55);
  transform: translateY(-4px); box-shadow: 0 8px 20px rgba(212,175,55,.15);
  animation: dcTodayPulse 2s ease-in-out infinite;
}
.dc-day.dc-today .dc-day-name { color: rgba(255,215,0,.7); font-weight: 800; }
.dc-day.dc-today .dc-day-num {
  font-size: 40px;
  background: linear-gradient(135deg, #ffd700, #fff8a0, #ffd700);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dc-day.dc-today .dc-day-sub { color: #ffd700; font-size: 12px; }
@keyframes dcTodayPulse {
  0%,100% { box-shadow: 0 8px 20px rgba(212,175,55,.15); }
  50%     { box-shadow: 0 10px 28px rgba(212,175,55,.35); }
}

/* Locked */
.dc-day.dc-locked { opacity: .45; }
.dc-day.dc-locked .dc-day-num {
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.1));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.dc-day.dc-locked .dc-day-sub { color: rgba(255,255,255,.15); }

/* ── CLAIM BUTTON ─────────────────────────────────────── */
.dc-btn {
  display: block; width: 100%; padding: 13px;
  border-radius: 26px; font-size: 17px; font-weight: 800;
  cursor: pointer; font-family: "Poppins", sans-serif;
  background: linear-gradient(135deg, #ffd700 0%, #f0a800 50%, #c8800a 100%);
  border: none; color: #1a0f00;
  box-shadow: 0 4px 18px rgba(212,175,55,.4), inset 0 1px 0 rgba(255,255,255,.3);
  transition: transform .15s, box-shadow .15s;
  position: relative; overflow: hidden;
}
.dc-btn::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 55%; height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.28) 50%, transparent 80%);
  animation: dcBtnShimmer 2.2s ease .4s infinite;
}
@keyframes dcBtnShimmer { 0% { left: -100%; } 100% { left: 200%; } }
.dc-btn:hover  { transform: translateY(-2px); box-shadow: 0 6px 26px rgba(212,175,55,.6); }
.dc-btn:active { transform: scale(.97); }

.dc-btn-disabled {
  background: rgba(255,255,255,.07) !important; border: 1px solid rgba(255,255,255,.1) !important;
  color: rgba(255,255,255,.32) !important; box-shadow: none !important;
  cursor: not-allowed !important; transform: none !important;
}
.dc-btn-disabled::after { display: none; }

.dc-btn-claimed {
  background: linear-gradient(135deg, rgba(74,222,128,.22), rgba(34,197,94,.13)) !important;
  border: 1px solid rgba(74,222,128,.38) !important; color: #4ade80 !important;
  box-shadow: 0 0 16px rgba(74,222,128,.18) !important; cursor: default !important;
}
.dc-btn-claimed::after { display: none; }

/* ── MOBILE ───────────────────────────────────────────── */
@media (max-width: 600px) {
  #daily-popup { width: calc(100vw - 20px); padding: 16px 12px 14px; border-radius: 14px; }
  .dc-days { gap: 3px; }
  .dc-day { padding: 7px 2px 8px; border-radius: 8px; }
  .dc-day-num { font-size: 22px; }
  .dc-day.dc-today .dc-day-num { font-size: 26px; }
  .dc-day-name { font-size: 9px; margin-bottom: 4px; }
  .dc-day-sub { font-size: 9px; }
  .dc-title { font-size: 16px; }
  .dc-streak-pill { font-size: 11px; padding: 3px 9px; }
  .dc-btn { font-size: 15px; padding: 12px; }
}
