/* ==============================================
   AuraLink 高级 UI 优化
   2025年10月3日更新
============================================== */

/* 1. 高级按钮效果 */
.btn-advanced {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-advanced::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-advanced:hover::before {
    width: 300px;
    height: 300px;
}

.btn-3d {
    box-shadow: 0 4px 0 #5568c7, 0 8px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(0);
    transition: all 0.2s;
}

.btn-3d:hover {
    box-shadow: 0 2px 0 #5568c7, 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(2px);
}

.btn-3d:active {
    box-shadow: 0 0 0 #5568c7, 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(4px);
}

/* 2. 悬浮卡片系统 */
.floating-card {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.card-glow {
    position: relative;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.card-glow::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(102, 126, 234, 0.3),
        transparent
    );
    transform: rotate(45deg);
    transition: all 0.6s;
}

.card-glow:hover::before {
    animation: glow 1.5s infinite;
}

@keyframes glow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

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

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.gradient-border-animated::before {
    background: linear-gradient(
        45deg,
        #667eea,
        #764ba2,
        #f093fb,
        #667eea
    );
    background-size: 300% 300%;
    animation: gradientRotate 3s linear infinite;
}

@keyframes gradientRotate {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 4. 粒子背景效果 */
.particle-bg {
    position: relative;
    overflow: hidden;
}

.particle-bg::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(240, 147, 251, 0.1) 0%, transparent 50%);
    animation: particleMove 10s ease-in-out infinite;
}

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

/* 5. 数字计数动画 */
.counter-number {
    font-variant-numeric: tabular-nums;
    transition: all 0.5s ease;
}

.counter-wrapper {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.counter-wrapper .digit {
    display: inline-block;
    animation: countUp 0.5s ease-out;
}

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

/* 6. 鼠标跟随光效 */
.cursor-glow {
    position: relative;
}

.cursor-glow::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(
        circle,
        rgba(102, 126, 234, 0.2) 0%,
        transparent 70%
    );
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.cursor-glow:hover::after {
    opacity: 1;
    animation: cursorMove 3s ease-in-out infinite;
}

@keyframes cursorMove {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-30%, -60%);
    }
}

/* 7. 进度圈 */
.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        #667eea 0%,
        #764ba2 var(--progress, 0%),
        #e9ecef var(--progress, 0%)
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-circle::before {
    content: '';
    position: absolute;
    width: 90%;
    height: 90%;
    background: white;
    border-radius: 50%;
}

.progress-circle-content {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 1.5rem;
}

/* 8. 滑动标签页增强 */
.tab-enhanced {
    position: relative;
    display: inline-flex;
    gap: 2px;
    background: #f1f3f5;
    padding: 4px;
    border-radius: 12px;
}

.tab-enhanced .tab-item {
    padding: 10px 20px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
}

.tab-enhanced .tab-item.active {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tab-indicator {
    position: absolute;
    height: calc(100% - 8px);
    background: white;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 0;
}

/* 9. 翻转卡片效果 */
.flip-card {
    perspective: 1000px;
    width: 100%;
    height: 300px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
    background: white;
}

.flip-card-back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: rotateY(180deg);
}

/* 10. 时间线增强 */
.timeline-enhanced {
    position: relative;
    padding-left: 30px;
}

.timeline-enhanced::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        to bottom,
        #667eea,
        #764ba2,
        #f093fb
    );
}

.timeline-item-enhanced {
    position: relative;
    margin-bottom: 40px;
    padding-left: 20px;
}

.timeline-item-enhanced::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    border: 3px solid #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

.timeline-item-enhanced.active::before {
    background: #667eea;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(102, 126, 234, 0);
    }
}

/* 11. 价格卡片 */
.pricing-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.4s;
    overflow: hidden;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.4s;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.3);
}

.pricing-card:hover::before {
    transform: scaleX(1);
}

.pricing-card.featured {
    border: 2px solid #667eea;
    transform: scale(1.05);
}

.pricing-badge {
    position: absolute;
    top: 20px;
    right: -35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* 12. 图片悬停效果 */
.image-hover-zoom {
    overflow: hidden;
    border-radius: 16px;
}

.image-hover-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block;
    width: 100%;
}

.image-hover-zoom:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.image-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(102, 126, 234, 0.8),
        rgba(118, 75, 162, 0.8)
    );
    opacity: 0;
    transition: opacity 0.4s;
}

.image-overlay:hover::after {
    opacity: 1;
}

.image-overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s;
    z-index: 1;
}

.image-overlay:hover .image-overlay-content {
    opacity: 1;
    transform: translateY(0);
}

/* 13. 标签云效果 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 20px;
    border: 1px solid #dee2e6;
    font-size: 0.9rem;
    transition: all 0.3s;
    cursor: pointer;
}

.tag-item:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 14. 模态框增强 */
.modal-enhanced {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-enhanced.active {
    opacity: 1;
    visibility: visible;
}

.modal-content-enhanced {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-enhanced.active .modal-content-enhanced {
    transform: scale(1);
}

/* 15. Accordion 增强 */
.accordion-enhanced .accordion-item {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: all 0.3s;
}

.accordion-enhanced .accordion-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.accordion-enhanced .accordion-header {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    transition: all 0.3s;
}

.accordion-enhanced .accordion-item.active .accordion-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.accordion-enhanced .accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 1.25rem;
}

.accordion-enhanced .accordion-item.active .accordion-body {
    max-height: 1000px;
    padding: 1.25rem;
}

/* 16. 面包屑导航增强 */
.breadcrumb-enhanced {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.breadcrumb-enhanced a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-enhanced a:hover {
    color: #667eea;
}

.breadcrumb-enhanced .separator {
    color: #dee2e6;
}

.breadcrumb-enhanced .active {
    color: #667eea;
    font-weight: 600;
}

/* 17. 评分星星 */
.rating-stars {
    display: inline-flex;
    gap: 5px;
}

.star {
    color: #dee2e6;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.5rem;
}

.star.active,
.star:hover {
    color: #ffc107;
    transform: scale(1.2);
}

/* 18. 切换开关 */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #dee2e6;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.toggle-switch.active::before {
    transform: translateX(30px);
}

/* 19. 搜索框增强 */
.search-box-enhanced {
    position: relative;
    display: inline-block;
}

.search-box-enhanced input {
    padding: 12px 45px 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    width: 300px;
    font-size: 1rem;
    transition: all 0.3s;
}

.search-box-enhanced input:focus {
    outline: none;
    border-color: #667eea;
    width: 400px;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box-enhanced button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.search-box-enhanced button:hover {
    transform: translateY(-50%) scale(1.1);
}

/* 20. 响应式优化 */
@media (max-width: 768px) {
    .flip-card {
        height: 250px;
    }
    
    .pricing-card {
        padding: 1.5rem;
    }
    
    .search-box-enhanced input {
        width: 200px;
    }
    
    .search-box-enhanced input:focus {
        width: 250px;
    }
    
    .progress-circle {
        width: 80px;
        height: 80px;
    }
    
    .modal-content-enhanced {
        padding: 1.5rem;
    }
}

