/* HealthMaster - 自定義樣式 */

* {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* 平滑滾動 */
html {
  scroll-behavior: smooth;
}

/* 自定義滾動條 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #1F2937;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

/* 自定義滾動條 - 精簡版（用於小容器） */
.custom-scrollbar::-webkit-scrollbar {
  width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #4B5563;
  border-radius: 2px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

/* 按鈕懸浮效果 */
button {
  transition: all 0.2s ease;
}

button:active {
  transform: scale(0.98);
}

/* 輸入框焦點效果 */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 卡片懸浮效果 */
.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 動畫 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.3s ease;
}

/* 脈衝動畫 */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* 導航項目活動狀態 */
.nav-item.active {
  background-color: #3B82F6;
  color: white;
}

/* 健康指標徽章 */
.health-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* 進度條動畫 */
.progress-bar {
  transition: width 0.5s ease;
}

/* 模態框遮罩動畫 */
@keyframes fadeInModal {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-backdrop {
  animation: fadeInModal 0.2s ease;
}

/* 通知滑入動畫 */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

#notificationContainer > div {
  animation: slideInRight 0.3s ease;
}

/* 載入旋轉 */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

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

/* 響應式調整 */
@media (max-width: 768px) {
  .sidebar {
    width: 100%;
    height: auto;
  }
  
  .main-content {
    margin-left: 0;
  }
}

/* 打印樣式 */
@media print {
  nav,
  button,
  .no-print {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* 可訪問性 - 焦點可見性 */
*:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}