/* 手机应用截图展示样式 */
.app-showcase-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef, #dee2e6);
    color: #333;
    padding: 80px 20px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* 主容器 - 包含按钮和轮播内容 */
.app-showcase-container {
    position: relative;
    width: 100%;
    max-width: 500px; /* 比轮播容器宽，为按钮留出空间 */
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* 轮播包装器 */
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    height: 684px; /* 400 * 1250/750 = 667px */
    perspective: 1000px;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.card {
    position: absolute;
    width: 73%;
    height: 95%;
    top: 2.5%;
    left: 12.5%;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.5s ease, opacity 0.5s ease;
    background: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20px;
    background-color: #f5f5f5;
}

/* 按钮样式 - 相对于主容器定位 */
.btn-left, .btn-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(20, 21, 23, 0.87);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    /* 移除移动端点击高亮效果 */
    -webkit-tap-highlight-color: transparent; /* iOS Safari, Chrome, Edge */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */
    outline: none; /* 移除焦点轮廓 */
}

/* 左侧按钮 - 固定在轮播容器左侧固定距离 */
.btn-left {
    left: -80px; /* 从轮播容器左侧向外偏移80px */
}

/* 右侧按钮 - 固定在轮播容器右侧固定距离 */
.btn-right {
    right: -80px; /* 从轮播容器右侧向外偏移80px */
}

.btn-left:hover, .btn-right:hover {
    background: rgba(76, 77, 79, 0.97);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

/* 移除按钮点击时的默认样式 */
.btn-left:focus, .btn-right:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-left:active, .btn-right:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(20, 21, 23, 0.97);
    /* 移除点击时的阴影变化，保持一致性 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.counter {
    margin-top: 20px;
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 20px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    display: block;
    width: fit-content;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
}

/* 响应式调整 - 保持按钮相对位置固定 */
@media (max-width: 768px) {
    .app-showcase-container {
        max-width: 500px;
    }

    .carousel-container {
        max-width: 350px;
        height: 583px; /* 350 * 1250/750 = 583px */
    }

    .carousel-wrapper {
        max-width: 350px;
    }

    .btn-left {
        left: -60px; /* 保持相对距离，但稍微缩小 */
    }

    .btn-right {
        right: -60px; /* 保持相对距离，但稍微缩小 */
    }

    .btn-left, .btn-right {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .app-showcase-container {
        max-width: 400px;
    }

    .carousel-container {
        max-width: 300px;
        height: 500px; /* 300 * 1250/750 = 500px */
    }

    .carousel-wrapper {
        max-width: 300px;
    }

    .app-showcase-section {
        padding: 60px 15px;
        min-height: 90vh;
    }

    .btn-left {
        left: -10px; /* 调整移动端位置 */
    }

    .btn-right {
        right: -10px; /* 调整移动端位置 */
    }

    .btn-left, .btn-right {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    .counter {
        font-size: 1.1rem;
        padding: 8px 18px;
        margin-top: 15px;
    }
}

/* 超小屏幕适配 */
@media (max-width: 360px) {
    .app-showcase-container {
        max-width: 340px;
    }

    .carousel-container {
        max-width: 280px;
        height: 467px; /* 280 * 1250/750 = 467px */
    }

    .carousel-wrapper {
        max-width: 280px;
    }

    .btn-left {
        left: -40px; /* 调整超小屏幕位置 */
    }

    .btn-right {
        right: -40px; /* 调整超小屏幕位置 */
    }

    .btn-left, .btn-right {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

/* 平板设备适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .app-showcase-container {
        max-width: 550px;
    }

    .carousel-container {
        max-width: 450px;
        height: 750px; /* 450 * 1250/750 = 750px */
    }

    .carousel-wrapper {
        max-width: 450px;
    }

    .btn-left {
        left: -100px; /* 调整平板位置 */
    }

    .btn-right {
        right: -100px; /* 调整平板位置 */
    }

    .btn-left, .btn-right {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
}

/* 大屏幕适配 */
@media (min-width: 1200px) {
    .app-showcase-container {
        max-width: 600px;
    }

    .carousel-container {
        max-width: 450px;
        height: 750px;
    }

    .carousel-wrapper {
        max-width: 450px;
    }

    .btn-left {
        left: -120px; /* 调整大屏幕位置 */
    }

    .btn-right {
        right: -120px; /* 调整大屏幕位置 */
    }
}

/* 移动端触摸优化 - 特别针对点击高亮 */
@media (hover: none) and (pointer: coarse) {
    .btn-left, .btn-right {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        /* 确保移动端点击时没有高亮效果 */
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .btn-left:hover, .btn-right:hover {
        transform: translateY(-50%);
    }

    .btn-left:active, .btn-right:active {
        transform: translateY(-50%) scale(0.92);
        background: rgba(20, 21, 23, 0.95);
        /* 移除移动端点击时的蓝色背景 */
        -webkit-tap-highlight-color: transparent;
        background-color: rgba(20, 21, 23, 0.95) !important;
    }
}

/* 为按钮添加额外的点击效果移除 */
.btn-left::selection, .btn-right::selection {
    background: transparent;
}

.btn-left::-moz-selection, .btn-right::-moz-selection {
    background: transparent;
}

/* 添加全局样式，确保所有按钮都没有点击高亮 */
button,
button:focus,
button:active {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    outline: none;
}