/* 自定义样式 */
@layer utilities {
    .glass-morphism {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
    }
    .glass-morphism-dark {
        background: rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
    .text-shadow {
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    .text-shadow-lg {
        text-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    .card-hover {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .card-hover:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
    .tab-active {
        @apply bg-primary text-white shadow-lg;
    }
    .tab-inactive {
        @apply bg-white/20 text-white/80 hover:bg-white/30;
    }
    .weather-icon {
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.1));
    }
    .gradient-text {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    .shimmer {
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
        background-size: 200% 100%;
        animation: shimmer 2s infinite;
    }
    .floating-particles::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-image: 
            radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
            radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.3) 0%, transparent 50%);
        animation: float 20s ease-in-out infinite;
        pointer-events: none;
    }
}

/* 自定义动画 */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-10px) rotate(1deg); 
    }
    66% { 
        transform: translateY(5px) rotate(-1deg); 
    }
}

@keyframes fadeIn {
    0% { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideUp {
    0% { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideDown {
    0% { 
        opacity: 0; 
        transform: translateY(-30px); 
    }
    100% { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes scaleIn {
    0% { 
        opacity: 0; 
        transform: scale(0.9); 
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
    }
}

@keyframes shimmer {
    0% { 
        background-position: -200% 0; 
    }
    100% { 
        background-position: 200% 0; 
    }
}

@keyframes gradient {
    0%, 100% { 
        background-position: 0% 50%; 
    }
    50% { 
        background-position: 100% 50%; 
    }
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .glass-morphism {
        backdrop-filter: blur(8px);
    }
    
    .card-hover:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .floating-particles::before {
        opacity: 0.5;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .glass-morphism {
        background: rgba(0, 0, 0, 0.2);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .glass-morphism {
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: none;
    }
    
    .gradient-text {
        background: none;
        -webkit-text-fill-color: initial;
        color: #4F46E5;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    .card-hover {
        transition: none;
    }
    
    .card-hover:hover {
        transform: none;
    }
    
    .floating-particles::before {
        animation: none;
    }
    
    .weather-icon {
        animation: none;
    }
}

/* 打印样式 */
@media print {
    .glass-morphism {
        background: white;
        backdrop-filter: none;
        border: 1px solid #ccc;
    }
    
    .gradient-text {
        background: none;
        -webkit-text-fill-color: initial;
        color: black;
    }
    
    .floating-particles::before {
        display: none;
    }
}