/* =================================
   PsychFlow Mobile Styles
   移动端响应式样式
   ================================= */

/* 移动端媒体查询 */
@media (max-width: 768px) {
    
    /* =================================
       导航栏移动端适配
       ================================= */
    nav {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        height: auto !important;
        min-height: 4rem !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        position: relative;
        flex-wrap: wrap;
    }
    
    /* Logo区域 */
    nav .flex:first-child {
        flex: 0 0 auto;
    }
    
    /* 移动端菜单按钮 */
    .mobile-menu-btn {
        display: block !important;
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #4299E1;
        cursor: pointer;
        padding: 0.5rem;
        z-index: 60;
        order: 2;
    }
    
    /* 桌面端菜单在移动端隐藏 */
    #desktop-menu {
        display: none !important;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        border-radius: 0.75rem;
        margin-top: 1rem;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        position: absolute;
        top: 100%;
        left: 1rem;
        right: 1rem;
        z-index: 50;
        border: 1px solid rgba(255, 255, 255, 0.2);
        order: 3;
        flex-basis: 100%;
    }
    
    #desktop-menu.show {
        display: flex !important;
    }
    
    /* 菜单项移动端样式 */
    #desktop-menu a {
        padding: 0.75rem 1rem !important;
        border-radius: 0.5rem !important;
        transition: all 0.3s ease !important;
        text-align: center !important;
    }
    
    #desktop-menu a:hover {
        background: rgba(66, 153, 225, 0.1) !important;
    }
    
    /* 移动端按钮样式 */
    #desktop-menu button {
        margin-top: 0.5rem !important;
        width: 100% !important;
        justify-content: center !important;
    }
    
    /* =================================
       主要内容区域移动端适配
       ================================= */
    .relative.h-\[700px\] {
        height: 100vh !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .relative.h-\[700px\] .relative.flex {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .w-\[700px\] {
        width: 100% !important;
        max-width: none !important;
    }
    
    /* 主标题移动端适配 */
    .text-7xl {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
        line-height: 1.6 !important;
    }
    
    /* 按钮组移动端适配 */
    .flex.gap-6 {
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: stretch !important;
    }
    
    .btn-premium-direct,
    .btn-premium-outline {
        width: 100% !important;
        text-align: center !important;
        padding: 1rem !important;
        font-size: 1.125rem !important;
    }
    
    /* =================================
       视频区域移动端适配
       ================================= */
    .py-20 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .px-8 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .text-4xl {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    .mb-12 {
        margin-bottom: 2rem !important;
    }
    
    /* =================================
       功能卡片移动端适配
       ================================= */
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
    
    .premium-card {
        padding: 2rem !important;
    }
    
    .text-2xl {
        font-size: 1.5rem !important;
    }
    
    /* =================================
       轮播图移动端适配
       ================================= */
    .py-24 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }
    
    .px-16 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .lg\:px-32 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* 轮播图容器适配 */
    .carousel-container {
        margin: 0 -1rem !important;
    }
    
    .carousel-slide img {
        height: 200px !important;
        object-fit: cover !important;
    }
    
    .carousel-title {
        font-size: 1.25rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .carousel-description {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    
    /* =================================
       实验类型网格移动端适配
       ================================= */
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }
    
    .grid.grid-cols-4 .p-4 {
        padding: 1rem !important;
    }
    
    .grid.grid-cols-4 .text-sm {
        font-size: 0.75rem !important;
    }
    
    .grid.grid-cols-4 .text-xs {
        font-size: 0.625rem !important;
    }
    
    /* =================================
       特性区域移动端适配
       ================================= */
    .grid.grid-cols-4.gap-8 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
    
    /* =================================
       页脚移动端适配
       ================================= */
    footer .grid.grid-cols-4 {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        text-align: center !important;
    }
    
    footer .text-lg {
        font-size: 1.125rem !important;
    }
    
    footer .space-y-3 {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    
    /* =================================
       通用工具类
       ================================= */
    .max-w-6xl,
    .max-w-7xl {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .max-w-4xl {
        max-width: 100% !important;
    }
    
    .leading-relaxed {
        line-height: 1.6 !important;
    }
    
    /* 隐藏桌面端显示的元素 */
    .hidden-mobile {
        display: none !important;
    }
    
    /* 移动端特殊优化 */
    body {
        font-size: 16px !important;
        line-height: 1.5 !important;
    }
    
    /* 确保触摸目标足够大 */
    button, a {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* 移动端滚动优化 */
    html {
        scroll-behavior: smooth;
    }
    
    /* 防止移动端缩放 */
    input, textarea, select {
        font-size: 16px !important;
    }
    
    /* 移动端背景图优化 */
    .bg-\[url\(\'assets\/main_background\.jpg\'\)\] {
        background-attachment: scroll !important;
    }
    
    /* 实验卡片点击优化 */
    .hover-card[onclick] {
        cursor: pointer !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }
    
    .hover-card[onclick]:hover {
        transform: translateY(-4px) !important;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
    }
    
    .hover-card[onclick]:active {
        transform: translateY(-2px) !important;
        transition: all 0.1s ease !important;
    }
}

/* 桌面端隐藏移动端菜单按钮 */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

/* 更小屏幕设备适配 (小于480px) */
@media (max-width: 480px) {
    .text-7xl {
        font-size: 2rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    .text-2xl {
        font-size: 1.25rem !important;
    }
    
    .grid.grid-cols-4 {
        grid-template-columns: 1fr !important;
    }
    
    .carousel-slide img {
        height: 150px !important;
    }
    
    .premium-card {
        padding: 1.5rem !important;
    }
    
    .w-20.h-20 {
        width: 3rem !important;
        height: 3rem !important;
    }
    
    .text-3xl {
        font-size: 1.25rem !important;
    }
}

/* 平板设备适配 (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .px-16 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
    
    .lg\:px-32 {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
    
    .text-7xl {
        font-size: 4rem !important;
    }
    
    .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
    }
    
    .grid.grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
