/* http://meyerweb.com/eric/tools/css/reset/ */
/* v1.0 | 20080212 */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
font,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  vertical-align: baseline;
  background: transparent;
}
* {
  box-sizing: border-box;
  font-family: NORMAL;
}
body {
  line-height: 1;
}
a {
  -webkit-text-decoration: none;
  text-decoration: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: '';
  content: none;
}
/* remember to define focus styles! */
:focus {
  outline: 0;
}
/* remember to highlight inserts somehow! */
ins {
  -webkit-text-decoration: none;
  text-decoration: none;
}
del {
  -webkit-text-decoration: line-through;
  text-decoration: line-through;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* 隐藏滚动条 */
::-webkit-scrollbar {
  display: none;
}

/**
 * 全局响应式适配 CSS
 * 用于处理不同分辨率的笔记本屏幕适配
 */

/* 基础变量 */

:root {
  /* 默认CSS变量，会被JavaScript动态更新 */
  --scale-factor: 1;
  --scale-width: 1;
  --scale-height: 1;
  --scale-aspect: 1;
  --viewport-width: 1920px;
  --viewport-height: 1080px;
  
  /* 基础间距变量 */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  
  /* 基础字体大小变量 */
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-xxl: 24px;
  --font-size-title: 28px;
  --font-size-header: 32px;
}

/* 响应式容器类 */

/* 1. 自动缩放容器 - 根据屏幕宽高比自动缩放内容 */

.auto-scale-container {
  transition: transform 0.3s ease;
  transform-origin: center top;
  transform: scale(1);
  transform: scale(var(--scale-aspect));
}

/* 2. 统一缩放容器 - 根据屏幕尺寸统一缩放 */

.uniform-scale-container {
  transition: transform 0.3s ease;
  transform-origin: center top;
  transform: scale(1);
  transform: scale(var(--scale-factor));
}

/* 3. 宽度自适应容器 - 根据屏幕宽度缩放 */

.width-scale-container {
  transition: transform 0.3s ease;
  transform-origin: center top;
  transform: scale(1);
  transform: scale(var(--scale-width));
}

/* 4. 高度自适应容器 - 根据屏幕高度缩放 */

.height-scale-container {
  transition: transform 0.3s ease;
  transform-origin: center top;
  transform: scale(1);
  transform: scale(var(--scale-height));
}

/* 缩放包装容器 - 为缩放内容提供空间 */

.scale-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* 响应式字体大小 */

.responsive-text {
  font-size: calc(16px * 1);
  font-size: calc(var(--font-size-md) * var(--scale-factor));
}

.responsive-text-sm {
  font-size: calc(14px * 1);
  font-size: calc(var(--font-size-sm) * var(--scale-factor));
}

.responsive-text-lg {
  font-size: calc(18px * 1);
  font-size: calc(var(--font-size-lg) * var(--scale-factor));
}

.responsive-title {
  font-size: calc(28px * 1);
  font-size: calc(var(--font-size-title) * var(--scale-factor));
}

.responsive-header {
  font-size: calc(32px * 1);
  font-size: calc(var(--font-size-header) * var(--scale-factor));
}

/* 隐藏滚动条但保持滚动功能 */

.hide-scrollbar {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* 自适应容器 */

.adaptive-container {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 24px;
  padding: 0 var(--spacing-lg);
}

/* 自适应图片 */

.adaptive-image {
  max-width: 100%;
  height: auto;
  -o-object-fit: contain;
     object-fit: contain;
}

.adaptive-image-cover {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

/* 自适应卡片 */

.adaptive-card {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.adaptive-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* 媒体查询 - 针对不同屏幕比例 */

/* 窄屏幕 (小于16:9) */

@media (max-aspect-ratio: 16/9) {
  :root {
    /* 调整窄屏幕的间距 */
    --spacing-lg: 20px;
    --spacing-xl: 28px;
    
    /* 调整窄屏幕的字体大小 */
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-title: 24px;
    --font-size-header: 28px;
  }
  
  .scale-wrapper {
    min-height: 500px;
  }
  
  /* 在窄屏幕上增加内容间距 */
  .narrow-screen-spacing {
    margin-bottom: 24px;
    margin-bottom: var(--spacing-lg);
  }
  
  /* 窄屏幕上的内容容器 */
  .adaptive-container {
    padding: 0 16px;
    padding: 0 var(--spacing-md);
  }
  
  /* 窄屏幕上的卡片布局 */
  .adaptive-card-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    gap: var(--spacing-md);
  }
}

/* 宽屏幕 (大于16:9) */

@media (min-aspect-ratio: 16/9) {
  /* 在宽屏幕上调整布局 */
  .wide-screen-layout {
    max-width: 80%;
    margin: 0 auto;
  }
  
  /* 宽屏幕上的卡片布局 */
  .adaptive-card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 24px;
    grid-gap: var(--spacing-lg);
    gap: 24px;
    gap: var(--spacing-lg);
  }
}

/* 小屏幕 (小于1366px宽) */

@media (max-width: 1366px) {
  :root {
    /* 调整小屏幕的间距 */
    --spacing-lg: 16px;
    --spacing-xl: 24px;
    
    /* 调整小屏幕的字体大小 */
    --font-size-lg: 16px;
    --font-size-xl: 18px;
    --font-size-title: 22px;
    --font-size-header: 26px;
  }
  
  .small-screen-overflow {
    overflow-y: auto;
    max-height: 100vh;
  }
  
  /* 小屏幕上的内容容器 */
  .adaptive-container {
    max-width: 1100px;
  }
}

/* 大屏幕 (大于1920px宽) */

@media (min-width: 1921px) {
  :root {
    /* 调整大屏幕的间距 */
    --spacing-lg: 28px;
    --spacing-xl: 36px;
    
    /* 调整大屏幕的字体大小 */
    --font-size-lg: 20px;
    --font-size-xl: 22px;
    --font-size-title: 30px;
    --font-size-header: 36px;
  }
  
  .large-screen-centered {
    max-width: 1800px;
    margin: 0 auto;
  }
  
  /* 大屏幕上的内容容器 */
  .adaptive-container {
    max-width: 1500px;
  }
}

/* 高度较小的屏幕 (小于768px高) */

@media (max-height: 768px) {
  :root {
    /* 调整小高度屏幕的间距 */
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    
    /* 调整小高度屏幕的字体大小 */
    --font-size-md: 14px;
    --font-size-lg: 16px;
    --font-size-title: 20px;
    --font-size-header: 24px;
  }
  
  .compact-for-height {
    padding-top: 4px !important;
    padding-top: var(--spacing-xs) !important;
    padding-bottom: 4px !important;
    padding-bottom: var(--spacing-xs) !important;
    margin-top: 4px !important;
    margin-top: var(--spacing-xs) !important;
    margin-bottom: 4px !important;
    margin-bottom: var(--spacing-xs) !important;
  }
  
  .reduce-height-spacing * + * {
    margin-top: 4px !important;
    margin-top: var(--spacing-xs) !important;
  }
  
  /* 小高度屏幕上的卡片 */
  .adaptive-card {
    padding: 8px;
    padding: var(--spacing-sm);
  }
}

/* 超宽屏幕 (宽高比大于21:9) */

@media (min-aspect-ratio: 21/9) {
  .ultra-wide-container {
    max-width: 70%;
    margin: 0 auto;
  }
}

/* 超窄屏幕 (宽高比小于4:3) */

@media (max-aspect-ratio: 4/3) {
  :root {
    /* 调整超窄屏幕的间距和字体 */
    --spacing-lg: 12px;
    --font-size-title: 20px;
  }
  
  .ultra-narrow-layout {
    flex-direction: column !important;
  }
  
  .ultra-narrow-layout > * {
    width: 100% !important;
    margin-bottom: 16px;
    margin-bottom: var(--spacing-md);
  }
}

