/* ===== 30-DAY CHALLENGE ===== */

.c30-main { padding: 2rem 0 5rem; }

/* ---- Progress ---- */
.c30-progress-wrap {
  max-width: 680px;
  margin: 0 auto 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.c30-progress-bar {
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
}

.c30-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.6s ease;
}

.c30-progress-text { font-size: 0.8rem; color: var(--muted); text-align: right; }

/* ---- Day grid ---- */
.c30-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.7rem;
  max-width: 760px;
  margin: 0 auto;
}

.c30-day-card {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.18s;
  user-select: none;
}

.c30-day-card:hover:not(.locked) {
  transform: scale(1.05);
  border-color: rgba(139,124,248,0.4);
  box-shadow: var(--glow);
}

.c30-day-card.done {
  border-color: rgba(92,232,212,0.4);
  background: rgba(92,232,212,0.06);
}

.c30-day-card.locked {
  opacity: 0.35;
  cursor: not-allowed;
}

.c30-day-card.today:not(.done) {
  border-color: rgba(139,124,248,0.5);
  box-shadow: 0 0 14px rgba(139,124,248,0.15);
}

.c30-day-num {
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.c30-day-icon { font-size: 1.4rem; line-height: 1; }

.c30-day-check {
  font-size: 0.8rem;
  color: var(--accent2);
}

/* ---- Modal ---- */
.c30-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4,4,13,0.8);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.c30-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 1.8rem;
  max-width: 420px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  animation: c30FadeIn 0.3s ease;
}

@keyframes c30FadeIn {
  from { opacity:0; transform: scale(0.93); }
  to   { opacity:1; transform: scale(1); }
}

.c30-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
  line-height: 1;
}

.c30-modal-close:hover { color: var(--text); }

.c30-modal-day {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.c30-modal-icon { font-size: 2.8rem; }

.c30-modal-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
}

.c30-modal-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.65; }

.c30-modal-link-wrap a {
  color: var(--accent);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---- Reset ---- */
.c30-reset-row {
  max-width: 760px;
  margin: 2rem auto 0;
  text-align: center;
}

.c30-reset-btn { font-size: 0.8rem; opacity: 0.6; }
.c30-reset-btn:hover { opacity: 1; }

@media (max-width: 500px) {
  .c30-grid { grid-template-columns: repeat(5, 1fr); }
  .c30-day-icon { font-size: 1.1rem; }
}
