@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* 导入字体 */
@font-face {
    font-family: 'CustomFont';
    src: url('https://cdn.nmssb.cn/joe-assets-last/assets/font/hm.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --transition-speed: 0.3s;
}

/* 标签浮动动画 */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.float-animation {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

/* 不同的延迟时间，让标签浮动错开 */
.float-delay-0 { animation-delay: 0s; }
.float-delay-1 { animation-delay: 0.2s; }
.float-delay-2 { animation-delay: 0.4s; }
.float-delay-3 { animation-delay: 0.6s; }
.float-delay-4 { animation-delay: 0.8s; }
.float-delay-5 { animation-delay: 1s; }
.float-delay-6 { animation-delay: 1.2s; }
.float-delay-7 { animation-delay: 1.4s; }

/* 鼠标悬停时暂停动画并放大 */
.float-animation:hover {
    animation-play-state: paused;
    transform: scale(1.05);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'CustomFont', 'Inter', sans-serif;
    transition: background-color var(--transition-speed) ease;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: all var(--transition-speed) ease;
}

.dark .glass-effect {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.5);
}

.glass-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all var(--transition-speed) ease;
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.3);
}

.glass-footer {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-footer {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
    border-color: rgba(0, 115, 245, 0.3);
}

.dark .glass-card:hover {
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.4);
    border-color: rgba(0, 115, 245, 0.5);
}

/* 文章卡片内元素的交互效果 */
.glass-card h3 {
    transition: color 0.3s ease;
}

.glass-card:hover h3 {
    color: var(--primary-500);
}

.glass-card p {
    transition: color 0.3s ease;
}

.glass-card:hover p {
    color: var(--text-primary);
}

/* 文章卡片内的图标和按钮效果 */
.glass-card .flex.items-center.text-gray-500 {
    transition: opacity 0.3s ease;
}

.glass-card:hover .flex.items-center.text-gray-500 {
    opacity: 1;
}

/* 为卡片内的用户头像添加效果 */
.glass-card img.avatar {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover img.avatar {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(0, 115, 245, 0.3);
}

.sidebar-item {
    transition: all 0.2s ease;
}

.sidebar-item:hover {
    transform: translateX(5px);
}

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.dark .mobile-menu {
    background: rgba(15, 23, 42, 0.8);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu.active {
    transform: translateX(0);
}

.bg-pattern {
    background-image: url('https://free.picui.cn/free/2025/11/02/6906ffe8e529f.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.dark .bg-pattern {
    background-image: url('https://free.picui.cn/free/2025/10/04/68e0c7a4eaed9.jpg');
}

.social-icon {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.social-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 115, 245, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.social-icon:active::after {
    width: 300px;
    height: 300px;
}

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

.social-icon {
    animation: socialFadeIn 0.6s ease forwards;
    opacity: 0;
}

.social-icon:nth-child(1) { animation-delay: 0.1s; }
.social-icon:nth-child(2) { animation-delay: 0.2s; }
.social-icon:nth-child(3) { animation-delay: 0.3s; }
.social-icon:nth-child(4) { animation-delay: 0.4s; }

.nav-scrolled {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.dark .nav-scrolled {
    background: rgba(15, 23, 42, 0.85);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.slide-up {
    animation: slideUp 0.6s ease forwards;
}

/* 模态框样式 */
.modal {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

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

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 115, 245, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 115, 245, 0.7);
}

.dark ::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(0, 115, 245, 0.3);
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 115, 245, 0.5);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .glass-card {
        background: rgba(255, 255, 255, 0.7);
    }
    
    .dark .glass-card {
        background: rgba(15, 23, 42, 0.9);
    }
}