/* 미션 그래프 스타일 */
.mission-graph-title {
  color: #000;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 5px;
}

.mission-graph {
  width: 100%;
  min-width: 0;
  min-height: 270px;
  line-height: 1.5;
  text-align: center;
  background: #f8f9fa;
  border-radius: 18px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.1);
  padding: 18px 8px 16px 8px;
  margin-bottom: 22px;
  position: relative;
  color: #222;
  transition: box-shadow 0.2s;
}

.mission-graph:hover {
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.circle-progress {
  width: 100%;
  margin: 0 auto;
  position: relative;
}

.circle-progress svg {
  width: 100%;
  height: 100%;
  max-width: 168px;
  max-height: 168px;
  transform: rotate(-90deg);
}

.circle-progress .done {
  color: #0066cc;
}

.circle-progress .label {
  position: absolute;
  top: 132px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8em;
  color: #888;
  font-weight: 400;
  z-index: 10;
  text-align: center;
  width: 100%;
}

.circle-progress .value {
  position: absolute;
  top: 112px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85em;
  color: #666;
  font-weight: 500;
  z-index: 10;
  text-align: center;
  width: 100%;
}

.circle-progress .value.done {
  color: #22b573;
  font-weight: 600;
}

.circle-progress .status {
  font-size: 1em;
  font-weight: bold;
  margin-top: 0;
  color: #0066cc;
}

.circle-progress .status.done {
  color: #22b573 !important;
  font-weight: bold;
}

.circle-progress .status.ing {
  color: #e67e22;
}

.circle-progress .status.zero {
  color: #444;
}

/* 미션 상단 UI (메타바, 스텝, 카운트다운) 스타일 */
.mission-meta-bar {
  padding: 18px 0;
  border-radius: 8px;
}

.mission-meta-dates {
  max-width: 320px;
  margin: 0 auto;
  font-size: 1.06em;
  color: #222;
  font-weight: 500;
}

.mission-step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  padding: 0 2px;
}

.mission-step {
  line-height:1.4;
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 2px 6px 2px;
  min-width: 0;
  position: relative;
  align-self: flex-start;
}

.mission-step:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -75px;
  top: 34px;
  transform: translateY(-50%);
  width: 140px;
  height: 8px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 5px;
  z-index: -1;
}

.mission-step-received-label {
  color: #22b573;
  font-weight: bold;
  font-size: 0.95em;
  position: absolute;
  left: 0;
  right: 0;
  top: -22px;
  z-index: 3;
  text-align: center;
}

.mission-step-received-label span {
  font-size: 1.1em;
  vertical-align: middle;
}

.mission-step img {
  position: relative;
  width: 38px;
  height: auto;
  border-radius: 50%;
  transition: filter 0.2s, opacity 0.2s, box-shadow 0.2s;
  z-index: 2;
}

.mission-step.not-done img {
  filter: grayscale(1);
  opacity: 0.9;
  box-shadow: none;
}

.mission-step.done img {
  filter: none;
  opacity: 1;
  box-shadow: 0 0 0 4px #ffe066, 0 0 12px 4px #ffe06680;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    box-shadow: 0 0 0 4px #ffe066, 0 0 12px 4px #ffe06680;
  }
  50% {
    box-shadow: 0 0 0 6px #ffe066, 0 0 20px 8px #ffe066, 0 0 30px 12px #ffe06660;
  }
}

.mission-step .mission-step-label {
  font-size: 0.95em;
  color: #222;
  margin-bottom: 0;
}

.mission-step .mission-step-amount {
  font-size: 0.98em;
  color: #0066cc;
  font-weight: 600;
  margin-top: 5px;
}

.mission-step .mission-step-status {
  font-size: 1.1em;
  margin-bottom: 0;
  color: #222;
}

.mission-step .mission-step-status.done {
  color: #22b573 !important;
  font-weight: bold;
}

.mission-step .bt-xs {
  font-size: 11px;
  padding: 4px 12px;
  border: 0;
  border-radius: 6px;
  background: #f8f9fa;
  color: #fff;
  margin-top: 2px;
  transition: background 0.2s, color 0.2s;
}

