@tailwind base;
@tailwind components;
@tailwind utilities;

/* 跨性别旗帜配色方案 */
:root {
  --trans-blue: #5BCEFA;
  --trans-pink: #F5A9B8;
  --trans-white: #FFFFFF;
  
  /* 主题色设置 */
  --vp-c-brand-1: var(--trans-blue);
  --vp-c-brand-2: var(--trans-pink);
  --vp-c-brand-3: var(--trans-blue);
  --vp-c-brand-soft: rgba(91, 206, 250, 0.14);
  
  /* 按钮颜色 */
  --vp-button-brand-bg: var(--trans-blue);
  --vp-button-brand-hover-bg: var(--trans-pink);
  --vp-button-brand-active-bg: var(--trans-blue);
}

.dark {
  --vp-c-brand-1: var(--trans-pink);
  --vp-c-brand-2: var(--trans-blue);
  --vp-c-brand-3: var(--trans-pink);
  --vp-c-brand-soft: rgba(245, 169, 184, 0.16);
  
  --vp-button-brand-bg: var(--trans-pink);
  --vp-button-brand-hover-bg: var(--trans-blue);
  --vp-button-brand-active-bg: var(--trans-pink);
}

/* 主页背景图片全屏 */
.VPHome {
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  margin: 0 !important;
}

.VPHome .VPHomeContent {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 !important;
}

