/* detail_style.css - QDII 产品详情页面样式 */
/* 功能：定义详情页面的布局、颜色、字体等样式 */

/* 容器样式 */
.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 10px;
    background-color: #fff;
    margin-top: 0 !important;
}

/* 头部样式 */
.header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 100;
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
}



.header h1 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
    flex: 1;
}

.header-info {
    font-size: 18px;
    color: #666;
    margin-left: 10px;
}

.fund-code-detail {
    color: #999;
    font-size: 10px;
    font-weight: normal;
}

.wechat-icon {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: white;
    margin-bottom: 0px;
}

.data-table th {
    background-color: #f5f5f5;
    padding: 6px;
    text-align: center;
    border: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    font-size: 12px;
}

.data-table td {
    padding: 6px;
    text-align: center;
    border: 1px solid #e0e0e0;
    color: #333;
    font-size: 13px;
}

/* 确保所有列都居中 */
.data-table tr th:nth-child(1),
.data-table tr td:nth-child(1),
.data-table tr th:nth-child(2),
.data-table tr td:nth-child(2),
.data-table tr th:nth-child(3),
.data-table tr td:nth-child(3),
.data-table tr th:nth-child(4),
.data-table tr td:nth-child(4) {
    width: 25%; /* 四等分 */
    text-align: center !important; /* 强制居中 */
}

.data-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* 数据区块标题样式 */
.data-section h2 {
    color: #333;
    font-weight: 600;
    padding: 0px 0;
    margin: 0 0 0px 0;
    font-size: 14px;
    border-left: 2px solid #4CAF50;
    padding-left: 12px;
}

/* 区块头部样式 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
}

.section-header h2 {
    margin: 0;
    flex: 1;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    border-left: 2px solid #4CAF50;
    padding-left: 12px;
}

.purchase-limit-info {
    font-size: 12px;
    color: #ff4d4f;
    margin-right: 10px;
    font-weight: normal;
}

/* 收益颜色 */
.positive {
    color: #ff4d4f !important;
    font-weight: 500 !important;
}

.negative {
    color: #52c41a !important;
    font-weight: 500 !important;
}

.zero {
    color: #999 !important;
}

/* 历史数据表格样式 */
.table-container {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
}

/* 日期列样式 */
.date-col {
    font-weight: 600;
    background: #f8f9fa;
}

/* 参数值列样式 */
.value-col {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    background: #f8f9fa;
    color: #333;
}

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

/* 错误提示样式 */
.error {
    background: #ffeaa7;
    color: #d63031;
    padding: 15px;
    margin: 10px 0;
    border-radius: 4px;
    text-align: center;
}

/* 历史数据表格列宽设置（5列） */
.data-table tr th:nth-child(1),
.data-table tr td:nth-child(1),
.data-table tr th:nth-child(2),
.data-table tr td:nth-child(2),
.data-table tr th:nth-child(3),
.data-table tr td:nth-child(3),
.data-table tr th:nth-child(4),
.data-table tr td:nth-child(4),
.data-table tr th:nth-child(5),
.data-table tr td:nth-child(5) {
    width: 20%; /* 五等分 */
    text-align: center !important; /* 强制居中 */
}

/* 底部导航菜单样式 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid #e0e0e0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    padding: 8px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.nav-item:hover {
    background: #e3f2fd;
    color: #1976d2;
    transform: translateY(-2px);
}

.nav-text {
    font-size: 14px;
    font-weight: 500;
}

/* 规模链接样式 */
.scale-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.scale-link:hover {
    color: #ff4d4f;
    text-decoration: underline;
}

/* 为详情页容器添加底部空间 */
.container {
    padding-bottom: 70px; /* 为底部导航留出空间 */
}

/* ========== 完整的响应式设计 ========== */

/* 移动端响应式样式 */
@media screen and (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 10px;
    }

    .header h1 {
        font-size: 15px;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 5px;
    }

    .data-section h2,
    .section-header h2 {
        font-size: 13px;
    }
}

/* PC端响应式样式 - 中等屏幕 (平板) */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    .container {
        max-width: 768px;
        margin: 0 auto;
        padding: 20px;
        padding-bottom: 90px;
    }

    .header {
        padding: 15px 20px;
        margin-bottom: 15px;
    }

    .header h1 {
        font-size: 18px;
    }

    .data-table {
        font-size: 14px;
    }

    .data-table th,
    .data-table td {
        padding: 10px;
    }

    .data-section h2,
    .section-header h2 {
        font-size: 16px;
    }

    .bottom-nav {
        padding: 15px 0;
    }

    .nav-item {
        padding: 12px 30px;
    }

    .nav-text {
        font-size: 15px;
    }
}

/* PC端响应式样式 - 大屏幕 (桌面) */
@media screen and (min-width: 1025px) {
    .container {
        max-width: 1000px;
        margin: 0 auto;
        padding: 30px;
        padding-bottom: 100px;
    }

    .header {
        padding: 20px 30px;
        margin-bottom: 20px;
    }

    .header h1 {
        font-size: 20px;
    }

    .data-table {
        font-size: 15px;
    }

    .data-table th,
    .data-table td {
        padding: 12px;
    }

    .data-section h2,
    .section-header h2 {
        font-size: 18px;
    }

    .bottom-nav {
        padding: 20px 0;
    }

    .nav-item {
        padding: 15px 40px;
    }

    .nav-text {
        font-size: 16px;
    }
}
