/* 定义全局CSS变量 */
:root {
    --x-color-primary: #2563eb;
    --x-color-text-main: #1f2937;
    --x-color-text-muted: #6b7280;
    --x-color-bg-body: #f9fafb;
    --x-color-bg-card: #ffffff;
    --x-radius-base: 8px;
    --x-transition-base: all 0.3s ease;
}

/* 基础元素重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--x-color-bg-body);
    color: var(--x-color-text-main);
    line-height: 1.6;
}

/* 封装全局版心容器 */
.x-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 封装全局弹性居中布局 */
.x-flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 封装全局两端对齐布局 */
.x-flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 封装全局标准按钮组件 */
.x-btn {
    display: inline-block;
    padding: 10px 24px;
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    background-color: var(--x-color-primary);
    border-radius: var(--x-radius-base);
    text-decoration: none;
    transition: var(--x-transition-base);
    cursor: pointer;
    border: none;
}

.x-btn:hover {
    background-color: #1d4ed8;
}

/* 封装全局标签组件（用于技术栈标识等） */
.x-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--x-color-primary);
    background-color: rgba(37, 99, 235, 0.08);
    border-radius: 4px;
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* 封装全局页脚基础布局 */
.x-footer {
    padding: 40px 0;
    margin-top: 80px;
    text-align: center;
    font-size: 14px;
    color: var(--x-color-text-muted);
    border-top: 1px solid #e5e7eb;
    background-color: var(--x-color-bg-card);
}

/* 封装全局页脚链接交互 */
.x-footer a {
    color: var(--x-color-text-muted);
    text-decoration: none;
    transition: var(--x-transition-base);
}

.x-footer a:hover {
    color: var(--x-color-primary);
}

/* 定义全局向上淡入基础状态（隐藏） */
.x-animate-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    /* 提示浏览器预先优化重绘属性 */
    will-change: opacity, transform;
}

/* 定义全局向上淡入触发状态（显现） */
.x-animate-up.x-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 针对子元素实现交错延迟渲染 */
.x-animate-delay-1 { transition-delay: 0.1s; }
.x-animate-delay-2 { transition-delay: 0.2s; }
.x-animate-delay-3 { transition-delay: 0.3s; }