/* 추가 스타일 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.gifticon-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gifticon-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.gifticon-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* 만료 임박 카드 - 빨간색 글로우 */
.gifticon-card.expiring-soon {
  animation: red-glow 2s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.6);
}

@keyframes red-glow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
  }
  50% {
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.8);
  }
}

/* D-day 배지 */
.dday-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: bold;
}

.dday-badge.urgent {
  background: rgba(239, 68, 68, 0.9);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* 사용일자 배지 */
.used-date-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
}

/* 활성 기프티콘 이미지 모달 */
#imageModal img {
  max-height: 70vh;
  object-fit: contain;
}

/* 사용완료 기프티콘 이미지 모달 - 버튼이 항상 보이도록 */
#usedImageModal {
  overflow-y: auto;
}

#usedImageModal .max-w-4xl {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

#usedImageModal img {
  max-height: 60vh;
  object-fit: contain;
  flex-shrink: 0;
}

/* 모바일 대응 - 화면 높이 */
@media (max-height: 700px) {
  #imageModal img {
    max-height: 55vh;
  }
  
  #usedImageModal img {
    max-height: 45vh;
  }
}

/* 모바일 대응 - 버튼 크기 조정 */
@media (max-width: 640px) {
  /* 모달 버튼들 */
  #imageModal button,
  #usedImageModal button {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.8rem !important;
  }
  
  /* 버튼 갭 줄이기 */
  #imageModal .flex,
  #usedImageModal .flex {
    gap: 0.5rem !important;
  }
}

/* 작은 모바일 (360px 이하) */
@media (max-width: 360px) {
  #imageModal button,
  #usedImageModal button {
    padding: 0.5rem 0.5rem !important;
    font-size: 0.75rem !important;
  }
}

/* 로딩 스피너 */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
