/* 主题页面样式 */

.theme-section {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 基金类型切换样式 */
.fund-type-tabs {
    display: flex;
    margin-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    white-space: nowrap;
}

.type-tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    font-size: 13px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.type-tab-btn:hover {
    color: #1890ff;
}

.type-tab-btn.active {
    color: #1890ff;
    font-weight: bold;
}

.type-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background-color: #1890ff;
}

/* 标签页样式 */
.theme-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #1890ff;
}

.tab-btn.active {
    color: #1890ff;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background-color: #1890ff;
}

/* 时间周期选择样式 */
.theme-period {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.period-btn {
    flex: 1;
    padding: 8px;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.period-btn:hover {
    background-color: #e6f7ff;
    border-color: #91d5ff;
}

.period-btn.active {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

/* 加载状态样式 */
.theme-loading {
    text-align: center;
    padding: 40px;
    color: #1890ff;
    font-size: 14px;
    font-weight: bold;
    position: relative;
}

.theme-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误提示样式 */
.theme-error {
    text-align: center;
    padding: 40px;
    color: #ff4d4f;
    font-size: 14px;
}

/* 数据网格样式 */
.theme-data {
    overflow-x: auto;
    padding-bottom: 80px;
}

.theme-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    flex: 1;
    padding: 12px;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    color: #1890ff;
}

.tab-btn.active {
    color: #1890ff;
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background-color: #1890ff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 基金类型内容区域样式 */
.fund-type-content {
    display: none;
}

.fund-type-content.active {
    display: block;
}

/* 表格样式 */
.theme-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.theme-table th,
.theme-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.theme-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.theme-table tbody tr {
    transition: background-color 0.3s ease;
}

.theme-table tbody tr:hover {
    background-color: #fafafa;
}

.theme-table .rank {
    width: 60px;
    text-align: center;
}

.theme-table .code {
    width: 100px;
}

.theme-table .name {
    width: auto;
    min-width: 200px;
}

.theme-table .nav {
    width: 100px;
    text-align: right;
}

.theme-table .change {
    width: 100px;
    text-align: right;
    font-weight: bold;
}

.theme-table .change.rise {
    color: #ff4d4f;
}

.theme-table .change.fall {
    color: #52c41a;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .theme-table {
        font-size: 12px;
    }
    
    .theme-table th,
    .theme-table td {
        padding: 8px 10px;
    }
    
    .theme-table .name {
        min-width: 150px;
    }
    
    .theme-table .code {
        width: 80px;
    }
    
    .theme-table .nav,
    .theme-table .change {
        width: 80px;
    }
}

@media (max-width: 480px) {
    .theme-table {
        font-size: 11px;
    }
    
    .theme-table th,
    .theme-table td {
        padding: 6px 8px;
    }
    
    .theme-table .name {
        min-width: 120px;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .theme-section {
        padding: 15px;
    }
    
    .tab-btn {
        font-size: 12px;
        padding: 10px;
    }
    
    .period-btn {
        font-size: 11px;
        padding: 6px;
    }
    
    .theme-table {
        font-size: 12px;
    }
    
    .theme-table th,
    .theme-table td {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .theme-period {
        flex-wrap: wrap;
    }
    
    .period-btn {
        flex: 1 1 calc(50% - 5px);
    }
    
    .theme-table th,
    .theme-table td {
        padding: 8px;
    }
}