/* ===== 基础样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fa;
}

/* ===== 导航栏样式 ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #1E3A8A;
    box-shadow: 0 2px 10px rgba(30, 58, 138, 0.3);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    text-decoration: none;
}

.logo img{
    width: 150px;
    height: auto;
    display: block;
}

.logo i {
    margin-right: 10px;
    font-size: 26px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
    align-items: center;
    /* 桌面端：占据剩余空间，把登录按钮推到最右；手机端因position:fixed脱离文档流，flex:1无视觉影响 */
    flex: 1;
    margin-left: 24px;
}

/* 桌面端隐藏移动端专用元素 */
.nav-menu .mobile-user-card,
.nav-menu .mobile-logout-wrap {
    display: none !important;
}

/* 移动端右侧操作区容器 */
.nav-mobile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
}

/* 遮罩层仅移动端显示 */
.nav-overlay {
    display: none;
}

/* ===== Banner区域 ===== */
.banner {
    margin-top: 64px;
    background: #1E3A8A;
    padding: 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner h1 {
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.banner p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
}

.banner .highlight {
    color: #FCD34D;
    font-weight: 600;
}

/* ===== 工具推荐区域 ===== */
.tools-section {
    padding: 80px 60px;
    background: #f5f7fa;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: #1E3A8A;
    font-weight: 700;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 16px;
    color: #64748B;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.tool-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 25px;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.tool-icon {
    width: 70px;
    height: 70px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin-right: 20px;
    flex-shrink: 0;
}

.tool-icon.blue {
    background: #2563EB;
    color: #fff;
}

.tool-icon.purple {
    background: #7C3AED;
    color: #fff;
}

.tool-icon.green {
    background: #059669;
    color: #fff;
}

.tool-icon.orange {
    background: #D97706;
    color: #fff;
}

.tool-info h3 {
    font-size: 18px;
    color: #1F2937;
    font-weight: 600;
    margin-bottom: 8px;
}

.tool-info p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
}

