/* Layout Container */
.challenge-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 1rem;
  font-family: 'Noto Sans JP', sans-serif;
  color: #333;
}

/* Hero Section */
.challenge-hero {
  text-align: center;
  margin-bottom: 2rem;
}
.challenge-hero .badge {
  background-color: #e0f2fe;
  color: #0284c7;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
}
.challenge-hero h1 {
  font-size: 2rem;
  margin: 0.5rem 0;
  color: #0f172a;
}
.challenge-hero p {
  color: #64748b;
  font-size: 0.95rem;
}

/* Cards Shared Styling */
.summary-card, .form-card, .grid-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

/* User Profile & Summary Bar */
.summary-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.user-id-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user-id-group label {
  font-weight: 700;
  font-size: 0.9rem;
}
.user-id-group input {
  width: 100px;
  padding: 0.5rem;
  font-size: 1.1rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
}

.stats-group {
  display: flex;
  gap: 1.5rem;
}
.stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.stat-label {
  font-size: 0.75rem;
  color: #64748b;
}
.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0284c7;
}
.status-pending {
  color: #eab308;
  font-weight: 700;
}
.status-done {
  color: #16a34a;
  font-weight: 700;
}

/* Form Styling */
.form-card h2, .grid-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #1e293b;
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}
.required {
  color: #ef4444;
}
.form-group select, .form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.btn-primary {
  width: 100%;
  padding: 0.85rem;
  background-color: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.btn-primary:hover {
  background-color: #0369a1;
}
.btn-primary:disabled {
  background-color: #94a3b8;
  cursor: not-allowed;
}

/* Calendar Grid */
.grid-subtitle {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.75rem;
}

.streak-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 0.5rem;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background-color: #f8fafc;
  min-height: 80px;
  text-align: center;
}
.streak-card .day-num {
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.streak-card .pts {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0284c7;
}

/* Card States */
.streak-card.completed {
  background-color: #f0fdf4;
  border-color: #86efac;
}
.streak-card.completed .check-icon {
  color: #16a34a;
  font-size: 1.2rem;
  font-weight: bold;
}

.streak-card.active-today {
  background-color: #fefce8;
  border: 2px solid #eab308;
  animation: pulse 2s infinite;
}
.streak-card.active-today .target-label {
  font-size: 0.75rem;
  background-color: #eab308;
  color: #fff;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.streak-card.locked {
  opacity: 0.6;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.4); }
  70% { box-shadow: 0 0 0 8px rgba(234, 179, 8, 0); }
  100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}