/* 前台公共样式：现代化 UI 设计 */

body.front-body {
    margin: 0;
    background-color: #f8fafc;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.front-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header-bg {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e3a5f 100%);
}

/* 顶部导航 */
.front-header {
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.front-header.scrolled {
    background: rgba(30, 27, 75, 0.95) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* 全局链接过渡 */
a {
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* 卡片悬浮效果 */
.front-body .hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.front-body .hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.12);
}

/* 渐入动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-100 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-300 { animation-delay: 0.3s; opacity: 0; }
.animate-delay-400 { animation-delay: 0.4s; opacity: 0; }

/* 脉冲光效按钮 */
.btn-glow {
    position: relative;
    overflow: hidden;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-glow:hover::after {
    opacity: 1;
}

/* 主体区域 */
.front-main {
    flex: 1;
}

.front-main-inner {
    max-width: 1480px;
    margin: 40px auto 48px;
    padding: 0 16px;
}

/* 首页单独放大内容区域 */
.page-home .front-main-inner {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.page-fullwidth .front-main-inner {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* PC端统一宽度 */
@media (min-width: 1536px) {
    .container {
        max-width: 1504px;
    }
}

/* 卡片样式 */
.front-body .layui-panel {
    background-color: #ffffff;
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.3s ease;
}

.front-body .layui-panel:hover {
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
}

/* 输入框聚焦效果 */
.front-body input:focus,
.front-body textarea:focus,
.front-body select:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transition: box-shadow 0.2s ease;
}

/* 页脚渐变 */
footer.header-bg {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f172a 100%);
}

/* 修复前台白色按钮悬停 */
.front-body .layui-btn-primary:hover {
    color: #2563eb !important;
    border-color: #2563eb !important;
    background-color: #f8fafc !important;
}

/* 滚动条美化 */
.front-body ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.front-body ::-webkit-scrollbar-track {
    background: transparent;
}

.front-body ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.front-body ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 移动端汉堡菜单 */
.mobile-menu-btn {
    display: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* 自适应 */
@media (max-width: 768px) {
    .front-main-inner {
        padding: 0 12px;
    }

    .mobile-menu-btn {
        display: block;
    }

    .front-header nav {
        display: none;
    }
}

/* 选中状态高亮 */
.front-body .active-nav-link {
    color: #93c5fd !important;
    position: relative;
}

.front-body .active-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: #93c5fd;
    border-radius: 1px;
}