/* ===== 底部区域 ===== */
.footer {
    background: #1E3A8A;
    padding: 40px 60px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 15px;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 20px 0;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.copyright a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.copyright a:hover {
    color: #fff;
}

/* ===== 响应式设计 ===== */
/* ===== 移动端响应式样式 ===== */
@media (max-width: 768px) {
    .navbar {
        height: 56px;
    }
    
    .nav-container {
        padding: 0 16px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 10px;
        color: #fff;
        font-size: 18px;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:active {
        transform: scale(0.95);
        background: rgba(255, 255, 255, 0.25);
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo img {
        width: 120px;
    }
    
    /* 移动端导航菜单 - 侧边抽屉式 */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -280px;
        width: 260px;
        height: 100vh;
        background: #1E3A8A;
        flex-direction: column;
        padding: 80px 0 30px;
        gap: 0;
        align-items: stretch;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1100;
        overflow-y: auto;
    }

    /* 移动端显示专用元素 */
    .nav-menu .mobile-user-card {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 0 20px 20px;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .nav-menu .mobile-logout-wrap {
        display: block !important;
        margin-top: 20px;
        padding: 0 20px;
    }

    /* 底部退出按钮 */
    .nav-menu .mobile-logout {
        width: 100%;
        padding: 13px 18px;
        background: rgba(239, 68, 68, 0.2);
        border: 1px solid rgba(239, 68, 68, 0.4);
        border-radius: 12px;
        color: #fecaca;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        cursor: pointer;
        transition: all 0.25s ease;
    }

    .nav-menu .mobile-logout:active {
        background: rgba(239, 68, 68, 0.35);
        color: #fff;
    }
    
    .nav-menu.active {
        right: 0;
    }

    /* 独立遮罩层：位于导航栏之下、页面内容之上 */
    .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        z-index: 1050;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
    }

    .nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* 导航栏在遮罩之上，确保按钮可点击 */
    .navbar {
        z-index: 1080;
    }

    /* 移动端：nav-user 正常显示（登录按钮在顶部 header） */
    .nav-user {
        display: flex !important;
    }

    /* 顶部操作区：保持在菜单面板之上，确保菜单打开时仍可点击按钮关闭 */
    .nav-mobile-actions {
        position: relative;
        z-index: 1101;
    }

    /* 移动端登录按钮简化排版 */
    .nav-user .user-not-login .login-btn {
        padding: 7px 14px;
        font-size: 13px;
        border-radius: 18px;
        color: #fff;
        border: 1px solid rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.15);
    }
    .nav-user .user-not-login .login-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }
    .nav-user .user-logged-in {
        gap: 8px;
    }
    .nav-user .user-logged-in .user-name {
        display: none;
    }
    .nav-user .user-logged-in .logout-btn {
        display: none;
    }
    .nav-user .user-logged-in .user-info {
        width: 36px; height: 36px;
    }
    .nav-user .user-logged-in .user-avatar {
        width: 36px; height: 36px;
        border: 2px solid rgba(255, 255, 255, 0.6);
    }

    /* Logo 在小屏更紧凑 */
    .logo img {
        width: 96px;
    }

    .banner {
        padding: 40px 20px;
    }

    .nav-menu li {
        width: 100%;
        padding: 0 20px;
    }

    .nav-menu a {
        display: block;
        padding: 14px 18px;
        border-bottom: none;
        border-radius: 10px;
        color: rgba(255, 255, 255, 0.88);
        font-size: 15px;
        font-weight: 500;
        margin-bottom: 4px;
        transition: all 0.25s ease;
        position: relative;
    }

    .nav-menu a:hover,
    .nav-menu a:active {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
    }

    .nav-menu a.active {
        background: rgba(255, 255, 255, 0.18);
        color: #fff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    .nav-menu a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 18px;
        background: #3B82F6;
        border-radius: 2px;
        opacity: 0;
        transition: opacity 0.25s ease;
    }

    .nav-menu a.active::before {
        opacity: 1;
    }

    .banner h1 {
        font-size: 28px;
    }
    
    .banner p {
        font-size: 14px;
    }
    
    .tools-section {
        padding: 40px 20px;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
}

/* ===== 更小屏幕适配 ===== */
@media (max-width: 480px) {
    .navbar {
        height: 52px;
    }

    .nav-container {
        padding: 0 12px;
    }

    .logo img {
        width: 84px;
    }

    .nav-mobile-actions {
        gap: 8px;
    }

    .nav-user .user-not-login .login-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .banner {
        margin-top: 52px;
        padding: 32px 16px;
    }
}

/* ===== 用户登录区域 ===== */
.nav-user {
    display: flex;
    align-items: center;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 10px;
}

.user-logged-in {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.user-name {
    color: #fff;
    font-size: 14px;
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

/* ===== 微信登录弹窗 ===== */
.wechat-login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    width: 360px;
    max-width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.modal-header h3 {
    font-size: 18px;
    color: #1E3A8A;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

.modal-body {
    padding: 30px 24px;
    text-align: center;
}

.qrcode-container {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qrcode-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qrcode-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.loading-text {
    color: #666;
    font-size: 14px;
}

.login-tip {
    color: #666;
    font-size: 14px;
}

/* ===== 绑定手机号弹窗 ===== */
.bind-phone-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bind-tip {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.form-item {
    margin-bottom: 16px;
}

.form-input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #07c160;
}

.code-input {
    display: flex;
    gap: 12px;
}

.code-input .form-input {
    flex: 1;
}

.send-code-btn {
    height: 44px;
    padding: 0 16px;
    background: #07c160;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.send-code-btn:hover {
    background: #06ad56;
}

.send-code-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal-footer {
    padding: 0 24px 24px;
}

.modal-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-btn-confirm {
    background: #07c160;
    color: #fff;
}

.modal-btn-confirm:hover {
    background: #06ad56;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav-user {
    }
    
    .user-logged-in {
        flex-direction: column;
        gap: 10px;
        flex-direction:row;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* ===== 账号登录/注册弹窗（base.html 内联样式提取） ===== */
.modal-content--sm {
    max-width: 420px;
}
.modal-body--pad-24 {
    padding: 24px;
}
.auth-email-row {
    display: none;
}
.auth-email-row--flex {
    display: flex;
    gap: 8px;
}
.send-email-code-btn {
    white-space: nowrap;
}
.modal-btn--full {
    width: 100%;
    margin-top: 8px;
}
.login-tip--mt-18 {
    margin-top: 18px;
}
.hidden-init {
    display: none;
}

/* ===== 头像选择器（base.html 内联样式提取） ===== */
.avatar-field-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.avatar-select-preview {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    background: #f8fafc;
}
.avatar-select-trigger {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #2563eb;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
}
.avatar-select-trigger:hover {
    background: #eff6ff;
}
.avatar-select-help {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 7px;
}
.avatar-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.avatar-picker-overlay.hidden-init {
    display: none;
}
.avatar-picker-panel {
    width: 100%;
    height: 100%;
    background: #fff;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.avatar-picker-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid #eef2f7;
    flex: none;
}
.avatar-picker-header h3 {
    margin: 0;
    font-size: 20px;
    color: #1e293b;
}
.avatar-picker-close {
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}
.avatar-picker-grid {
    flex: 1;
    overflow: auto;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
    gap: 22px 18px;
    align-content: start;
}
.avatar-picker-item {
    border: 0;
    background: transparent;
    border-radius: 14px;
    padding: 8px;
    cursor: pointer;
    text-align: center;
    color: #64748b;
    transition: .15s;
}
.avatar-picker-item:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
}
.avatar-picker-item img {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto 8px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid transparent;
    box-sizing: border-box;
}
.avatar-picker-item.selected img {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #dbeafe;
}
.avatar-picker-item.selected {
    color: #1d4ed8;
    font-weight: 600;
}
.avatar-picker-group {
    grid-column: 1 / -1;
    font-size: 13px;
    color: #64748b;
    margin: 4px 0 -10px;
}
.avatar-picker-loading,
.avatar-picker-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #94a3b8;
    padding: 50px 0;
}
.avatar-picker-footer {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 24px;
    border-top: 1px solid #eef2f7;
    flex: none;
}
.avatar-picker-footer button {
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
}
.avatar-picker-cancel {
    border: 1px solid #dbe3ef;
    background: #fff;
    color: #475569;
}
.avatar-picker-confirm {
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
}
@media (max-width: 600px) {
    .avatar-picker-overlay {
        padding: 0;
    }
    .avatar-picker-panel {
        height: 100vh;
        border-radius: 0;
    }
    .avatar-picker-header {
        height: 60px;
        padding: 0 18px;
    }
    .avatar-picker-grid {
        padding: 18px 12px;
        grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
        gap: 16px 8px;
    }
    .avatar-picker-item img {
        width: 78px;
        height: 78px;
    }
    .avatar-picker-footer {
        height: 68px;
        padding: 0 16px;
    }
}

/* 客服福利悬浮窗 */
.customer-service {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 9980;
    font-family: inherit;
}
.customer-service[hidden] { display: none; }
.customer-service-trigger {
    display: block;
    width: 300px;
    padding: 0;
    border: 0;
    border-radius: 18px;
    background: transparent;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
}
.customer-service-trigger:hover,
.customer-service-trigger:focus-visible {
    transform: translateY(-2px);
    filter: drop-shadow(0 18px 22px rgba(185, 28, 28, .2));
}
.customer-service-trigger img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 18px;
}
.customer-service-trigger picture { display: block; }
.customer-service-dismiss {
    position: absolute;
    z-index: 2;
    top: -9px;
    right: -9px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0 0 2px;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: #1f2937;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .25);
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
}
.customer-service-dismiss:hover,
.customer-service-dismiss:focus-visible { background: #000; }
.customer-service-card {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: 216px;
    width: 300px;
    overflow: hidden;
    border: 1px solid #e8e7ff;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(30, 41, 59, .2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.96);
    transform-origin: right bottom;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.customer-service.is-open .customer-service-card { opacity: 1; visibility: visible; transform: none; }
.customer-service-header {
    position: relative;
    padding: 22px 48px 20px 22px;
    color: #fff;
    background: #c81e1e;
}
.customer-service-tag {
    display: inline-block;
    margin-bottom: 9px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff0bc;
    background: rgba(255, 255, 255, .15);
    font-size: 11px;
}
.customer-service-header h2 { margin: 0 0 7px; color: #fff; font-size: 21px; }
.customer-service-header p { margin: 0; color: #ddd6fe; font-size: 13px; line-height: 1.6; }
.customer-service-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    font-size: 23px;
    line-height: 28px;
    cursor: pointer;
}
.customer-service-body { padding: 22px; text-align: center; }
.customer-service-qr {
    width: 176px;
    height: 176px;
    margin: 0 auto 15px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(30, 41, 59, .08);
}
.customer-service-qr img { display: block; width: 100%; height: 100%; border-radius: 10px; object-fit: contain; }
.customer-service.is-qr-error .customer-service-qr {
    display: grid;
    place-items: center;
    color: #94a3b8;
    background: #f8fafc;
}
.customer-service.is-qr-error .customer-service-qr::after { content: '二维码加载失败'; font-size: 13px; }
.customer-service.is-qr-error .customer-service-qr img { display: none; }
.customer-service-body strong { display: block; color: #1e293b; font-size: 15px; }
.customer-service-body strong i { margin-right: 4px; color: #16a34a; font-size: 18px; }
.customer-service-body p { margin: 8px 0 0; color: #64748b; font-size: 13px; }
.customer-service-body b { color: #dc2626; }
.customer-service.is-ready:not(.is-open) .customer-service-trigger { animation: customer-service-pulse .8s ease 2; }
@keyframes customer-service-pulse { 50% { transform: translateY(-3px) scale(1.03); } }

@media (max-width: 640px) {
    .customer-service { right: 16px; bottom: 16px; }
    .customer-service-trigger { width: min(190px, calc(100vw - 32px)); }
    .customer-service-card { position: fixed; right: 16px; bottom: 16px; width: min(300px, calc(100vw - 32px)); }
    .customer-service.is-open .customer-service-trigger,
    .customer-service.is-open .customer-service-dismiss { opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
    .customer-service-trigger, .customer-service-card { transition: none; animation: none !important; }
}
