/* 现代化动画效果和额外样式 */

/* 额外动画效果 */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px var(--primary-color, #2563eb);
    }
    50% {
        box-shadow: 0 0 20px var(--primary-color, #2563eb), 0 0 30px var(--primary-color, #2563eb);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* 页面状态类 */
.page-loaded .main-container {
    opacity: 1;
    transform: translateY(0);
}

.page-focus .logo-placeholder {
    animation: heartbeat 2s ease-in-out infinite;
}

.page-fully-loaded .banner-area {
    /* 移除动画效果，保持静态 */
}

/* 悬浮提示效果 */
[data-tooltip] {
    position: relative;
    cursor: pointer;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 0.5rem;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    animation: fadeInUp 0.3s ease-out 0.5s forwards;
}

[data-tooltip]:hover::before {
    content: '';
    position: absolute;
    bottom: 95%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1e293b;
    z-index: 1000;
    opacity: 0;
    animation: fadeInUp 0.3s ease-out 0.5s forwards;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 0.375rem;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
}

/* 选中文本样式 */
::selection {
    background: #dbeafe;
    color: #2563eb;
}

::-moz-selection {
    background: #dbeafe;
    color: #2563eb;
}

/* 加载骨架屏效果 */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 焦点可见性增强 */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
    border-radius: 0.375rem;
}

/* 额外的现代化视觉效果 */
.modern-card-effect {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-effect {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* 响应式设计增强 */
@media (max-width: 768px) {
    .section-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-bar .nav-links-container {
        flex-wrap: wrap;
    }
    
    .nav-bar a {
        flex-basis: 50%;
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .header-main .logo-text {
        font-size: 24px;
    }
    
    .banner-area {
        min-height: 240px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .nav-bar a {
        flex-basis: 100%;
        padding: 10px;
        font-size: 14px;
    }
    
    .header-main .logo-text {
        font-size: 20px;
    }
    
    .banner-area {
        min-height: 200px;
        font-size: 18px;
    }
    
    .section-title {
        font-size: 18px;
        padding: 16px 20px;
    }
}

/* 高对比度支持 */
@media (prefers-contrast: high) {
    .nav-bar a:hover,
    .nav-bar a.active {
        background: #000000;
    }
}

/* 减少动画偏好支持 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .main-container {
        animation: none;
    }
}