/* 移除首页多余空白 */
.VPHome .VPContent,
.VPHome .container,
.VPHome .VPHomeHero,
.VPHome .VPHero {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.VPHome .VPFeatures,
.VPHome .VPHomeFeatures {
  display: none !important;
}

/* 浅色模式背景 */
html:not(.dark) .VPHome {
  background-image: url('/hero-light.png');
}

/* 深色模式背景 */
html.dark .VPHome {
  background-image: url('/hero-dark.png');
}

/* 标题渐变色效果 - 浅色模式 */
.VPHero .name {
  background: linear-gradient(135deg, #5BCEFA 0%, #F5A9B8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800 !important;
  text-align: center !important;
}

/* 深色模式标题渐变调整 */
html.dark .VPHero .name {
  background: linear-gradient(135deg, var(--trans-pink) 0%, var(--trans-white) 50%, var(--trans-blue) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 按钮容器居中 */
.VPHero .actions {
  justify-content: center !important;
  padding-top: 2rem;
}

/* 按钮样式优化 */
.VPButton.brand {
  border-radius: 24px;
  padding: 0 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(91, 206, 250, 0.3);
}

.VPButton.brand:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(245, 169, 184, 0.4);
}

html.dark .VPButton.brand {
  box-shadow: 0 4px 12px rgba(245, 169, 184, 0.3);
}

html.dark .VPButton.brand:hover {
  box-shadow: 0 6px 16px rgba(91, 206, 250, 0.4);
}

/* 主页内容居中优化 */
.VPHero .container {
  text-align: center !important;
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

.VPHero .main {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  margin: 0 auto !important;
}

.VPHeroInfo {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  width: 100% !important;
}

.VPHero .text,
.VPHero .tagline {
  text-align: center !important;
  width: 100% !important;
}

/* 强制标题居中 */
.VPHero .name,
.VPHero h1.name {
  text-align: center !important;
  width: 100% !important;
  display: block !important;
  margin: 0 auto !important;
}

/* 文档页面顶部间距优化 */
.VPDoc {
  padding-top: calc(var(--vp-nav-height) + 32px) !important;
}

.VPDoc .content {
  padding-top: 24px !important;
}

.VPContent.has-sidebar {
  padding-top: 24px !important;
}
/* 确保标题和按钮居中 */
.VPHero {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  width: 100% !important;
}

/* 按钮容器强制居中 */
.VPHero .actions,
.VPHero .VPButton {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  margin: 0 auto !important;
}

/* 禁用导航栏滚动时的过渡效果，避免闪烁 */
.VPNav,
.VPNavBar {
  transition: none !important;
}

/* ========== 手機版響應式適配 ========== */

/* 平板和小屏幕設備 (768px 以下) */
@media (max-width: 768px) {
  /* 主頁容器適配 - 確保垂直居中 */
  .VPHome {
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    padding: 0 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* 主頁內容區域 - 完全居中 */
  .VPHome .VPHomeContent {
    max-width: 100%;
    width: 100%;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Hero 區域調整 - 水平垂直居中 */
  .VPHero {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .VPHero .container {
    padding: 0 20px !important;
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
  }

  .VPHero .main {
    padding: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .VPHeroInfo {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* 標題文字大小調整 */
  .VPHero .name {
    font-size: 3rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
  }

  .VPHero .text {
    font-size: 1.5rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.75rem !important;
    padding: 0 8px !important;
  }

  .VPHero .tagline {
    font-size: 1.2rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.5rem !important;
    padding: 0 8px !important;
  }

  /* 按鈕容器調整 */
  .VPHero .actions {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
    padding-top: 1.5rem !important;
  }

  /* 按鈕樣式優化 */
  .VPButton {
    width: 100% !important;
    max-width: 280px !important;
    padding: 14px 28px !important;
    font-size: 1.1rem !important;
    justify-content: center !important;
  }

  .VPButton.brand {
    padding: 14px 36px !important;
  }

  /* 背景圖片適配 */
  html:not(.dark) .VPHome,
  html.dark .VPHome {
    background-size: cover;
    background-position: center center;
  }
}

/* 小手機屏幕 (480px 以下) */
@media (max-width: 480px) {
  /* 更緊湊的間距 - 保持居中 */
  .VPHome {
    padding: 0 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .VPHome .VPHomeContent {
    padding: 0 !important;
  }

  .VPHero .container {
    padding: 0 16px !important;
  }

  /* 更小的標題 */
  .VPHero .name {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
  }

  .VPHero .text {
    font-size: 1.3rem !important;
  }

  .VPHero .tagline {
    font-size: 1.1rem !important;
    padding: 0 4px !important;
  }

  /* 按鈕更窄 */
  .VPButton {
    max-width: 240px !important;
    padding: 12px 24px !important;
    font-size: 1rem !important;
  }

  .VPButton.brand {
    padding: 12px 28px !important;
  }

  /* 導航欄調整 */
  .VPNav {
    padding: 0 16px !important;
  }
}

/* 橫屏模式適配 */
@media (max-width: 768px) and (orientation: landscape) {
  .VPHome {
    min-height: auto;
    padding: 48px 24px 24px !important;
  }

  .VPHero .name {
    font-size: 2rem !important;
    margin-bottom: 0.5rem !important;
  }

  .VPHero .text {
    font-size: 1.1rem !important;
    margin-bottom: 0.5rem !important;
  }

  .VPHero .tagline {
    font-size: 0.9rem !important;
    margin-bottom: 1rem !important;
  }

  .VPHero .actions {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    padding-top: 1rem !important;
  }

  .VPButton {
    width: auto !important;
    min-width: 140px !important;
    max-width: 200px !important;
  }
}

/* 超大屏幕優化 (1440px 以上) */
@media (min-width: 1440px) {
  .VPHome .VPHomeContent {
    max-width: 1400px;
  }

  .VPHero .name {
    font-size: 5rem !important;
  }

  .VPHero .text {
    font-size: 2.2rem !important;
  }

  .VPHero .tagline {
    font-size: 1.7rem !important;
  }
}

/* 主頁字體顏色增強 */

/* 淺色模式主頁文字 */
html:not(.dark) .VPHero .text {
  color: var(--trans-pink);
}

html:not(.dark) .VPHero .tagline {
  color: var(--trans-pink);
}

/* 深色模式主頁文字 */
html.dark .VPHero .text {
  color: #e0e0e0;
}

html.dark .VPHero .tagline {
  color: #bdc3c7;
}