/* カスタムスタイル */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 名言セクション用フォント */
.quote-text {
  font-family: 'Noto Serif JP', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.8;
}

.quote-author {
  font-family: 'Zen Kaku Gothic New', sans-serif;
  font-weight: 500;
}

/* アニメーション */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ホバーエフェクト */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* カードのアニメーション */
.card-animate {
  animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ボタンのローディング状態 */
.btn-loading {
  position: relative;
  color: transparent;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* フォームのスタイル改善 */
input[type="radio"] {
  transform: scale(1.2);
  margin-right: 8px;
}

input[type="radio"]:checked {
  accent-color: #3b82f6;
}

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

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .text-4xl {
    font-size: 2.5rem;
  }
  
  .grid-cols-3 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
  }
  
  .md\\:grid-cols-2 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  
  .flex.space-x-4 {
    flex-direction: column;
    space-y: 0.5rem;
  }
  
  .flex.space-x-4 > * + * {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}

/* アクセシビリティ */
.focus\\:ring-2:focus {
  outline: 2px solid transparent;
  outline-offset: 2px;
  ring-width: 2px;
  ring-color: #3b82f6;
}

/* Screen reader only - 視覚的に非表示だがアクセシブル */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* グラデーション背景の改善 */
.bg-gradient-to-br {
  background-size: 400% 400%;
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* カードの影の改善 */
.shadow-lg {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-xl {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* テキストの読みやすさ改善 */
.text-gray-700 {
  line-height: 1.7;
}

.text-lg {
  line-height: 1.6;
}

/* バックドロップブラーの改善 */
.backdrop-blur {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* チェックリストページ専用スタイル */
.checklist-question {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: #f8fafc;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
}

.checklist-question:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.question-section {
  position: relative;
}

/* ポジティブ質問のスタイル */
.question-section_p {
  border-left: 4px solid #10b981 !important;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
}

.question-section_p:hover {
  background: linear-gradient(135deg, #dcfce7 0%, #ecfdf5 100%);
}

/* ネガティブ質問のスタイル */
.question-section_n {
  border-left: 4px solid #FF7F00 !important;
  background: linear-gradient(135deg, #fff7ed 0%, #fef3c7 100%);
}

.question-section_n:hover {
  background: linear-gradient(135deg, #fed7aa 0%, #fde68a 100%);
}

.question-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.checklist-options {
  display: grid;
  gap: 0.75rem;
}

.checklist-option {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.checklist-option:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
  transform: translateY(-1px);
}

.checklist-option input[type="radio"] {
  margin-right: 0.75rem;
  transform: scale(1.3);
}

.checklist-option input[type="radio"]:checked {
  accent-color: #3b82f6;
}

.checklist-option:has(input[type="radio"]:checked) {
  border-color: #3b82f6;
  background-color: #eff6ff;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.checklist-option span {
  flex: 1;
  color: #374151;
  font-weight: 500;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .checklist-question {
    padding: 1rem;
    margin-bottom: 1.5rem;
  }
  
  .question-text {
    font-size: 1rem;
  }
  
  .checklist-option {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }
  
  .checklist-option input[type="radio"] {
    transform: scale(1.2);
    margin-right: 0.5rem;
  }
}

/* アニメーション効果 */
.checklist-question {
  animation: slideInUp 0.5s ease-out;
}

.checklist-question:nth-child(even) {
  animation-delay: 0.1s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Notification animations */
.animate-fade-in {
  animation: fadeInSlide 0.5s ease-out forwards;
}

.animate-fade-out {
  animation: fadeOutSlide 0.3s ease-in forwards;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeOutSlide {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
}

/* Notification card styles */
.notification-card {
  transition: all 0.3s ease;
}

.notification-card:hover {
  box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Toast notification styles */
.animate-slide-down {
  animation: slideDown 0.3s ease-out forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* Highlight flash animation for recent records */
.highlight-flash {
  animation: highlightFlash 2s ease-in-out;
  border: 2px solid #10b981 !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2) !important;
}

@keyframes highlightFlash {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(16, 185, 129, 0.1);
  }
}