/* ============================================================================
   Daily Challenge Modal Styles
   ============================================================================ */

/* Overlay */
.dc-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.dc-overlay.dc-visible {
  opacity: 1;
  pointer-events: auto;
}

/* Modal */
.dc-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 1rem;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.dc-overlay.dc-visible .dc-modal {
  transform: translateY(0);
}

/* Header */
.dc-header {
  padding: 1.5rem 1.5rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-soft);
}

.dc-header h2 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--text-main);
  margin: 0 0 0.25rem;
}

.dc-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

.dc-streak {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--status-warning-soft);
  color: var(--streak-amber);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Close button */
.dc-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.dc-close-btn:hover {
  color: var(--text-main);
}

/* Card area */
.dc-body {
  padding: 1.5rem;
  position: relative;
}

.dc-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dc-progress-track {
  flex: 1;
  height: 6px;
  background: var(--border-soft);
  border-radius: 3px;
  margin: 0 0.75rem;
  overflow: hidden;
}

.dc-progress-fill {
  height: 100%;
  background: var(--status-info);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.dc-card-module {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dc-card-question {
  font-size: 1.05rem;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 1rem;
  min-height: 3rem;
}

.dc-card-answer {
  background: var(--bg-primary);
  border: 1px solid var(--border-soft);
  border-radius: 0.5rem;
  padding: 1rem;
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
  margin-bottom: 1rem;
}

.dc-card-answer.dc-revealed {
  display: block;
}

/* Buttons */
.dc-btn-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.dc-btn {
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.dc-btn:active {
  transform: scale(0.97);
}

.dc-btn-show {
  background: var(--status-info);
  color: #fff;
  width: 100%;
}

.dc-btn-show:hover {
  background: var(--status-info);
}

.dc-btn-right {
  background: var(--status-success);
  color: #fff;
  flex: 1;
}

.dc-btn-right:hover {
  background: var(--status-success);
}

.dc-btn-wrong {
  background: var(--status-error);
  color: #fff;
  flex: 1;
}

.dc-btn-wrong:hover {
  background: var(--status-error);
}

.dc-rating-row {
  display: none;
}

.dc-rating-row.dc-active {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

/* Results */
.dc-results {
  text-align: center;
  padding: 1rem 0;
}

.dc-results-score {
  font-family: 'Fraunces', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.dc-results-label {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.dc-results-message {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.dc-results-streak {
  color: var(--streak-amber);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.dc-btn-dismiss {
  background: var(--bg-primary);
  color: var(--text-main);
  border: 1px solid var(--border-soft);
  padding: 0.6rem 2rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  cursor: pointer;
  font-weight: 500;
}

.dc-btn-dismiss:hover {
  background: var(--bg-accent);
}

/* Banner (when challenge is available but not yet started) */
.dc-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: var(--bg-secondary);
  border: 1px solid var(--status-info);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  max-width: 340px;
}

.dc-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.dc-banner-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.dc-banner-text {
  flex: 1;
}

.dc-banner-title {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
  margin-bottom: 0.15rem;
}

.dc-banner-desc {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.dc-banner-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.dc-banner-close:hover {
  color: var(--text-main);
}

/* Responsive */
@media (max-width: 500px) {
  .dc-modal {
    max-width: 100%;
    border-radius: 0.75rem;
  }

  .dc-banner {
    left: 1rem;
    right: 1rem;
    max-width: none;
    bottom: 1rem;
  }
}