.mission-step .bt-xs.bt-primary {
  background: #0066cc;
  color: #fff;
  cursor: pointer;
}
.mission-step .bt-xs.bt-primary:hover {
  background: #0052a3;
}
.mission-remaining-time {
  color: #222;
  text-align: center;
  margin-top: 10px;
}
.mission-remaining-label i {
  width: 22px;
  height: auto;
  vertical-align: middle;
  margin-right: 4px;
}
.mission-remaining-count {
  font-size: 1.25em;
  color: #dc3545;
  font-weight: 600;
  margin-left: 8px;
}

/* 미션 라벨 버튼 스타일 */
.mission-label-btn {
  position: relative;
  margin-top: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
  z-index: 10;
  min-width: 120px;
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.mission-label-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.mission-label-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.mission-label-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2), 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* SVG 그래프 크기 20% 증가 */
.circle-progress svg {
  max-width: 168px !important;
  max-height: 168px !important;
}

/* circle-progress 내 텍스트 요소들 스타일 */
.circle-progress .percent-text {
  position: absolute;
  top: 65px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.3em;
  font-weight: bold;
  color: #222;
  z-index: 10;
}

.circle-progress .value {
  position: absolute;
  top: 90px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8em;
  color: #666;
  font-weight: 500;
  z-index: 10;
  text-align: center;
  width: 100%;
}

.circle-progress .value.done {
  color: #22b573;
  font-weight: 600;
}

.circle-progress .label {
  position: absolute;
  top: 132px;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.8em;
  color: #888;
  font-weight: 400;
  z-index: 10;
  text-align: center;
  width: 100%;
}

/* 미션 상태 텍스트 스타일 */
.mission-status {
  text-align: center;
  margin-top: 6px;
  font-size: 0.8em;
  font-weight: 400;
  padding: 3px 6px;
  border-radius: 12px;
  display: inline-block;
  margin-left: auto;
  margin-right: auto;
  min-width: 60px;
}

.mission-status.done {
  background: rgba(34, 181, 115, 0.1);
  color: #22b573;
  border: 1px solid rgba(34, 181, 115, 0.3);
}

.mission-status.ing {
  background: rgba(230, 126, 34, 0.1);
  color: #e67e22;
  border: 1px solid rgba(230, 126, 34, 0.3);
}

.mission-status.zero {
  background: rgba(149, 165, 166, 0.1);
  color: #95a5a6;
  border: 1px solid rgba(149, 165, 166, 0.3);
}

