/* ========================================
   TYILRN - Modern Educational Design System
   特点：真实教育产品质感、丰富细腻动画、液态玻璃、无紫色金色
   ======================================== */

/* CSS 变量定义 */
:root {
    /* 主色调 - 专业教育蓝 */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;

    /* 辅助色 - 自然教育色系 */
    --success: #16a34a;
    --success-light: #dcfce7;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --info: #0891b2;
    --info-light: #cffafe;
    --teal: #0d9488;
    --teal-light: #ccfbf1;

    /* 中性色 */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* 文字色 */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;

    /* 边框 */
    --border-color: rgba(255, 255, 255, 0.30);
    --border-radius-sm: 8px;
    --border-radius: 14px;
    --border-radius-lg: 20px;
    --border-radius-xl: 28px;

    /* 阴影 —— 仅保留极微弱的内发光，无外阴影 */
    --shadow-sm: inset 0 1px 0 rgba(255,255,255,0.15);
    --shadow: inset 0 1px 0 rgba(255,255,255,0.2), inset 0 -1px 0 rgba(0,0,0,0.02);
    --shadow-md: inset 0 1px 1px rgba(255,255,255,0.25), inset 0 -1px 1px rgba(0,0,0,0.03);
    --shadow-lg: inset 0 1px 1px rgba(255,255,255,0.3), inset 0 -1px 2px rgba(0,0,0,0.04);
    --shadow-xl: inset 0 2px 2px rgba(255,255,255,0.35), inset 0 -2px 2px rgba(0,0,0,0.05);

    /* 字体 */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, Inconsolata, "Fira Code", monospace;

    /* 间距 */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* 过渡 */
    --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* ===== 液态玻璃变量 ===== */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-hover: rgba(255, 255, 255, 0.22);
    --glass-bg-active: rgba(255, 255, 255, 0.30);
    --glass-bg-solid: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-border-strong: rgba(255, 255, 255, 0.40);
    --glass-blur: blur(40px) saturate(180%);
    --glass-blur-heavy: blur(60px) saturate(200%);
    --glass-highlight: inset 0 1px 1px rgba(255,255,255,0.35), inset 0 -1px 1px rgba(0,0,0,0.03);
    --glass-shine: inset 0 1px 0 rgba(255,255,255,0.45);
}

/* ===== 重置样式 ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

/* 全局背景 —— 柔和教育风格，无紫色金色 */
body {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    background:
        radial-gradient(ellipse 120% 100% at 80% 0%, rgba(37, 99, 235, 0.07) 0%, transparent 55%),
        radial-gradient(ellipse 100% 80% at 0% 100%, rgba(14, 165, 233, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 80% 60% at 60% 100%, rgba(13, 148, 136, 0.04) 0%, transparent 45%),
        radial-gradient(ellipse 60% 50% at 20% 40%, rgba(59, 130, 246, 0.03) 0%, transparent 40%),
        linear-gradient(165deg, #f8fafc 0%, #f0f9ff 30%, #f0fdf4 55%, #fafafa 80%, #f8fafc 100%);
    background-attachment: fixed;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

a:hover {
    opacity: 0.8;
}

ul, ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}

/* ===== 液态玻璃基础类 ===== */

/* 标准液态玻璃 —— 用于卡片、面板 */
.liquid-glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.40),
        inset 0 -1px 1px rgba(0,0,0,0.02),
        0 1px 2px rgba(0,0,0,0.04);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* 玻璃顶部高光条 */
.liquid-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.50), transparent);
    pointer-events: none;
}

.liquid-glass:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.50),
        inset 0 -1px 1px rgba(0,0,0,0.02),
        0 2px 8px rgba(0,0,0,0.06);
}

/* 按压反馈 */
.liquid-glass:active {
    transform: scale(0.985);
    transition: transform 0.1s ease;
}

/* 液态玻璃 —— 深色模式 */
.liquid-glass-dark {
    background: rgba(15, 23, 42, 0.40);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.12),
        inset 0 -1px 0 rgba(0,0,0,0.08);
    border-radius: var(--border-radius-lg);
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.liquid-glass-dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
}

.liquid-glass-dark:hover {
    background: rgba(15, 23, 42, 0.55);
    border-color: rgba(255, 255, 255, 0.25);
}

