/* 基础样式重置 */
* {
    box-sizing: border-box;
}

/* 英雄区和特性区域样式 */
#about {
    background: linear-gradient(rgba(17, 36, 90, 0.5), rgba(17, 36, 90, 0.5)), url("/img/hero_img.jpg") center/cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

#feature {
    background: linear-gradient(rgba(17, 36, 90, 0.5), rgba(17, 36, 90, 0.5)), url("/img/p5.jpg") center/cover no-repeat;
    background-attachment: fixed;
    min-height: 75vh;
}

/* 部分标题样式 */
.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #ffffff;
}

/* 特性卡片样式 */
.feature-card {
    border-radius: 15px;
    padding: 30px;
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* 响应式布局 - 移动设备优先设计 */

/* 小屏幕设备 (手机, 小于 576px) */
@media (max-width: 575.98px) {
    /* 导航栏样式 */
    .navbar-brand span {
        font-size: 1rem !important;
    }
    
    /* 标题和文本样式 */
    h1.display-4 {
        font-size: 1.8rem !important;
    }
    
    h2.display-5 {
        font-size: 1.5rem !important;
    }
    
    h2.h3 {
        font-size: 1.2rem !important;
    }
    
    p.lead {
        font-size: 1rem !important;
    }
    
    /* 按钮样式 */
    .btn-lg {
        font-size: 0.9rem !important;
        padding: 0.75rem 1.5rem !important;
    }
    
    /* 间距调整 */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .container.py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* 特性卡片调整 */
    .feature-card {
        padding: 20px;
    }
    
    /* 表单元素调整 */
    .form-control {
        font-size: 0.9rem;
    }
    
    /* 页脚调整 */
    footer .col-md-6, 
    footer .col-md-3 {
        margin-bottom: 1.5rem;
    }
    
    footer .text-md-end {
        text-align: left !important;
    }
    
    /* 确保图片自适应 */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* 背景图片调整 */
    #about, #feature {
        background-attachment: scroll;
    }
}

/* 中等屏幕设备 (平板, 576px 至 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    /* 导航栏样式 */
    .navbar-brand span {
        font-size: 1.1rem !important;
    }
    
    /* 标题和文本样式 */
    h1.display-4 {
        font-size: 2rem !important;
    }
    
    h2.display-5 {
        font-size: 1.7rem !important;
    }
    
    /* 间距调整 */
    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }
    
    /* 背景图片调整 */
    #about, #feature {
        background-attachment: scroll;
    }
}

/* 大屏幕设备 (小型笔记本电脑, 768px 至 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* 标题和文本样式 */
    h1.display-4 {
        font-size: 2.2rem !important;
    }
    
    h2.display-5 {
        font-size: 1.8rem !important;
    }
}

/* 超大屏幕设备 (大型笔记本电脑和台式机, 992px 及以上) */
@media (min-width: 992px) {
    /* 为大屏幕设备添加自定义样式 */
    
    /* 滚动时导航栏样式变化 */
    .navbar.scrolled {
        background-color: rgba(255, 255, 255, 0.95) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* 通用响应式辅助类 */

/* 文本大小响应式调整 */
.text-responsive {
    font-size: calc(100% + 0.2vw + 0.2vh);
}

/* 确保内容不被设备刘海或底部指示器遮挡 */
body {
    padding-top: 70px;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 触摸设备上的交互调整 */
@media (hover: none) and (pointer: coarse) {
    .feature-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* 增加触摸目标大小 */
    a, button {
        min-height: 48px;
        min-width: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}