/* 
* 老龄大市场官网 - 现代化动画和AI元素样式
* 包含额外的动画效果、AI元素和现代化设计元素
*/

/* 现代化动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse-grow {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideInFromLeft {
    0% { 
        opacity: 0; 
        transform: translateX(-50px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes slideInFromRight {
    0% { 
        opacity: 0; 
        transform: translateX(50px); 
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.pulse-grow-animation {
    animation: pulse-grow 2s ease-in-out infinite;
}

.slide-in-left {
    animation: slideInFromLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.8s ease-out forwards;
}

.fade-in {
    animation: fadeIn 1s ease-in forwards;
}

/* AI元素和科技感设计 */
.ai-element-container {
    display: flex;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.ai-element {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    color: white;
    margin: 0 10px;
    animation: pulse 2s infinite;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
}

.ai-element:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-element:nth-child(3) {
    animation-delay: 0.4s;
}

.ai-element:nth-child(4) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(74, 108, 247, 0.4); 
    }
    70% { 
        transform: scale(1.05); 
        box-shadow: 0 0 0 15px rgba(74, 108, 247, 0); 
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 0 0 0 rgba(74, 108, 247, 0); 
    }
}

/* 现代化卡片设计 */
.modern-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px -15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(74, 108, 247, 0.1), rgba(108, 92, 231, 0.1));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modern-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.15);
}

/* 渐变边框效果 */
.gradient-border {
    position: relative;
    border-radius: 16px;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient);
    border-radius: 18px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* 现代化按钮样式 */
.modern-btn {
    display: inline-block;
    padding: 14px 32px;
    background: var(--gradient);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(74, 108, 247, 0.3);
}

.modern-btn::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: 0.5s;
}

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

.modern-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 108, 247, 0.4);
}

.modern-btn:active {
    transform: translateY(-1px);
}

/* 现代化表单元素 */
.modern-input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--light-gray);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.modern-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

/* 现代化进度条 */
.modern-progress {
    height: 12px;
    background: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.modern-progress-bar {
    height: 100%;
    background: var(--gradient);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease;
}

/* 现代化标签 */
.modern-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(74, 108, 247, 0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    margin: 5px;
}

.modern-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* 现代化导航指示器 */
.nav-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient);
    z-index: 9999;
    transition: width 0.3s ease;
}

/* 现代化加载动画 */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(74, 108, 247, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 现代化弹窗样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    padding: 30px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray);
}

.modal-close:hover {
    color: var(--dark);
}

/* 现代化时间线 */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--light-gray);
    left: 20px;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding-left: 50px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    left: 10px;
    top: 5px;
    z-index: 1;
}

/* 现代化卡片网格 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* 现代化分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin: 40px 0;
    list-style: none;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--dark);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination a.active {
    background: var(--gradient);
    color: white;
}

/* 现代化搜索框 */
.modern-search {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
}

.modern-search input {
    width: 100%;
    padding: 14px 20px 14px 50px;
    border: 2px solid var(--light-gray);
    border-radius: 50px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.modern-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
}

.modern-search i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

/* 现代化下拉菜单 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 8px;
    overflow: hidden;
    top: 100%;
    left: 0;
}

.dropdown-content a {
    color: var(--dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: var(--light);
    padding-left: 20px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* 响应式优化 */
@media (max-width: 768px) {
    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modern-btn {
        width: 100%;
        text-align: center;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 50px;
    }
}

/* 高级动画效果 */
.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.animated.infinite {
    animation-iteration-count: infinite;
}

.animated.hinge {
    animation-duration: 2s;
}

.animated.flipOutX,
.animated.flipOutY,
.animated.bounceIn,
.animated.bounceOut {
    animation-duration: .75s;
}

@keyframes bounceIn {
    from, 20%, 40%, 60%, 80%, to {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }

    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }

    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }

    40% {
        transform: scale3d(.9, .9, .9);
    }

    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }

    80% {
        transform: scale3d(.97, .97, .97);
    }

    to {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

.bounceIn {
    animation-name: bounceIn;
}

/* 现代化图标动画 */
.icon-animation {
    transition: transform 0.3s ease;
}

.icon-animation:hover {
    transform: scale(1.2) rotate(10deg);
}

/* 现代化悬停效果 */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 现代化边框动画 */
.border-animation {
    position: relative;
    overflow: hidden;
}

.border-animation::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 4px;
    background: var(--gradient);
    transition: left 0.5s ease;
}

.border-animation:hover::after {
    left: 100%;
}