@import "tailwindcss";
@plugin "@tailwindcss/typography";
@reference "tailwindcss";

/* 使用系统字体，避免外网字体在部分地区不可访问 */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100%;
}

/* 全屏统一背景（保留） */
.app-bg {
  position: fixed;
  inset: 0;
  z-index: -10;
  pointer-events: none;
  background-color: #ffffff;
  background-image:
          radial-gradient(1200px 600px at 50% -10%, rgba(244, 114, 182, 0.25), rgba(244, 114, 182, 0) 60%),
          linear-gradient(to bottom, #fff1f2 0%, #fafafa 55%, #eef2ff 100%);
  background-repeat: no-repeat;
  background-size: cover, 100% 100%;
  background-attachment: fixed;
}

/* 组件层 */
@layer components {
  .btn-pink {
    @apply inline-flex items-center justify-center px-4 py-2 rounded-full bg-pink-600 text-white font-semibold shadow
    hover:bg-pink-700 focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-offset-2
    transition disabled:opacity-50 disabled:cursor-not-allowed;
  }

  .btn-primary {
    @apply inline-flex items-center justify-center px-6 py-3 rounded-full bg-pink-600 text-white font-semibold shadow
    hover:bg-pink-700 focus:outline-none focus:ring-2 focus:ring-pink-500 focus:ring-offset-2
    transition disabled:opacity-50 disabled:cursor-not-allowed;
  }

  /* 恢复布局与间距：只在这里清除背景，其他用 Tailwind 布局 */
  .dashboard-container {
    @apply min-h-screen flex flex-col gap-8 px-3 sm:px-0;  /* 增加移动端水平内边距 */
    background-image: none !important;
    background-color: transparent !important;
  }

  .dashboard-title-section {
    text-align: center;
    padding: 0;
  }

  .dashboard-card {
    position: relative; /* 不设置 z-index，避免遮住 sticky header */
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 2rem;             /* 等效于 @apply rounded-[2rem]; */
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.25);
    transition: transform 0.7s ease, box-shadow 0.7s ease;
    padding: 2rem;                   /* 等效于 @apply p-8; */
    border: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
  }
  .dashboard-card:hover {
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.35);
    transform: scale(1.01);
  }

  /* 兜底：相邻卡片最小间距（即使脱离了 .dashboard-container 也能生效） */
  .dashboard-card + .dashboard-card {
    margin-top: 2rem; /* 32px，等效 space-y-8 的相邻效果 */
  }

  .dashboard-card-header { margin-bottom: 1.5rem; }

  .dashboard-card-title {
    font-size: 2rem;
    font-weight: 700;
    color: rgb(31, 41, 55);
    display: flex;
    align-items: center;
    margin-bottom: 0;
  }

  .dashboard-card-emoji {
    margin-right: 1rem;
    font-size: 2.25rem;
    filter: drop-shadow(0 4px 3px rgb(0 0 0 / 0.07));
  }

  .dashboard-card-description {
    font-size: 1rem;
    color: rgb(75, 85, 99);
    font-weight: 500;
    margin-left: 2.5rem;
  }

  .dropdown-menu-button {
    @apply border-0 bg-white w-full min-w-32 max-w-40 p-3 leading-tight overflow-hidden text-left transition-all duration-200 rounded-none;
    position: relative;
  }
}

/* 渐变遮罩 */
.dropdown-menu-button::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.95) 60%, rgba(255, 255, 255, 1) 100%);
  pointer-events: none;
  opacity: 0.8;
}

/* Radix 弹层 utilities（保留） */
@keyframes scaleIn {
  from { opacity: 0; transform: translateY(-2px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@layer utilities {
  [data-radix-popper-content-wrapper] {
    animation: scaleIn 0.14s ease-out;
    transform-origin: var(--radix-popper-transform-origin);
    will-change: transform, opacity;
  }
}

/* 细节 */
.vfs-title-button { transition: color 0.3s ease; }
.vfs-footer-text { text-align: center; color: #6b7280; }