/* 全局文字样式 */
.font-['Noto_Sans_SC'] {
    letter-spacing: 0.025em;
}

/* 标题文字样式 */
.font-['Noto_Serif_SC'] {
    text-rendering: optimizeLegibility;
}

/* 自定义滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 卡片样式和动画 */
.perspective-1000 {
    perspective: 2000px;
    padding: 2rem;
}

.name-card {
    width: 180px;
    height: 120px;
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 0.5rem;
    cursor: pointer;
}

.name-card.shuffling {
    animation: shuffle 1.2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.3));
}

.name-card.highlight {
    animation: highlight 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 10;
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-front {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border: 3px solid #3b82f6;
    color: #1e40af;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.card-back {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: rotateY(180deg);
    color: white;
    font-size: 2rem;
}

.name-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

@keyframes shuffle {
    0% {
        transform: rotateY(0) translateX(0) translateY(0);
    }
    25% {
        transform: rotateY(180deg) translateX(30px) translateY(-20px);
    }
    50% {
        transform: rotateY(360deg) translateX(0) translateY(0);
    }
    75% {
        transform: rotateY(540deg) translateX(-30px) translateY(20px);
    }
    100% {
        transform: rotateY(720deg) translateX(0) translateY(0);
    }
}

@keyframes highlight {
    0% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
    25% {
        transform: scale(1.15) rotate(-5deg);
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
    75% {
        transform: scale(1.15) rotate(5deg);
        box-shadow: 0 0 40px rgba(59, 130, 246, 0.8);
    }
    100% {
        transform: scale(1) rotate(0deg);
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
    }
}

/* 添加新的闪光效果 */
.card-front::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 2s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) rotate(45deg);
    }
}

/* 文件上传按钮悬停效果 */
#uploadBtn {
    transition: all 0.3s ease;
}

#uploadBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 提示消息动画 */
@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.toast-enter {
    animation: slideIn 0.3s ease forwards;
} 