/* 强液态玻璃 —— 用于需要更高可读性的区域 */
.liquid-glass-strong {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(60px) saturate(200%);
    -webkit-backdrop-filter: blur(60px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.50),
        inset 0 -1px 1px rgba(0,0,0,0.02),
        0 1px 2px rgba(0,0,0,0.04);
    border-radius: var(--border-radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.liquid-glass-strong::before {
    content: '';
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.60), transparent);
    pointer-events: none;
}

.liquid-glass-strong:hover {
    background: rgba(255, 255, 255, 0.70);
    border-color: rgba(255, 255, 255, 0.55);
}

/* 旧版毛玻璃兼容类 */
.glass {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.40);
    border-radius: var(--border-radius-lg);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.40);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    border-radius: var(--border-radius-lg);
    color: white;
}

/* ===== 丰富动画系统 ===== */

/* 淡入 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 淡出 */
@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* 从右侧滑入 */
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 从左侧滑入 */
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 缩放入场 */
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

/* 弹性缩放入场 */
@keyframes scaleInBounce {
    0% { opacity: 0; transform: scale(0.85); }
    60% { opacity: 1; transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* 旋转 */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 脉冲 */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 温暖脉冲（无阴影，仅透明度+缩放） */
@keyframes warmPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.03); }
}

/* 骨架屏闪光 */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* 玻璃边框流光 */
@keyframes borderShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* 数字计数翻转 */
@keyframes countUp {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* 活泼弹动（缩放模拟弹跳，无上浮位移） */
@keyframes popBounce {
    0%, 100% { transform: scale(1); }
    40% { transform: scale(0.92); }
    60% { transform: scale(1.04); }
    80% { transform: scale(0.98); }
}

/* 摇晃 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* 渐变色流动 */
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 玻璃高光扫过 */
@keyframes glassSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* 呼吸效果 */
@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.03); opacity: 0.9; }
}

/* 波纹扩散 */
@keyframes ripple {
    0% { transform: scale(0); opacity: 0.5; }
    100% { transform: scale(4); opacity: 0; }
}

/* 柔和模糊入场（毛玻璃感） */
@keyframes blurIn {
    from { opacity: 0; filter: blur(12px); transform: scale(0.95); }
    to { opacity: 1; filter: blur(0); transform: scale(1); }
}

/* 弹性果冻 */
@keyframes jello {
    0%, 100% { transform: scale(1, 1); }
    25% { transform: scale(0.95, 1.05); }
    50% { transform: scale(1.05, 0.95); }
    75% { transform: scale(0.98, 1.02); }
}

/* 橡皮筋 */
@keyframes rubberBand {
    0% { transform: scale(1); }
    30% { transform: scale(1.12, 0.88); }
    40% { transform: scale(0.88, 1.12); }
    50% { transform: scale(1.06, 0.94); }
    65% { transform: scale(0.98, 1.02); }
    75% { transform: scale(1.02, 0.98); }
    100% { transform: scale(1); }
}

/* 轻微摇摆 */
@keyframes swing {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(3deg); }
    40% { transform: rotate(-2deg); }
    60% { transform: rotate(1.5deg); }
    80% { transform: rotate(-0.5deg); }
}

/* 心脏跳动（缩放版，无上浮） */
@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.08); }
    28% { transform: scale(1); }
    42% { transform: scale(1.05); }
    70% { transform: scale(1); }
}

/* 柔和晃动 */
@keyframes wobble {
    0%, 100% { transform: translateX(0); }
    15% { transform: translateX(-3px) rotate(-1deg); }
    30% { transform: translateX(2px) rotate(1deg); }
    45% { transform: translateX(-2px) rotate(-0.5deg); }
    60% { transform: translateX(1px) rotate(0.5deg); }
    75% { transform: translateX(-0.5px); }
}

/* 翻转入场（轻微X轴翻转） */
@keyframes flipInX {
    from { opacity: 0; transform: perspective(400px) rotateX(15deg) scale(0.95); }
    to { opacity: 1; transform: perspective(400px) rotateX(0) scale(1); }
}

/* 纸张展开 */
@keyframes unfold {
    from { opacity: 0; transform: scaleY(0.8) scaleX(0.95); transform-origin: top center; }
    to { opacity: 1; transform: scaleY(1) scaleX(1); }
}

