/* 近所探検ミッション カスタムスタイル */

/* PWAアニメーション */
@keyframes pulse {
  0% { 
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); 
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* スタンプ獲得アニメーション */
@keyframes stampBounce {
  0% { 
    transform: scale(0) rotate(-180deg); 
  }
  50% { 
    transform: scale(1.2) rotate(10deg); 
  }
  100% { 
    transform: scale(1) rotate(0deg); 
  }
}

.stamp-animation {
  animation: stampBounce 0.8s ease-out;
}

/* グラデーション背景 */
.bg-gradient-custom {
  background: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
}

/* ミッションカード */
.mission-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 2px solid #dcfce7;
  transition: all 0.3s ease;
}

.mission-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15);
}

/* チェックインボタン */
.checkin-button {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  font-size: 18px;
  font-weight: 600;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.checkin-button:disabled {
  background: #d1d5db;
  cursor: not-allowed;
}

.checkin-button:not(:disabled):hover {
  transform: scale(1.05);
}

/* ローディングスピナー */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.fa-spin {
  animation: spin 1s linear infinite;
}

/* カテゴリバッジ */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

.category-history {
  background-color: #fef3c7;
  color: #92400e;
}

.category-park {
  background-color: #d1fae5;
  color: #065f46;
}

.category-shopping {
  background-color: #ddd6fe;
  color: #5b21b6;
}

.category-food {
  background-color: #fed7d7;
  color: #c53030;
}

.category-culture {
  background-color: #bfdbfe;
  color: #1e40af;
}

/* 統計カード */
.stat-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .mission-card {
    margin: 0 -1rem;
    border-radius: 0;
  }
  
  .checkin-button {
    width: 100%;
    padding: 16px;
  }
}

/* PWA固有のスタイル */
@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ダークモード対応 */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1f2937;
    --text-primary: #f9fafb;
    --bg-secondary: #374151;
  }
  
  .mission-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
  
  .stat-card {
    background: var(--bg-secondary);
    color: var(--text-primary);
  }
}

/* スクロールバー のカスタマイズ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #22c55e;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #16a34a;
}

/* アクセシビリティ改善 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* フォーカス表示 */
button:focus,
input:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}

/* 高コントラストモード対応 */
@media (prefers-contrast: high) {
  .mission-card {
    border-width: 3px;
    border-color: #000;
  }
  
  .checkin-button {
    border: 2px solid #000;
  }
}

/* 動きを抑えるユーザー向け */
@media (prefers-reduced-motion: reduce) {
  .pulse,
  .stamp-animation,
  .mission-card,
  .stat-card,
  .checkin-button {
    animation: none;
    transition: none;
  }
}

/* 印刷時のスタイル */
@media print {
  .checkin-button,
  .pulse,
  .stamp-animation {
    display: none;
  }
  
  .mission-card {
    box-shadow: none;
    border: 1px solid #000;
  }
}