/* =========================================
   1. 基础设置与 CSS 变量
   ========================================= */
:root {
  /* 自定义颜色定义 */
  --color-primary: #0a2540;
  --color-secondary: #0a1f3a;
  --color-accent: #4a90e2;
  --color-accent-dark: #3a7bc8;
  --color-surface: #f8f6f3;
  --color-card: #ffffff;
  --color-muted: #6b7280;
  --color-border: #e5e2db;

  /* 颜色透明度变体 */
  --color-white-10: rgba(255, 255, 255, 0.1);
  --color-white-20: rgba(255, 255, 255, 0.2);
  --color-white-30: rgba(255, 255, 255, 0.3);
  --color-white-40: rgba(255, 255, 255, 0.4);
  --color-white-60: rgba(255, 255, 255, 0.6);
  --color-white-80: rgba(107, 114, 128, 0.8);

  --color-accent-5: rgba(74, 144, 226, 0.05);
  --color-accent-20: rgba(74, 144, 226, 0.2);
  --color-accent-30: rgba(74, 144, 226, 0.3);
  --color-accent-40: rgba(74, 144, 226, 0.4);
  --color-accent-50: rgba(74, 144, 226, 0.5);

  --color-primary-10: rgba(10, 37, 64, 0.1);

  /* 自定义字体 */
  --font-family: 微软雅黑,Verdana,"Microsoft YaHei";
  --font-body: 微软雅黑,Verdana,"Microsoft YaHei";
}

/* =========================================
   2. Tailwind Preflight (基础重置)
   ========================================= */
*, ::before, ::after {
  box-sizing: border-box;
  border-width: 0;
  border-style: solid;
  border-color: var(--color-border);
}

::before, ::after {
  --tw-content: '';
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  font-family: var(--font-body);
  font-feature-settings: normal;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  line-height: inherit;
  background-color: var(--color-surface);
  color: var(--color-primary);
  overflow-x: hidden;
}

/* 重置排版 */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: inherit;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: inherit;
}

button, input, optgroup, select, textarea {
  font-family: inherit;
  font-size: 100%;
  line-height: 1.15;
  margin: 0;
  padding: 0;
}

button, select {
  text-transform: none;
}

button, [type='button'], [type='reset'], [type='submit'] {
  -webkit-appearance: button;
  background-color: transparent;
  background-image: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =========================================
   3. 自定义主题工具类
   ========================================= */

/* 字体 */
.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }

/* 文字颜色 */
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: var(--color-accent); }
.text-muted { color: var(--color-muted); }
.text-white { color: #2c6df4; }
.text-white\/60 { color: var(--color-white-60); }
.text-white\/80 { color: var(--color-white-80); }
.text-whiteapp { color: #1a1a1a; }
.text-whiteapp1 { color: #666666; }
.text-whiteapp2 { color: #666666; }

/* 背景颜色 */
.bg-primary { background-color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.bg-accent { background-color: var(--color-accent); }
.bg-surface { background-color: var(--color-surface); }
.bg-card { background-color: var(--color-card); }
.bg-white { background-color: #ffffff; }
.bg-gray-100 { background-color: #f3f4f6; }

/* 背景颜色（带透明度） */
.bg-white\/10 { background-color: var(--color-white-10); }
.bg-white\/20 { background-color: var(--color-white-20); }
.bg-accent\/5 { background-color: var(--color-accent-5); }
.bg-accent\/20 { background-color: var(--color-accent-20); }
.bg-primary\/10 { background-color: var(--color-primary-10); }

/* 边框颜色 */
.border-white\/10 { border-color: var(--color-white-10); }
.border-white\/20 { border-color: var(--color-white-20); }
.border-accent { border-color: var(--color-accent); }
.border-transparent { border-color: transparent; }
.border { border-color: var(--color-border); }
.border-t { border-top-color: var(--color-border); }

/* !important 强制覆盖类 */
.text-white\! { color: #ffffff !important; }
.border-white\/30\! { border-color: var(--color-white-30) !important; }

/* =========================================
   4. 布局工具类
   ========================================= */

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.grid { display: grid; }
.hidden { display: none; }

/* Position */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.static { position: static; }
.sticky { position: sticky; }

/* Top / Right / Bottom / Left */
.top-0 { top: 0px; }
.bottom-0 { bottom: 0px; }
.left-0 { left: 0px; }
.right-0 { right: 0px; }
.top-3 { top: 0.75rem; }
.top-20 { top: 5rem; }
.top-40 { top: 10rem; }
.right-20 { right: 5rem; }
.bottom-40 { bottom: 10rem; }
.left-10 { left: 2.5rem; }
.left-1\/4 { left: 25%; }

/* Z-Index */
.z-10 { z-index: 10; }
.z-50 { z-index: 50; }
.z-999 { z-index: 999; }
.z-1000 { z-index: 1000; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Grid */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Width & Height */
.w-full { width: 100%; }
.w-2 { width: 0.5rem; }
.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-24 { width: 6rem; }
.w-32 { width: 8rem; }
.w-48 { width: 12rem; }
.w-64 { width: 16rem; }
.w-80 { width: 20rem; }
.w-max { width: max-content; }
.max-w-7xl { max-width: 80rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xs { max-width: 20rem; }
.max-w-sm { max-width: 24rem; }

.h-full { height: 100%; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-40 { height: 10rem; }
.h-48 { height: 12rem; }
.h-72 { padding-top: 1rem; }
.min-h-screen { min-height: 100vh; }

/* Margin & Padding */
.m-0 { margin: 0px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 3rem; }
.mt-12 { margin-top: 3rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.p-20 { padding: 5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-20 { padding-left: 5rem; padding-right: 5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.pt-8 { padding-top: 2rem; }
.pt-20 { padding-top: 5rem; }
.pb-4 { padding-bottom: 1rem; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Flex & Grid specific utilities */
.flex-1 { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.cursor-pointer { cursor: pointer; }
.pointer-events-none { pointer-events: none; }
.object-cover { object-fit: cover; }
.inset-0 { top: 0px; right: 0px; bottom: 0px; left: 0px; }

/* =========================================
   5. 排版工具类
   ========================================= */

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-bold { font-weight: 700; }
.font-display { font-family: var(--font-display); }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.text-center { text-align: center; }
.text-left { text-align: left; }

.uppercase { text-transform: uppercase; }
.capitalize { text-transform: capitalize; }

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   6. 背景与特效工具类
   ========================================= */

.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); height: 70px;}
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.backdrop-blur-sm { backdrop-filter: blur(4px); }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.duration-300 { transition-duration: 300ms; }
.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1); }

/* =========================================
   7. 响应式
   ========================================= */

@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .md\:hidden { display: none; }
  .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .md\:text-5xl { font-size: 3rem; line-height: 1; }
  .md\:w-auto { width: auto; }
}

/* =========================================
   8. 交互状态
   ========================================= */

.hover\:bg-white\/10:hover { background-color: var(--color-white-10); }
.hover\:bg-primary:hover { background-color: var(--color-primary); }
.hover\:text-accent:hover { color: var(--color-accent); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:underline:hover { text-decoration: underline; }
.hover\:border-accent:hover { border-color: var(--color-accent); }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:translate-y-2:hover { transform: translateY(0.5rem); }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }

/* =========================================
   9. 其他
   ========================================= */

/* 滚动条 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--color-surface); }
::-webkit-scrollbar-thumb { background: var(--color-accent); border-radius: 4px; }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--color-primary); color: white; padding: 16px; text-align: left; font-weight: 600; }
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--color-border); transition: background 0.3s ease; }
.data-table tr:hover td { background: rgba(74, 144, 226, 0.05); }







