
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
@layer utilities {
.content-auto {
    content-visibility: auto;
}
.nav-shadow {
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(22,93,255,0.15);
}
}

/* ========== 动画关键帧 ========== */
@keyframes fadeInUp {
from { opacity: 0; transform: translateY(40px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
from { opacity: 0; transform: translateY(-30px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
from { opacity: 0; transform: translateX(-40px); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
from { opacity: 0; transform: translateX(40px); }
to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
@keyframes pulse-ring {
0% { box-shadow: 0 0 0 0 rgba(255, 125, 0, 0.5); }
70% { box-shadow: 0 0 0 15px rgba(255, 125, 0, 0); }
100% { box-shadow: 0 0 0 0 rgba(255, 125, 0, 0); }
}
@keyframes gradient-x {
0%, 100% { background-position: 0% 50%; }
50% { background-position: 100% 50%; }
}

/* ========== 滚动触发动画类 ========== */
.animate-on-scroll {
opacity: 0;
transition: opacity 0.8s ease, transform 0.8s ease;
}
.animate-on-scroll.visible {
opacity: 1;
}
.animate-on-scroll.fade-up {
transform: translateY(50px);
}
.animate-on-scroll.fade-up.visible {
transform: translateY(0);
}
.animate-on-scroll.fade-down {
transform: translateY(-40px);
}
.animate-on-scroll.fade-down.visible {
transform: translateY(0);
}
.animate-on-scroll.fade-left {
transform: translateX(-50px);
}
.animate-on-scroll.fade-left.visible {
transform: translateX(0);
}
.animate-on-scroll.fade-right {
transform: translateX(50px);
}
.animate-on-scroll.fade-right.visible {
transform: translateX(0);
}
.animate-on-scroll.zoom-in {
transform: scale(0.9);
}
.animate-on-scroll.zoom-in.visible {
transform: scale(1);
}

/* 延迟动画 */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* 页面加载动画 */
.page-title {
animation: fadeInDown 0.8s ease-out 0.3s both;
}
.banner-subtitle {
animation: fadeInUp 0.8s ease-out 0.6s both;
}
.banner-btn {
animation: fadeInUp 0.8s ease-out 0.9s both;
}

/* 浮动动画 */
.float-animation {
animation: float 3s ease-in-out infinite;
}

/* 咨询按钮脉冲 */
.consult-btn {
animation: pulse-ring 2s infinite;
}

/* 渐变文字背景 */
.animated-gradient {
background-size: 200% 200%;
animation: gradient-x 4s ease infinite;
}

/* 平滑滚动 + 固定头部偏移 */
html {
scroll-behavior: smooth;
scroll-padding-top: 70px;
}
[id] {
scroll-margin-top: 70px;
}

/* 卡片悬浮增强 */
.teacher-card {
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.teacher-card:hover {
transform: translateY(-8px);
box-shadow: 0 20px 40px rgba(22, 93, 255, 0.15);
}

/* 课程卡片光效 */
.course-card {
transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.course-card:hover {
transform: translateY(-12px) scale(1.02);
}

/* 课程分类 Tab */
.course-tab {
color: rgba(255,255,255,0.7);
background: rgba(255,255,255,0.08);
border: 1px solid rgba(255,255,255,0.15);
}
.course-tab:hover {
color: #fff;
background: rgba(255,255,255,0.15);
}
.course-tab.active {
color: #fff;
background: linear-gradient(135deg, #3b82f6, #f97316);
border-color: transparent;
box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

/* 作品卡片 */
.works-card {
transition: all 0.4s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.works-card:hover {
transform: translateY(-4px);
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* 美容知识文章卡片 */
.article-card {
transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.article-card:hover {
transform: translateY(-8px);
box-shadow: 0 20px 45px rgba(22, 93, 255, 0.12);
}

/* 师资卡片网格优化 */
.teacher-grid {
align-items: stretch;
}
.teacher-grid .teacher-card {
display: flex;
flex-direction: column;
height: 100%;
}
.teacher-grid .teacher-card .p-6 {
display: flex;
flex-direction: column;
flex: 1;
padding: 1.25rem;
}
.teacher-grid .teacher-card .space-y-2 {
flex: 1;
}
.teacher-grid .teacher-card .space-y-2 p {
font-size: 0.75rem;
line-height: 1.5;
}
.teacher-grid .teacher-card h3 {
font-size: 1rem;
}
.teacher-grid .teacher-card p.text-accent {
font-size: 0.75rem;
line-height: 1.4;
}
@media (min-width: 1024px) {
.teacher-grid .teacher-card .w-28 {
    width: 5rem;
    height: 5rem;
}
}

/* 表单聚焦 */
input:focus, select:focus, textarea:focus {
box-shadow: 0 0 0 3px rgba(22, 93, 255, 0.15);
}

/* 返回顶部按钮 */
.back-to-top {
opacity: 0;
pointer-events: none;
transition: all 0.3s ease;
}
.back-to-top.visible {
opacity: 1;
pointer-events: auto;
}

/* 页面加载动画 */
.page-loader {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #fff;
z-index: 9999;
display: flex;
align-items: center;
justify-content: center;
transition: opacity 0.5s ease;
}
.page-loader.hide {
opacity: 0;
visibility: hidden;
}
.loader-spinner {
width: 50px;
height: 50px;
border: 4px solid #e8edf5;
border-top-color: #165DFF;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}

/* 导航栏滚动时改变背景 */
.header-scrolled {
backdrop-filter: blur(10px);
background: rgba(255, 255, 255, 0.95) !important;
}

/* 减少动画（尊重用户设置） */
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
}
}

/* ========== 移动端适配 ========== */
@media (max-width: 768px) {
/* Banner移动端高度调整 */
section#home .h-\[500px\] {
    height: auto !important;
    min-height: 400px;
    padding: 60px 0 50px !important;
}
/* 标题字号 */
.page-title {
    font-size: 1.75rem !important;
    line-height: 1.4 !important;
}
.banner-subtitle {
    font-size: 0.95rem !important;
}
/* 统计数据 */
.banner-subtitle .gap-8 {
    gap: 1rem !important;
}
/* 浮动咨询按钮移动端 */
.consult-btn {
    right: 10px !important;
    bottom: 80px !important;
    transform: none !important;
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
}
.consult-btn span {
    display: none;
}
/* 返回顶部移动端上移避免重叠 */
.back-to-top {
    bottom: 20px !important;
}
/* Logo文字缩小 */
header h1 {
    font-size: 1rem !important;
}
/* 课程卡片移动端 */
.course-card .text-3xl {
    font-size: 1.5rem !important;
}
/* 统计数字移动端 */
section#home [data-count] {
    font-size: 1.5rem !important;
}
/* 作品卡片高度调整 */
.works-card.h-60 {
    height: 160px !important;
}
/* 联系表单移动端 */
#signup .bg-white.rounded-xl {
    padding: 20px !important;
}
/* 课程亮点移动端 */
#course .grid.grid-cols-1.md\:grid-cols-4 {
    grid-template-columns: 1fr 1fr !important;
}
/* 关于我们图片移动端 */
#about .lg\:w-1\/2 img {
    margin-bottom: 20px;
}
/* 报名按钮移动端 */
.banner-btn .px-8 {
    padding: 10px 20px !important;
    font-size: 0.9rem !important;
}
}

/* 移动端菜单 */
.mobile-menu {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}
.mobile-menu.open {
max-height: 600px;
}