/* Crazy Juice Sort - Custom Styles */

/* 基础样式重置和优化 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* 导航栏样式 */
#navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(255, 107, 157, 0.1);
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 液体流动动画 */
@keyframes liquid-flow {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.liquid-bg {
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4, #FFD93D, #9C88FF);
    background-size: 400% 400%;
    animation: liquid-flow 4s ease-in-out infinite;
}

/* 果汁滴落效果 */
.juice-drop {
    position: relative;
    overflow: hidden;
}

.juice-drop::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: liquid 3s ease-in-out infinite;
}

/* 浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float 6s ease-in-out infinite 2s;
}

.animate-float-slow {
    animation: float 8s ease-in-out infinite 4s;
}

/* 脉冲缩放动画 */
@keyframes pulse-scale {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.animate-pulse-scale {
    animation: pulse-scale 2s infinite;
}

/* 液体动画 */
@keyframes liquid {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-10px) rotate(2deg);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg);
    }
    75% {
        transform: translateY(-15px) rotate(1deg);
    }
}

.animate-liquid {
    animation: liquid 4s ease-in-out infinite;
}

/* 波浪动画 */
@keyframes wave {
    0%, 100% {
        transform: translateX(0px) scaleY(1);
    }
    50% {
        transform: translateX(10px) scaleY(1.1);
    }
}

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

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4, #FFD93D, #9C88FF);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: liquid-flow 4s ease-in-out infinite;
}

/* 按钮悬停效果 */
.btn-liquid {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-liquid::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-liquid:hover::before {
    left: 100%;
}

/* 卡片悬停效果 */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* 果汁瓶样式 */
.juice-bottle {
    position: relative;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.4) 100%);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 4px solid rgba(255, 255, 255, 0.5);
}

.juice-bottle::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 1px;
}

/* 液体层样式 */
.liquid-layer {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    animation: wave 3s ease-in-out infinite;
}

.liquid-layer:nth-child(1) {
    animation-delay: 0s;
}

.liquid-layer:nth-child(2) {
    animation-delay: 0.5s;
}

.liquid-layer:nth-child(3) {
    animation-delay: 1s;
}

.liquid-layer:nth-child(4) {
    animation-delay: 1.5s;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .juice-bottle {
        width: 280px;
        height: 280px;
    }
    
    .liquid-layer {
        height: 25%;
    }
}

@media (max-width: 480px) {
    .juice-bottle {
        width: 240px;
        height: 240px;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4);
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF6B9D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模态框动画 */
.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 文字渐变效果 */
.text-gradient {
    background: linear-gradient(45deg, #FF6B9D, #4ECDC4, #FFD93D, #9C88FF);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: liquid-flow 4s ease-in-out infinite;
}

/* 果汁滴落粒子效果已移除 */

/* Banner图片自适应样式 */
.banner-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    object-fit: cover;
    border-radius: 24px;
}

/* 响应式banner容器 */
.banner-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* 不同屏幕尺寸的banner最大宽度 */
@media (max-width: 640px) {
    .banner-container {
        max-width: 320px;
    }
}

@media (min-width: 641px) and (max-width: 768px) {
    .banner-container {
        max-width: 400px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .banner-container {
        max-width: 500px;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .banner-container {
        max-width: 600px;
    }
}

@media (min-width: 1281px) {
    .banner-container {
        max-width: 700px;
    }
}

/* 特色卡片样式 */
.feature-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 107, 157, 0.3);
}

/* 按钮样式增强 */
.btn-primary {
    background: linear-gradient(45deg, #FF6B9D, #9C88FF);
    border: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 107, 157, 0.3);
}

/* 移动端优化 */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .text-4xl {
        font-size: 2.5rem;
    }
    
    .text-3xl {
        font-size: 2rem;
    }
    
    .py-24 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .gradient-text {
        background: none;
        -webkit-background-clip: unset;
        -webkit-text-fill-color: unset;
        color: #FF6B9D;
    }
    
    .liquid-bg {
        background: #FF6B9D;
    }
}

/* 截图轮播样式 */
.screenshot-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 300px; /* 设置最小高度 */
    display: flex;
    flex-direction: column;
}

.screenshot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.screenshot-card:hover::before {
    left: 100%;
}

.screenshot-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 截图容器滚动样式 */
#screenshot-container {
    overflow: hidden;
    position: relative;
}

#screenshot-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* 无缝轮播动画 */
@keyframes infiniteScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.screenshot-track-auto {
    animation: infiniteScroll 20s linear infinite;
}

.screenshot-track-paused {
    animation-play-state: paused;
}

/* 截图轮播按钮样式 */
#screenshot-scroll-left,
#screenshot-scroll-right {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 107, 157, 0.2);
}

#screenshot-scroll-left:hover,
#screenshot-scroll-right:hover {
    background: #FF6B9D;
    border-color: #FF6B9D;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.3);
}

/* 图片悬停效果 */
.screenshot-card img {
    transition: transform 0.3s ease;
    width: 100%;
    height: auto;
    max-height: 400px; /* 设置最大高度 */
    object-fit: cover;
}

.screenshot-card:hover img {
    transform: scale(1.05);
}

/* 图片容器自适应 */
.screenshot-card .image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* 文本内容区域 */
.screenshot-card .text-content {
    flex-shrink: 0;
    padding-top: 1rem;
}

/* 响应式截图轮播 */
@media (max-width: 768px) {
    .screenshot-card {
        width: 280px;
        min-height: 250px;
    }
    
    .screenshot-card img {
        max-height: 300px;
    }
    
    .screenshot-card .image-container {
        min-height: 150px;
    }
    
    #screenshot-scroll-left,
    #screenshot-scroll-right {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    #screenshot-scroll-left {
        left: -20px;
    }
    
    #screenshot-scroll-right {
        right: -20px;
    }
}

@media (max-width: 480px) {
    .screenshot-card {
        width: 240px;
        min-height: 200px;
    }
    
    .screenshot-card img {
        max-height: 250px;
    }
    
    .screenshot-card .image-container {
        min-height: 120px;
    }
    
    .screenshot-card h3 {
        font-size: 16px;
    }
    
    .screenshot-card p {
        font-size: 12px;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .screenshot-card {
        transition: none;
    }
    
    .screenshot-card:hover {
        transform: none;
    }
}
