/* ============================================== */
/* 环球智汇财经平台 - 公共组件样式 */
/* ============================================== */

/* 风险提示横幅 */
.risk-banner {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}
.risk-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}
.risk-banner-content i {
    font-size: 18px;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.risk-text-cn { font-weight: 500; }
.risk-text-en { font-size: 12px; opacity: 0.9; }
.risk-banner-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    margin-left: 15px;
}
.risk-banner-close:hover { background: rgba(255,255,255,0.3); }

/* 客服悬浮按钮 */
.cs-float-btn {
    position: fixed;
    right: 20px;
    bottom: 100px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
}
.cs-float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.6);
}
.cs-float-btn i { font-size: 24px; color: white; }
.cs-btn-text { font-size: 10px; color: white; margin-top: 2px; }

/* 客服对话框 */
.cs-modal {
    position: fixed;
    right: 20px;
    bottom: 170px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.cs-header {
    background: linear-gradient(135deg, #1a73e8, #0d47a1);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.cs-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}
.cs-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}
.cs-message {
    display: flex;
    margin-bottom: 15px;
}
.cs-message.cs-bot { flex-direction: row; }
.cs-message.cs-user { flex-direction: row-reverse; }
.cs-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cs-bot .cs-avatar { background: #1a73e8; color: white; }
.cs-user .cs-avatar { background: #28a745; color: white; }
.cs-content {
    max-width: 260px;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 0 10px;
    font-size: 14px;
    line-height: 1.6;
}
.cs-bot .cs-content { background: white; border: 1px solid #e0e0e0; }
.cs-user .cs-content { background: #1a73e8; color: white; }
.cs-quick-btns {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.cs-quick-btns button {
    background: #e8f0fe;
    border: 1px solid #1a73e8;
    color: #1a73e8;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.cs-quick-btns button:hover { background: #1a73e8; color: white; }
.cs-footer {
    padding: 12px 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}
.cs-footer input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}
.cs-footer input:focus { border-color: #1a73e8; }
.cs-footer button {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #1a73e8;
    color: white;
    border: none;
    cursor: pointer;
}
.cs-footer button:hover { background: #0d47a1; }

/* 页脚风险声明 */
.risk-disclaimer-footer {
    background: #1a1a2e;
    color: #e0e0e0;
    padding: 40px 0;
    margin-top: 40px;
}
.risk-disclaimer-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,107,107,0.3);
    border-radius: 12px;
    padding: 25px 30px;
}
.risk-disclaimer-box h5 {
    color: #ff6b6b;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.risk-disclaimer-box p {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 0;
}

/* 手机端适配优化 */
@media (max-width: 768px) {
    /* 风险横幅 */
    .risk-banner-content {
        font-size: 12px;
        text-align: center;
    }
    .risk-text-en {
        display: block;
        width: 100%;
        font-size: 11px;
    }
    
    /* 客服组件 */
    .cs-modal {
        right: 10px;
        bottom: 80px;
        width: calc(100% - 20px);
        height: 60vh;
    }
    .cs-float-btn {
        right: 15px;
        bottom: 20px;
        width: 55px;
        height: 55px;
    }
    
    /* 按钮优化 - 宽度≥80% */
    .btn-primary, .btn-secondary, .btn-outline-primary {
        width: 100% !important;
        min-height: 48px;
        font-size: 16px !important;
        margin-bottom: 10px;
    }
    
    /* 字号优化 - ≥14px */
    body, p, span, div {
        font-size: 14px !important;
    }
    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }
    h4, h5, h6 { font-size: 16px !important; }
    
    /* 间距优化 */
    .card, .news-item, .knowledge-item {
        margin-bottom: 15px !important;
    }
    
    /* 风险声明移动端 */
    .risk-disclaimer-box {
        padding: 20px 15px;
    }
}

/* 平板适配 */
@media (min-width: 769px) and (max-width: 1024px) {
    .cs-modal {
        width: 350px;
    }
}


/* 隐藏风险提示横幅 */
.risk-banner { display: none !important; }