/* 미션 상태에 따른 버튼 색상 변경 */
.mission-graph .circle-progress[data-status="done"] + .mission-label-btn {
  background: linear-gradient(135deg, #22b573 0%, #1a9f5f 100%);
  box-shadow: 0 2px 8px rgba(34, 181, 115, 0.3);
}

.mission-graph .circle-progress[data-status="done"] + .mission-label-btn:hover {
  background: linear-gradient(135deg, #1a9f5f 0%, #22b573 100%);
  box-shadow: 0 4px 12px rgba(34, 181, 115, 0.4);
}

.mission-graph .circle-progress[data-status="ing"] + .mission-label-btn {
  background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
  box-shadow: 0 2px 8px rgba(230, 126, 34, 0.3);
}

.mission-graph .circle-progress[data-status="ing"] + .mission-label-btn:hover {
  background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
  box-shadow: 0 4px 12px rgba(230, 126, 34, 0.4);
}

.mission-graph .circle-progress[data-status="zero"] + .mission-label-btn {
  background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
  box-shadow: 0 2px 8px rgba(149, 165, 166, 0.3);
}

.mission-graph .circle-progress[data-status="zero"] + .mission-label-btn:hover {
  background: linear-gradient(135deg, #7f8c8d 0%, #95a5a6 100%);
  box-shadow: 0 4px 12px rgba(149, 165, 166, 0.4);
}

/* PC 반응형 스타일 */
@media (min-width: 1201px) {
  .mission-graph {
    width: 100%;
    min-height: 300px;
    padding: 24px 12px 20px 12px;
  }
  
  .mission-label-btn {
    font-size: 0.9em;
    padding: 8px 20px;
    min-width: 140px;
  }
  
  .circle-progress svg {
    max-width: 168px !important;
    max-height: 168px !important;
  }
  
  .circle-progress .percent-text {
    top: 65px;
    font-size: 1.4em;
  }
  
  .circle-progress .value {
    top: 90px;
    font-size: 0.8em;
  }
  
  .circle-progress .label {
    top: 140px;
    font-size: 0.85em;
  }
  
  .mission-step-bar {
    gap: 12px;
  }
  
  .mission-step {
    padding: 10px 4px 8px 4px;
  }
  
  .mission-step img {
    width: 44px;
  }
}

/* 태블릿 반응형 스타일 */
@media (max-width: 1200px) {
  .mission-graph {
    width: 100%;
  }
}

/* 모바일 반응형 스타일 */
@media (max-width: 900px) {
  .mission-graph {
    width: 100%;
    min-width: 0;
  }
  .mission-label-btn {
    font-size: 0.85em;
    padding: 6px 12px;
    min-width: 100px;
  }
  .mission-status {
    font-size: 0.8em;
    padding: 3px 6px;
  }
  .circle-progress svg {
    max-width: 150px !important;
    max-height: 150px !important;
  }
  .circle-progress .percent-text {
    top: 75px;
    font-size: 1.2em;
  }
  .circle-progress .value {
    top: 100px;
    font-size: 0.8em;
  }
  .circle-progress .label {
    top: 118px;
    font-size: 0.75em;
  }

  .mission-step {
    min-width: 0;
    width: 100%;
    padding: 6px 1px 5px 1px;
  }
  .mission-step:not(:last-child)::after {
    right: -50px;
    top: 20px;
    width: 80px;
    height: 6px;
  }  
  .mission-step .mission-step-label {
    font-size: 0.85em;
  }
  .mission-step .mission-step-amount {
    font-size: 0.85em;
  }
  .mission-step .mission-step-status {
    font-size: 0.95em;
  }
  .mission-step .bt-xs {
    font-size: 10px;
    padding: 3px 8px;
  }

  .mission-meta-dates {
    max-width: 270px;
    font-size: 0.9em;
    margin-bottom: 25px;
  }
  .mission-remaining-time {
    font-size: 0.9em;
  }

  .mission-step img {
    width: 28px;
  }  
  .mission-step.done img {
    box-shadow: 0 0 0 2px #ffe066, 0 0 8px 2px #ffe06680;
  }    
}

@media (max-width: 600px) {
  .mission-step-bar {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 4px;
    flex-wrap: unset !important;
  }  
  .mission-graph {
    width: 100%;
    min-width: 0;
    min-height: 250px;
    padding: 20px 10px 15px 10px;    
  }
  .mission-label-btn {
    font-size: 0.8em;
    padding: 5px 10px;
    min-width: 90px;
  }
  .mission-status {
    font-size: 0.75em;
    padding: 2px 5px;
  }
  .circle-progress svg {
    max-width: 130px !important;
    max-height: 130px !important;
  } 
  .circle-progress .percent-text {
    top: 45px;
    margin-left: 3px;
  }
  .circle-progress .value {
    top: 65px;
    margin-left: 3px;
  }
  .circle-progress .label {
    top: 99px;
    margin-left: 3px;
  }
  .mission-step-bar {
    gap: 2px;
  }
  .mission-step {
    padding: 5px 0 4px 0;
  }

  .mission-step:not(:last-child)::after {
    right: -65px;
    top: 20px;
    width: 120px;
    height: 6px;
  }
  .mission-step:nth-child(4)::after {
    display: none;
  }  
}

@media (max-width: 399px) { 
  .mission-step:not(:last-child)::after {
    right: -50px;
    top: 20px;
    width: 80px;
    height: 6px;
  }
}