/* 简洁版官网样式 */

/* 基础动画定义 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.4;
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 应用动画类 */
.animate-fade-in {
    animation: fadeIn 1.2s ease-out;
}

.animate-slide-up {
    animation: slideUp 1.2s ease-out 0.3s both;
}

.animate-bounce-in {
    animation: bounceIn 1.2s ease-out 0.6s both;
}

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

/* 应用图标容器样式 */
.app-icon-container {
    perspective: 1000px;
}

.app-icon-wrapper {
    transition: transform 0.3s ease;
}

.app-icon-wrapper:hover {
    transform: rotateY(10deg) rotateX(10deg);
}

.app-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -6px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #ec4899, #f59e0b, #3b82f6);
    background-size: 400% 400%;
    border-radius: 24px;
    z-index: -1;
    animation: shimmer 3s linear infinite;
}

/* 功能卡片样式 */
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.feature-card:hover::before {
    opacity: 1;
}

/* 下载按钮样式 */
.download-btn {
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.download-btn:hover {
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.4);
    transform: translateY(-3px) scale(1.05);
}

.download-btn:active {
    transform: translateY(-1px) scale(1.02);
    transition-duration: 0.1s;
}

/* 渐变文字效果 */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 模态框样式 */
#downloadModal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#downloadModal.show {
    display: flex !important;
}

#downloadModal.show > div {
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 通知样式 */
.notification {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.notification.show {
    animation: notificationSlideIn 0.4s ease-out;
}

.notification.hide {
    animation: notificationSlideOut 0.3s ease-in;
}

@keyframes notificationSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes notificationSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.8);
    }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    background-clip: content-box;
}

/* 选择样式 */
::selection {
    background: rgba(59, 130, 246, 0.2);
    color: #1e40af;
}

/* 焦点样式 */
button:focus,
.download-btn:focus {
    outline: none;
    ring: 4px;
    ring-color: rgba(59, 130, 246, 0.3);
    ring-opacity: 0.5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 3rem !important;
        line-height: 1.1;
    }
    
    .feature-card {
        margin-bottom: 1.5rem;
    }
    
    .download-btn {
        font-size: 1.125rem;
        padding: 1rem 2rem;
        width: 100%;
        max-width: 320px;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem !important;
    }
    
    .text-xl {
        font-size: 1.125rem !important;
    }
    
    .text-lg {
        font-size: 1rem !important;
    }
    
    .download-btn {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .app-icon-wrapper img {
        width: 5rem !important;
        height: 5rem !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem !important;
    }
    
    .feature-card div {
        padding: 1.5rem !important;
    }
    
    #downloadModal > div {
        margin: 1rem !important;
        padding: 1.5rem !important;
    }
}

/* 平板适配 */
@media (max-width: 1024px) and (min-width: 769px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* 横屏手机适配 */
@media (max-height: 600px) and (orientation: landscape) {
    .container {
        padding: 1rem 1.5rem;
    }
    
    h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }
    
    .mb-12, .mb-16 {
        margin-bottom: 2rem !important;
    }
    
    .mb-20 {
        margin-bottom: 1rem !important;
    }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-float {
        animation: none;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .feature-card div {
        border: 2px solid #000;
        background: #fff !important;
    }
    
    .download-btn {
        border: 2px solid #fff;
    }
    
    .bg-gradient-to-r {
        background: #2563eb !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    }
    
    .feature-card div {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(20px);
    }
    
    h1, h3 {
        color: #f8fafc !important;
    }
    
    p {
        color: #cbd5e1 !important;
    }
    
    .text-gray-800 {
        color: #f8fafc !important;
    }
    
    .text-gray-600 {
        color: #94a3b8 !important;
    }
    
    .text-gray-500 {
        color: #64748b !important;
    }
    
    .text-gray-400 {
        color: #475569 !important;
    }
    
    #downloadModal > div {
        background: #1e293b !important;
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* 性能优化 */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform, opacity;
}

/* 防止 FOUC (Flash of Unstyled Content) */
.fade-in-once {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

/* 字体优化 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* 图像优化 */
img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 点击反馈 */
.download-btn:active,
button:active {
    transform: scale(0.98);
}

/* 加载状态 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    to {
        left: 100%;
    }
}