/* ===================================
   星图AI产品官网 - 组件样式
   版本：v2.0
   职责：通用组件（按钮、卡片、表格等可复用元素）
   =================================== */

/* ===================================
   1. 标题组件
   =================================== */
.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-primary);
}

.section-subtitle {
    font-size: 20px;
    text-align: center;
    margin-bottom: var(--spacing-xl);
    color: var(--color-text-secondary);
}

.subsection-title {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    margin: var(--spacing-xl) 0 var(--spacing-lg);
    color: var(--color-text-primary);
}

/* ===================================
   2. 按钮组件
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
    border: none;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

.btn--primary:hover {
    background-color: #183bd8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

/* ===================================
   3. 卡片组件基础样式
   =================================== */
.card {
    background-color: var(--color-bg-white);
    padding: var(--spacing-card-inner);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}

/* ===================================
   4. 表格组件
   =================================== */
.data-table,
.solution-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    margin-bottom: var(--spacing-xl);
}

.data-table thead,
.solution-table thead {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

.data-table th,
.solution-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.data-table td,
.solution-table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--color-bg-card);
    font-size: 14px;
}

.data-table tbody tr:hover,
.solution-table tbody tr:hover {
    background-color: var(--color-bg-card);
}

/* 斑马条纹 - 数据新闻风格 */
.data-table tbody tr:nth-child(even),
.solution-table tbody tr:nth-child(even) {
    background-color: var(--color-bg-card);
}

.data-table tbody tr:nth-child(odd),
.solution-table tbody tr:nth-child(odd) {
    background-color: var(--color-bg-white);
}

.solution-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .highlight {
    color: var(--color-success);
    font-weight: 600;
}

/* ===================================
   5. 下载错误提示组件
   =================================== */
.download-error {
    text-align: center;
    padding: var(--spacing-xl);
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-error);
    box-shadow: var(--shadow-card);
    margin: var(--spacing-md) 0;
}

.download-error p {
    margin: 0;
    line-height: 1.6;
}

.download-error p:first-child {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-error);
    margin-bottom: var(--spacing-sm);
}

/* ===================================
   6. 社交入口侧边栏
   =================================== */
.social-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 1000;
    padding: 8px 0;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.social-sidebar__button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 60px;
    padding: 8px;
    background-color: var(--color-bg-white);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.social-sidebar__button:hover {
    background-color: var(--color-bg-card);
}

.social-sidebar__button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* 图标样式 */
.social-sidebar__icon {
    color: #07c160;
    margin-bottom: 4px;
    flex-shrink: 0;
}

/* 标签文字 */
.social-sidebar__label {
    font-size: 12px;
    color: var(--color-text-secondary);
    text-align: center;
    line-height: 1.2;
}

/* 分割线 */
.social-sidebar__divider {
    width: 60%;
    height: 1px;
    background-color: #e0e0e0;
    margin: 0 auto;
}

/* Tooltip 样式 */
.social-sidebar__tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    margin-right: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.social-sidebar__tooltip-content {
    background-color: var(--color-bg-white);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    text-align: center;
}

/* 二维码图片 */
.social-sidebar__qrcode {
    width: 180px;
    height: 180px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Tooltip 文字 */
.social-sidebar__tooltip-text {
    margin: 8px 0 0 0;
    font-size: 14px;
    color: var(--color-text-primary);
    font-weight: 500;
}

/* 激活状态：显示 Tooltip */
.social-sidebar__button--active .social-sidebar__tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) translateX(0);
}

/* ===================================
   响应式设计
   =================================== */
/* 平板端：缩小侧边栏 */
@media (max-width: 1024px) {
    .social-sidebar__button {
        width: 60px;
        height: 50px;
    }

    .social-sidebar__label {
        font-size: 11px;
    }

    .social-sidebar__tooltip-content {
        min-width: 180px;
    }

    .social-sidebar__qrcode {
        width: 160px;
        height: 160px;
    }
}

/* 移动端：隐藏侧边栏 */
@media (max-width: 768px) {
    .social-sidebar {
        display: none;
    }
}