/* 活泼弹出 */
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.5); }
    70% { opacity: 1; transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* 从下滑入（一次性入场） */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 从上滑入（一次性入场） */
@keyframes slideInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 优雅揭示 */
@keyframes reveal {
    from { opacity: 0; clip-path: inset(0 100% 0 0); }
    to { opacity: 1; clip-path: inset(0 0 0 0); }
}

/* 动画类 */
.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-scale-in-bounce {
    animation: scaleInBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-warm-pulse {
    animation: warmPulse 2s ease-in-out infinite;
}

.animate-pop-bounce {
    animation: popBounce 0.6s ease infinite;
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

.animate-breathe {
    animation: breathe 3s ease-in-out infinite;
}

.animate-blur-in {
    animation: blurIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-jello {
    animation: jello 0.7s ease both;
}

.animate-rubber-band {
    animation: rubberBand 0.8s ease both;
}

.animate-swing {
    animation: swing 1s ease both;
}

.animate-heartbeat {
    animation: heartbeat 1.3s ease-in-out both;
}

.animate-wobble {
    animation: wobble 0.5s ease both;
}

.animate-flip-in-x {
    animation: flipInX 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-unfold {
    animation: unfold 0.4s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-pop-in {
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.animate-slide-in-up {
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-slide-in-down {
    animation: slideInDown 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.animate-reveal {
    animation: reveal 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 交错延迟类 */
.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; }
.stagger-7 { animation-delay: 0.35s; }
.stagger-8 { animation-delay: 0.4s; }

/* 初始隐藏（用于动画入场） */
.animate-on-scroll {
    opacity: 0;
}

.animate-on-scroll.is-visible {
    opacity: 1;
}

/* 骨架屏 */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0.1) 25%,
        rgba(255,255,255,0.2) 50%,
        rgba(255,255,255,0.1) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--border-radius-sm);
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.25);
}

/* 选中样式 */
::selection {
    background: var(--primary-200);
    color: var(--gray-900);
}

/* 焦点样式 */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== 工具类 ===== */

/* 显示 */
.hidden { display: none !important; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

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

/* 间距 */
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.m-0 { margin: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.ml-2 { margin-left: var(--space-2); }
.ml-4 { margin-left: var(--space-4); }
.mr-2 { margin-right: var(--space-2); }
.mr-4 { margin-right: var(--space-4); }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

/* 文字 */
.text-xs { font-size: 12px; }
.text-sm { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-2xl { font-size: 24px; }
.text-3xl { font-size: 30px; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-white { color: white; }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-info { color: var(--info); }

/* 背景 */
.bg-white { background-color: white; }
.bg-primary { background-color: rgba(255,255,255,0.12); }
.bg-secondary { background-color: rgba(255,255,255,0.08); }
.bg-tertiary { background-color: rgba(255,255,255,0.05); }

/* 圆角 */
.rounded-sm { border-radius: var(--border-radius-sm); }
.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }
.rounded-xl { border-radius: var(--border-radius-xl); }
.rounded-full { border-radius: 9999px; }

/* 阴影 —— 仅保留内发光 */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* 宽度 */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

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

/* 定位 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* 光标 */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* 不可选 */
.select-none { user-select: none; }

/* 打印样式基础 */
@media print {
    body {
        background: white;
        color: black;
    }
    .no-print {
        display: none !important;
    }
}

/* ===== 响应式显示/隐藏工具类 ===== */
.hidden-sm { display: inherit; }
.hidden-md { display: inherit; }
.hidden-lg { display: inherit; }
.show-sm-only { display: none !important; }
.show-md-only { display: none !important; }

@media (max-width: 768px) {
    .hidden-sm { display: none !important; }
    .show-sm-only { display: inherit !important; }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hidden-md { display: none !important; }
    .show-md-only { display: inherit !important; }
}

@media (min-width: 1025px) {
    .hidden-lg { display: none !important; }
}

/* 响应式文字大小 */
@media (max-width: 768px) {
    html { font-size: 15px; }
    .text-2xl { font-size: 20px; }
    .text-3xl { font-size: 24px; }
}

/* 响应式间距 */
@media (max-width: 768px) {
    .page-main {
        padding-top: var(--space-4) !important;
        padding-bottom: var(--space-6) !important;
    }
}

/* ===== 全局平滑滚动（移动端优化） ===== */
html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overscroll-behavior-y: none;
    /* 启用 GPU 加速 */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}
*, *::before, *::after {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
@media (prefers-reduced-motion: no-preference) {
    * {
        scroll-behavior: smooth;
    }
}
