:root {
  --color-primary: #165DFF;
  --color-primary-hover: #0E42D2;
  --color-primary-active: #0A35B0;
  --color-primary-light: #E8F3FF;
  --color-success: #00B42A;
  --color-success-light: #E8FFEA;
  --color-warning: #FF7D00;
  --color-warning-light: #FFF3E8;
  --color-danger: #F53F3F;
  --color-danger-light: #FFECE8;
  --color-info: #86909C;
  --color-gold: #F7BA1E;

  --color-text-1: #1D2129;
  --color-text-2: #4E5969;
  --color-text-3: #86909C;
  --color-text-4: #C9CDD4;
  --color-border: #E5E6EB;
  --color-border-light: #F2F3F5;
  --color-bg-page: #F2F3F5;
  --color-bg-card: #FFFFFF;
  --color-bg-hover: #F7F8FA;
  --color-bg-active: #EDF0F5;
  --color-bg-disabled: #F7F8FA;
  --color-fill-1: #F7F8FA;
  --color-fill-2: #F2F3F5;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-1: 4px;
  --radius-2: 8px;
  --radius-3: 12px;
  --radius-4: 16px;

  --shadow-1: 0 2px 12px 0 rgba(0, 0, 0, 0.06);
  --shadow-2: 0 4px 16px 0 rgba(0, 0, 0, 0.08);
  --shadow-3: 0 8px 32px 0 rgba(0, 0, 0, 0.12);
  --shadow-focus: 0 0 0 3px rgba(22, 93, 255, 0.15);

  --font-size-1: 24px;
  --font-size-2: 20px;
  --font-size-3: 16px;
  --font-size-4: 14px;
  --font-size-5: 12px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;

  --line-height-tight: 1.4;
  --line-height-normal: 1.6;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
  --transition-slow: 0.35s ease;

  --navbar-height: 56px;
  --tabbar-height: 56px;

  --gradient-primary: linear-gradient(135deg, #165DFF 0%, #4080FF 100%);
  --gradient-success: linear-gradient(135deg, #00B42A 0%, #23C343 100%);
  --gradient-warning: linear-gradient(135deg, #FF7D00 0%, #FF9A2E 100%);
  --gradient-danger: linear-gradient(135deg, #F53F3F 0%, #F76560 100%);
  --gradient-purple: linear-gradient(135deg, #722ED1 0%, #9254DE 100%);
  --gradient-gold: linear-gradient(135deg, #F7BA1E 0%, #FFC53D 100%);
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', 'Microsoft YaHei', Arial, sans-serif;
  font-size: var(--font-size-4);
  line-height: var(--line-height-normal);
  color: var(--color-text-1);
  background-color: var(--color-bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
  background: transparent;
}

.safe-area-top {
  padding-top: env(safe-area-inset-top, 0px);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.text-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-ellipsis-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-1 {
  flex: 1;
}

.hidden {
  display: none !important;
}

.show {
  display: block !important;
}