/* 卡片导航站 - 前台样式 */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #2f54eb;
    --primary-dark: #1d43d4;
    --bg: #f5f7fa;
    --card-bg: #ffffff;
    --text: #1a1a1a;
    --text-sub: #555555;
    --text-muted: #999999;
    --radius: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 32px rgba(47,84,235,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: "PingFang SC", -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px 60px;
}

/* ===== 顶部标题区 ===== */
.hero {
    text-align: center;
    margin-bottom: 44px;
    animation: fadeInDown 0.6s ease;
}

.hero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), #6a8dff);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow: 0 8px 24px rgba(47,84,235,0.3);
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-sub);
    max-width: 500px;
    margin: 0 auto;
}

/* ===== 卡片网格区 ===== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(47,84,235,0.15);
}

.card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #eef3ff, #f5f7fa);
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #c5cce8;
    background: linear-gradient(135deg, #eef3ff, #f0f5ff);
}

.card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-description {
    font-size: 14px;
    font-weight: 400;
    color: var(--text-sub);
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-btn {
    display: block;
    text-align: center;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    width: 100%;
}

.card-btn:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.card-btn:active {
    transform: translateY(0);
}

/* ===== 底部说明区 ===== */
.footer {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    padding: 24px 0;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* ===== 动画 ===== */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 客服悬浮窗 ===== */
.kefu-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9999;
}

.kefu-btn {
    position: relative;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(47,84,235,0.35);
    transition: var(--transition);
}

.kefu-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 28px rgba(47,84,235,0.45);
}

.kefu-btn-icon {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    z-index: 2;
}

.pulse-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.6); opacity: 0; }
}

.kefu-panel {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 280px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.kefu-panel.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.kefu-panel-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
}

.kefu-panel-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

.kefu-panel-name {
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.kefu-panel-close {
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.kefu-panel-close:hover {
    opacity: 1;
}

.kefu-panel-body {
    padding: 18px 16px 20px;
}

.kefu-panel-msg {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 12px;
    background: #f5f7fa;
    border-radius: 10px;
}

.kefu-panel-btn {
    display: block;
    text-align: center;
    padding: 11px;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

.kefu-panel-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(47,84,235,0.3);
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .container {
        padding: 32px 16px 40px;
    }
    .hero-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
        border-radius: 16px;
    }
    .hero-title {
        font-size: 26px;
    }
    .hero-subtitle {
        font-size: 14px;
    }
    .card-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .card-body {
        padding: 18px;
    }
    .card-title {
        font-size: 16px;
    }
}
