body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    background-color: #f9fafb;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-y: auto;
}

/* 应用容器 */
#app {
    width: 100%;
    min-height: 100vh;
    margin: 0 auto;
    position: relative;
    overflow: visible;
    background-color: #f9fafb;
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 4px;
}

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

::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 环形图表 */
.circular-chart {
    display: block;
    width: 100%;
    height: 100%;
}

.circle-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2.8;
}

.circle {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.8;
    stroke-linecap: round;
}

.percentage {
    fill: #ffffff;
    font-size: 5px;
    text-anchor: middle;
    font-weight: bold;
}

/* 确保主内容区域有足够的底部内边距，避免被导航栏覆盖 */
main {
    padding-bottom: 80px;
}

/* 修复底部导航栏 */
nav.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: white;
    border-top: 1px solid #e5e7eb;
    padding: 8px;
}

/* 优化图表显示 */
canvas {
    max-width: 100%;
}

/* 添加内容容器填充高度样式 */
.content-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-y: visible;
}

/* 确保主内容区域占据剩余空间 */
.content-container main {
    flex: 1;
    overflow-y: visible;
}

/* 添加快速操作按钮样式 */
.action-button {
    position: fixed;
    bottom: 70px;
    right: 16px;
    width: 56px;
    height: 56px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 40;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.action-button:active {
    transform: scale(0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* 浮动菜单样式 */
.floating-menu {
    position: fixed;
    bottom: 138px; /* 加号按钮高度+间距 */
    right: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    z-index: 39;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-menu.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.menu-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    transform: translateX(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-menu.active .menu-item {
    transform: translateX(0);
    opacity: 1;
}

.floating-menu.active .menu-item:nth-child(1) {
    transition-delay: 0.05s;
}

.floating-menu.active .menu-item:nth-child(2) {
    transition-delay: 0.1s;
}

.floating-menu.active .menu-item:nth-child(3) {
    transition-delay: 0.15s;
}

.floating-menu.active .menu-item:nth-child(4) {
    transition-delay: 0.2s;
}

.menu-label {
    padding: 8px 16px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    margin-right: 12px;
    white-space: nowrap;
}

.menu-icon {
    width: 46px;
    height: 46px;
    border-radius: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 覆盖层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 30;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 按钮旋转动画 */
.action-button i {
    transition: transform 0.3s ease;
}

.action-button.active i {
    transform: rotate(45deg);
}

/* 路由过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}

/* 导航链接样式 */
.nav-item {
    position: relative;
    color: #6B7280;
    transition: color 0.3s ease;
}

.nav-item.router-link-active {
    color: #4F46E5;
}

/* Vue过渡动画 */
.menu-item-enter-active, 
.menu-item-leave-active {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.menu-item-enter-from, 
.menu-item-leave-to {
    opacity: 0;
    transform: translateX(20px);
}

/* 页面内容区域 */
.page-content {
    padding-bottom: 70px;
}

/* 健康图表容器 */
.chart-container {
    position: relative;
    height: 160px;
    width: 100%;
}

/* 添加开关组件样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input { 
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
}

input:checked + .slider {
  background-color: #4f46e5;
}

input:focus + .slider {
  box-shadow: 0 0 1px #4f46e5;
}

input:checked + .slider:before {
  -webkit-transform: translateX(24px);
  -ms-transform: translateX(24px);
  transform: translateX(24px);
}

/* 圆形滑块 */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

/* 添加选项卡相关样式 - 与health-tracking页面保持一致 */
/* 选项卡导航固定样式 */
.tabs-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* 内容区域样式 */
.tab-content {
  padding-top: 1rem;
}

/* 选项卡导航链接样式 */
.tab-link {
  white-space: nowrap;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.tab-link:hover {
  color: #4F46E5;
}

/* 呼吸引导动画 */
.breathing-animation {
    transition: transform 3s ease, box-shadow 3s ease;
}

.breathing-pulse {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(66, 153, 225, 0.5);
}

/* 隐藏水平滚动条但允许滚动 */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE 和 Edge */
    scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none; /* Chrome, Safari 和 Opera */
}

/* 直播卡片阴影效果 */
.live-card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.live-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
} 