/* ============================================
   CHALLENGE DOWNLOAD MODAL
   ============================================ */

/* Overlay */
.challenge-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.challenge-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.challenge-modal {
  background: white;
  border-radius: var(--radius-lg);
  max-width: 360px;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s ease;
}

.challenge-modal-overlay.active .challenge-modal {
  transform: scale(1) translateY(0);
}

/* Header */
.challenge-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--coral) 0%, #FF8A80 100%);
}

.challenge-modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: white;
  margin: 0;
}

.challenge-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: white;
}

.challenge-modal-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
}

/* Content */
.challenge-modal-content {
  padding: 15px;
}

.challenge-modal-label {
  font-size: 0.8rem;
  color: #888;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* File List */
.challenge-file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.challenge-file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f5f5f5;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.challenge-file-item:hover {
  background: #e8f5e9;
  border-color: var(--teal);
  transform: translateX(5px);
}

.challenge-file-icon {
  font-size: 1.3rem;
}

.challenge-file-name {
  flex: 1;
  font-weight: 700;
  color: var(--dark-blue);
}

.challenge-file-download {
  font-size: 1.2rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.challenge-file-item:hover .challenge-file-download {
  opacity: 1;
}

/* Footer hint */
.challenge-modal-hint {
  text-align: center;
  padding: 12px 15px;
  background: #f9f9f9;
  font-size: 0.8rem;
  color: #888;
}

/* Mobile */
@media (max-width: 500px) {
  .challenge-modal {
    max-width: 100%;
    margin: 10px;
  }
  
  .challenge-modal-header {
    padding: 15px;
  }
  
  .challenge-modal-title {
    font-size: 1.1rem;
  }
}
