/* ================================================
   大鹏助手 - 公共样式 (custom.css)
   ================================================ */

/* ---- 滚动条美化 ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.02);
}
::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.18);
}

/* ---- 文字选中 ---- */
::selection {
    background: rgba(99,102,241,0.3);
    color: #f8fafc;
}

/* ---- 导航栏滚动效果 ---- */
#navbar {
    background: rgba(15,15,26,0.7);
    backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}
#navbar.navbar-scrolled {
    background: rgba(15,15,26,0.85);
    backdrop-filter: blur(20px);
    border-bottom-color: rgba(255,255,255,0.05);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* 导航链接 */
.nav-link {
    position: relative;
}
.nav-link.active {
    color: #f8fafc !important;
    background: rgba(99,102,241,0.12);
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 1px;
}

/* ---- 卡片基础样式 ---- */
.card-glass {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
}

/* ---- 渐变文字 ---- */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ---- 按钮悬浮动效 ---- */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    transition: all 0.25s ease;
}
.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99,102,241,0.35);
}

/* ---- 页面入场动画 ---- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.4s ease both;
}
.animate-fade-in-up {
    animation: fadeInUp 0.5s ease both;
}

/* ---- 移动端优化 ---- */
@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ---- 图片懒加载占位 ---- */
img[loading="lazy"] {
    background: rgba(255,255,255,0.03);
}

/* ---- 文本截断 ---- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
