/* ========== 动画关键帧 ========== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(22, 93, 255, 0.5), 0 0 10px rgba(22, 93, 255, 0.3); }
    100% { box-shadow: 0 0 20px rgba(22, 93, 255, 0.8), 0 0 30px rgba(22, 93, 255, 0.5); }
}
@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes wave {
    0% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(2deg); }
    50% { transform: translateY(0) rotate(0deg); }
    75% { transform: translateY(5px) rotate(-2deg); }
    100% { transform: translateY(0) rotate(0deg); }
}
@keyframes liquid {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes float-letters {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@keyframes shine {
    0% { background-position: -100px; }
    60%, 100% { background-position: 320px; }
}

/* ========== 动画类 ========== */
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-glow { animation: glow 2s ease-in-out infinite alternate; }
.animate-rotate { animation: rotate 20s linear infinite; }
.animate-wave { animation: wave 3s ease-in-out infinite; }
.animate-liquid { animation: liquid 15s ease infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-pulse-slow { animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ========== 玻璃效果与渐变 ========== */
.glass-effect {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
.liquid-gradient {
    background: linear-gradient(120deg, #165DFF, #36D399, #FF6B35);
    background-size: 200% 200%;
    animation: liquid 15s ease infinite;
}
.text-gradient {
    background: linear-gradient(90deg, #165DFF, #36D399);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

/* ========== 背景纹理 ========== */
.bg-mesh {
    background-image: radial-gradient(rgba(22, 93, 255, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}
.grid-bg {
    background-size: 40px 40px;
    background-image:
        linear-gradient(to right, rgba(22, 93, 255, 0.05) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(22, 93, 255, 0.05) 1px, transparent 1px);
}
.molecule-bg {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 100 100'%3E%3Cpath d='M50 15a35 35 0 0 0 0 70 35 35 0 0 0 0-70zm0 10a25 25 0 0 1 0 50 25 25 0 0 1 0-50zm0 10a15 15 0 0 0 0 30 15 15 0 0 0 0-30zm0 10a5 5 0 0 1 0 10 5 5 0 0 1 0-10z' fill='none' stroke='%23165DFF10' stroke-width='1'/%3E%3C/svg%3E");
}

/* ========== 3D卡片效果 ========== */
.card-3d {
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-3d:hover {
    transform: perspective(1000px) rotateX(var(--rotate-x, 0deg)) rotateY(var(--rotate-y, 0deg)) translateZ(10px);
}

/* ========== 闪光效果 ========== */
.shine-effect {
    position: relative;
    overflow: hidden;
}
.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

/* ========== 文字浮动 ========== */
.text-float span {
    position: relative;
    display: inline-block;
    animation: float-letters 3s ease-in-out infinite;
    animation-delay: calc(0.1s * var(--char-index));
}

/* ========== 滚动出现动画 ========== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== 导航链接 ========== */
.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #165DFF;
    transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ========== 登录/注册按钮 ========== */
.login-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    background-color: rgba(22, 93, 255, 0.1);
    color: #165DFF;
    transition: all 0.3s ease;
}
.login-btn:hover {
    background-color: rgba(22, 93, 255, 0.2);
    transform: translateY(-2px);
}
.register-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    background-color: #165DFF;
    color: white;
    transition: all 0.3s ease;
}
.register-btn:hover {
    background-color: #0e4cca;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(22, 93, 255, 0.3);
}

/* ========== 用户信息 / 注销按钮 ========== */
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.btn-logout {
    padding: 0.3rem 1rem;
    border-radius: 0.5rem;
    background-color: rgba(255, 107, 53, 0.1);
    color: #FF6B35;
    transition: all 0.3s ease;
}
.btn-logout:hover {
    background-color: rgba(255, 107, 53, 0.2);
}

/* ========== 轮播图 ========== */
.slider-container {
    position: relative;
    max-width: 1200px;
    height: 675px;
    margin: 0 auto 20px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
.slider-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.slider-slide.active {
    opacity: 1;
}
.slider-image-container {
    width: 100%;
    height: 100%;
}
.slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.slider-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}
.slider-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-indicator.active {
    background-color: white;
    transform: scale(1.2);
}
.slide-counter {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
}

/* ========== 功能卡片 ========== */
.features {
    display: flex;
    gap: 20px;
}
.feature-card {
    flex: 1;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}
.feature-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #165DFF;
}
.feature-desc {
    color: #666;
}

/* ========== 金属金色文字 ========== */
.text-metallic-gold {
    background: linear-gradient(135deg, #f8e8c8 0%, #e6b325 50%, #f8e8c8 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: shine 3s linear infinite;
}

/* ========== 模态框 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 400px;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    position: relative;
}
.modal.active .modal-content {
    transform: scale(1);
}
.group-modal-content {
    max-width: 600px;
}
.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #165DFF;
}
.close-modal {
    font-size: 24px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-modal:hover {
    color: #334155;
}
.modal-body {
    padding: 20px;
}
.qq-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #f8fafc;
    border-radius: 12px;
}
.qq-icon {
    width: 50px;
    height: 50px;
    background-color: #165DFF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 24px;
}
.qq-number {
    font-size: 18px;
    font-weight: 500;
    color: #334155;
}
.modal-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
}
.copy-btn {
    padding: 10px 20px;
    background-color: #165DFF;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.copy-btn:hover {
    background-color: #0e4cca;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(22, 93, 255, 0.3);
}
.copy-success {
    color: #36D399;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.copy-success.active {
    opacity: 1;
}

/* 修复部分小屏显示 */
@media (max-width: 768px) {
    .features {
        flex-direction: column;
    }
}