/*!
 * 诚功塑业 - 样式表
 * 包含所有自定义样式和Tailwind基础配置
 */

/* ========== 基础样式 ========== */
body {
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, ::before, ::after {
  box-sizing: border-box;
}

/* ========== Tailwind CSS 基础 ========== */
.container { width: 100%; }
@media (min-width: 640px) { .container { max-width: 640px; } }
@media (min-width: 768px) { .container { max-width: 768px; } }
@media (min-width: 1024px) { .container { max-width: 1024px; } }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

/* 尺寸 */
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-10 { width: 2.5rem; }
.w-14 { width: 3.5rem; }
.h-full { height: 100%; }
.h-10 { height: 2.5rem; }
.min-h-screen { min-height: 100vh; }

/* 间距 */
.p-2 { padding: 0.5rem; }
.p-2\.5 { padding: 0.625rem; }
.p-3 { padding: 0.75rem; }
.p-3\.5 { padding: 0.875rem; }
.p-4 { padding: 1rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-3\.5 { padding-top: 0.875rem; padding-bottom: 0.875rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.pb-24 { padding-bottom: 6rem; }
.pt-3 { padding-top: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-1\.5 { margin-top: 0.375rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-8 { margin-top: 2rem; }
.mt-14 { margin-top: 3.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-1\.5 { margin-bottom: 0.375rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-2\.5 { margin-bottom: 0.625rem; }
.mb-3 { margin-bottom: 0.75rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.gap-1 { gap: 0.25rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-2 { gap: 0.5rem; }
.gap-2\.5 { gap: 0.625rem; }
.gap-3 { gap: 0.75rem; }

/* 位置 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-\[48px\] { top: 48px; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.-left-16 { left: -4rem; }
.-right-20 { right: -5rem; }
.-top-28 { top: -7rem; }
.bottom-20 { bottom: 5rem; }
.z-10 { z-index: 10; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }
.z-\[60\] { z-index: 60; }
.z-\[70\] { z-index: 70; }

/* 文字 */
.text-center { text-align: center; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-\[9px\] { font-size: 9px; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.text-\[12px\] { font-size: 12px; }
.text-\[13px\] { font-size: 13px; }
.text-\[14px\] { font-size: 14px; }
.text-\[15px\] { font-size: 15px; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.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-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 800; }
.tracking-wide { letter-spacing: 0.025em; }
.leading-relaxed { line-height: 1.625; }
.text-white { color: #fff; }
.text-black { color: #000; }
.text-brand { color: #0F4C81; }
.text-accent { color: #E87A3D; }
.text-blue-400 { color: #60a5fa; }
.text-blue-500 { color: #3b82f6; }
.text-blue-600 { color: #2563eb; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-red-500 { color: #ef4444; }
.text-red-600 { color: #dc2626; }
.text-green-500 { color: #22c55e; }
.text-green-600 { color: #16a34a; }
.text-orange-500 { color: #f97316; }
.text-orange-600 { color: #ea580c; }
.text-purple-500 { color: #a855f7; }
.text-purple-600 { color: #9333ea; }
.text-white\/50 { color: rgba(255, 255, 255, 0.5); }
.text-white\/70 { color: rgba(255, 255, 255, 0.7); }

/* 背景 */
.bg-white { background-color: #fff; }
.bg-black { background-color: #000; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-blue-50 { background-color: #eff6ff; }
.bg-blue-500 { background-color: #3b82f6; }
.bg-red-50 { background-color: #fef2f2; }
.bg-red-500 { background-color: #ef4444; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-500 { background-color: #22c55e; }
.bg-orange-50 { background-color: #fff7ed; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-500 { background-color: #a855f7; }
.bg-teal-50 { background-color: #f0fdfa; }
.bg-black\/30 { background-color: rgba(0, 0, 0, 0.3); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/6 { background-color: rgba(255, 255, 255, 0.06); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-brand-dark { --tw-gradient-from: #0A355C; --tw-gradient-to: rgba(10, 53, 92, 0); }
.via-brand { --tw-gradient-to: rgba(15, 76, 129, 0); --tw-gradient-stops: var(--tw-gradient-from), #0F4C81, var(--tw-gradient-to); }
.to-brand-light { --tw-gradient-to: #1a6bb5; }
.from-\[\#0A355C\] { --tw-gradient-from: #0A355C; --tw-gradient-to: rgba(10, 53, 92, 0); }
.to-\[\#0F4C81\] { --tw-gradient-to: #0F4C81; }
.bg-accent { background-color: #E87A3D; }

/* 边框 */
.border { border-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-t { border-top-width: 1px; }
.border-r { border-right-width: 1px; }
.border-transparent { border-color: transparent; }
.border-white\/15 { border-color: rgba(255, 255, 255, 0.15); }
.border-white\/8 { border-color: rgba(255, 255, 255, 0.08); }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-50 { border-color: #f9fafb; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-500 { border-color: #3b82f6; }
.border-blue-600 { border-color: #2563eb; }
.border-amber-200 { border-color: #fde68a; }
.border-purple-500 { border-color: #a855f7; }

/* 圆角 */
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }
.rounded-t-2xl { border-top-left-radius: 1rem; border-top-right-radius: 1rem; }

/* 阴影 */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1); }
.shadow-orange-600\/30 { --tw-shadow-color: rgba(234, 88, 12, 0.3); --tw-shadow: var(--tw-shadow-colored); }

/* 布局 */
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex-shrink: 0; }

/* 网格 */
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.grid-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }

/* 溢出 */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* 交互 */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.appearance-none { -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.active\:scale-95:active { transform: scale(0.95); }
.active\:scale-\[0\.98\]:active { transform: scale(0.98); }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }

/* 其他 */
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.no-underline { text-decoration: none; }
.outline-none { outline: 2px solid transparent; outline-offset: 2px; }
.opacity-50 { opacity: 0.5; }

/* 背景位置 */
.bg-\[right_14px_center\] { background-position: right 14px center; }
.bg-no-repeat { background-repeat: no-repeat; }

/* 移动端适配 */
@media (min-width: 768px) {
  .pc-wrap {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* ========== 自定义组件样式 ========== */

/* 毛玻璃效果 */
.glass {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Toast容器 */
.toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  width: 90%;
  max-width: 360px;
}

.toast {
  pointer-events: auto;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  animation: toastIn 0.3s ease both;
  display: flex;
  align-items: center;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.toast-info { background: rgba(59, 130, 246, 0.92); color: #fff; }
.toast-warn { background: rgba(245, 158, 11, 0.92); color: #fff; }
.toast-error { background: rgba(220, 38, 38, 0.92); color: #fff; }
.toast-success { background: rgba(22, 163, 74, 0.92); color: #fff; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

/* 动画 */
.fade-up {
  animation: fadeUp 0.3s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }
.stagger-5 { animation-delay: 0.25s; }
.stagger-6 { animation-delay: 0.3s; }

/* 加载动画 */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 品牌图标 */
.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: linear-gradient(135deg, #0A355C, #0F4C81);
  color: #fff;
}

/* 滚动条 */
::-webkit-scrollbar {
  display: none;
}

/* Tab按钮 */
.tab-btn {
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: #3b82f6;
}

/* 列表项动画 */
.tab-panel {
  transition: opacity 0.15s ease;
}

/* 品牌颜色变量 */
:root {
  --brand-dark: #0A355C;
  --brand: #0F4C81;
  --brand-light: #1a6bb5;
  --accent: #E87A3D;
}
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2); }
