/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 标题样式 */
.header {
    border: 1px solid #000;
    border-radius: 10px;
    text-align: center;
    padding: 30px 0;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5em;
}

/* 日期行样式 */
.date-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 0;
}

.date-left, .date-center {
    font-size: 1.1em;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 15px 20px;
    flex: 1;
    text-align: center;
}

.copyright {
    font-size: 0.9em;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 15px 20px;
    flex: 1;
    text-align: center;
}

.brand-name {
    font-weight: bold;
}

/* 温度星级说明样式 */
.star-description {
    border: 1px solid #000;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    align-items: stretch;
}

.star-desc-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    width: 100%;
}

.star-desc-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px;
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
}

.star-desc-left {
    text-align: left;
    align-items: flex-start;
    padding: 8px;
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
}

.star-desc-center-left {
    text-align: center;
    align-items: center;
    padding: 8px;
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
}

.star-desc-center-right {
    text-align: center;
    align-items: center;
    padding: 8px;
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
}

.star-desc-right {
    text-align: center;
    align-items: center;
    padding: 8px;
    border: 1px solid #000;
    border-radius: 8px;
    overflow: hidden;
}

.star-desc-item {
    font-size: 0.65em;
    line-height: 1.4;
    text-align: left;
    width: 100%;
}

.star-num {
    font-weight: bold;
}

.disclaimer-text {
    font-size: 0.65em;
    font-weight: bold;
    line-height: 1.4;
    text-align: center;
    width: 100%;
}

/* 基金组合样式 */
.fund-combo-container {
    font-size: 0.6em;
    text-align: center;
    width: 100%;
    overflow: hidden;
}

.fund-combo-title {
    font-weight: bold;
    margin-bottom: 0;
    text-align: center;
    font-size: 1.1em;
    white-space: nowrap;
}

.fund-combo-text {
    padding: 1px 0;
    text-align: center;
    white-space: nowrap;
    line-height: 1.3;
}

.fund-combo-table th {
    font-weight: bold;
    border: 1px solid #000;
    padding: 8px;
}

.fund-combo-table td {
    border: 1px solid #000;
    padding: 8px;
}

.fund-combo-table {
    border-collapse: collapse;
    width: 100%;
}

.qrcode-img {
    width: 130px;
    height: 130px;
    border-radius: 8px;
}

/* 基金温度区域 */
.temperature-section {
    padding: 20px;
    margin-bottom: 0;
}

.temperature-section h2 {
    margin-bottom: 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #000;
}

.tip-text {
    border: 1px solid #000;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 0.9em;
}

/* 表格容器 */
.table-container {
    border: 1px solid #000;
    border-radius: 10px;
    overflow-x: auto;
    margin-top: 0;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid #000;
    border-bottom: 2px solid #000;
}

th:last-child {
    border-right: 1px solid #000;
}

 tbody tr {
    transition: all 0.3s ease;
    border: 1px solid #000;
}

 tbody tr:hover {
    transform: scale(1.01);
}

td {
    padding: 12px 10px;
    text-align: center;
    white-space: normal;
    word-break: break-all;
    border: 1px solid #000;
}

/* 确保表格容器显示完整边框 */
table {
    border: 1px solid #000;
    border-collapse: collapse;
}

/* 温度样式 */
.temperature-cold {
    background-color: #ffcccc;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.temperature-hot {
    background-color: #ccffcc;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.temperature-normal {
    background-color: #ffffcc;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 涨跌幅样式 */
.positive {
    background-color: #ffcccc;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.negative {
    background-color: #ccffcc;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 关注度样式 */
.attention-high {
    background-color: #ffcccc;
    color: #000;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(0, 0, 0, 0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    margin-top: 20px;
    font-size: 1.2em;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }
    
    .date-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    th, td {
        padding: 10px 5px;
        font-size: 0.9em;
    }
    
    /* 手机端四栏变两行 */
    .star-description {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .star-desc-column {
        flex: 1 1 45%;
        min-width: 45%;
    }
}

/* 指数查询区域样式 */
.search-section {
    border: 1px solid #000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 0;
}

.search-section h2 {
    margin-bottom: 0;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #000;
    border-radius: 10px;
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #000;
    border-radius: 8px;
    font-size: 1em;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #000;
}

.search-box button {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-box button:hover {
    transform: translateY(-2px);
}

.search-results {
    border: 1px solid #000;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 0;
}

.search-results p {
    margin-bottom: 0;
}

.results-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.result-item {
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.result-item:hover {
    border-color: #000;
}

.category-select {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 0;
}

.category-select p {
    margin-bottom: 0;
}

.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid #000;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.category-btn:hover {
    border-color: #000;
}

.category-btn.selected {
    background: #000;
    border-color: transparent;
}

.add-btn {
    margin-top: 15px;
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-btn:hover {
    transform: translateY(-2px);
}

.query-result {
    border: 1px solid #000;
    border-radius: 10px;
    padding: 20px;
}

.query-result h3 {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #000;
}

.result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.result-item {
    padding: 15px;
    border-radius: 8px;
}

.result-item .label {
    font-size: 0.9em;
    margin-bottom: 5px;
}

.result-item .value {
    font-size: 1.2em;
    font-weight: bold;
}

.result-item .value.temperature {
    font-size: 1.5em;
}

.result-item .value.stars {
    font-size: 1.3em;
    letter-spacing: 3px;
}

/* 配置按钮样式 */
.config-buttons {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.config-btn {
    padding: 8px 16px;
    border: 1px solid #000;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.import-btn {
    display: inline-block;
}

.import-btn:hover {
}

/* 股市晴雨表样式 */
.stock-weather-section {
    border: 1px solid #000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.stock-weather-title {
    text-align: center;
    color: #000;
    margin-bottom: 20px;
    font-size: 1.8em;
}

.stock-weather-table-container {
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
}

.stock-weather-table {
    width: 100%;
    border-collapse: collapse;
}

.stock-weather-table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #000;
}

.stock-weather-table th:nth-child(2),
.stock-weather-table th:nth-child(3),
.stock-weather-table th:nth-child(4),
.stock-weather-table th:nth-child(5) {
    background-color: #ffcc00;
}

.stock-weather-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid #000;
}

.stock-weather-table td:nth-child(2),
.stock-weather-table td:nth-child(3) {
    background-color: transparent;
}

.stock-weather-table .not-recommended {
    color: #ff0000;
    font-weight: bold;
}

/* 中证全指EPV、四大魔盒表格样式 */
.epv-magic-box-table {
    width: 100%;
    table-layout: fixed;
}

.epv-magic-box-table th {
    background-color: transparent !important;
}

.epv-magic-box-table td {
    background-color: transparent !important;
}

/* 中证全指EPV和四大魔盒容器样式 */
.epv-magic-box-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.epv-section,
.magic-box-section {
    flex: 1;
    border: 1px solid #000;
    border-radius: 10px;
    padding: 15px;
}

/* 中证全指EPV和四大魔盒各占50%宽度 */
.epv-table, .magic-box-table {
    width: 100%;
    table-layout: fixed;
    min-height: 300px; /* 设置最小高度，确保两个表格一样高 */
}

.epv-table th,
.magic-box-table th {
    background-color: #ffcc00;
    text-align: center;
    padding: 10px;
    border: 1px solid #000;
}

.epv-table td,
.magic-box-table td {
    padding: 10px;
    border: 1px solid #000;
    text-align: center;
    vertical-align: middle;
}

/* 调整容器样式，确保两个表格垂直对齐 */
.epv-table-container,
.magic-box-table-container {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 确保两个部分的高度一致 */
.epv-table + div,
.magic-box-table + div {
    margin-top: 10px;
    text-align: center;
}

/* 响应式设计 - 手机端调整 */
@media (max-width: 768px) {
    /* 手机端中证全指EPV和四大魔盒垂直堆叠 */
    .epv-magic-box-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .epv-section,
    .magic-box-section {
        width: 100%;
    }
    
    /* 调整表格高度 */
    .epv-table, .magic-box-table {
        min-height: 250px;
    }
    
    /* 调整表格单元格大小 */
    .epv-table th,
    .epv-table td,
    .magic-box-table th,
    .magic-box-table td {
        padding: 8px 5px;
        font-size: 0.9em;
    }
}

/* 时间范围按钮样式 */
.time-range-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.time-btn {
    padding: 6px 12px;
    border: 1px solid #000;
    background-color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.time-btn:hover {
    border-color: #000;
}

.time-btn.active {
    background-color: #fff;
    border-color: #000;
    font-weight: bold;
    color: #000;
}

.time-btn.active:hover {
    background-color: #f5f5f5;
    border-color: #000;
}

/* 导入配置说明区域 */
.import-section {
    border: 1px solid #000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 0;
}

.import-section h3 {
    margin-bottom: 0;
}

.import-section p {
    margin-bottom: 0;
}

.import-template {
    border: 1px solid #000;
    border-radius: 10px;
    padding: 15px;
}

.import-template h4 {
    margin-bottom: 0;
}

.import-template pre {
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85em;
    line-height: 1.5;
}

/* CSV数据上传区域 */
.csv-upload-section {
    border: 1px solid #000;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 0;
}

.csv-upload-section h3 {
    margin-bottom: 0;
}

.csv-upload-section > p {
    margin-bottom: 0;
}

.csv-upload-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
}

.csv-upload-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.csv-upload-row .csv-upload-box {
    flex: 1;
    min-width: 200px;
}

.csv-upload-btn {
    padding: 10px 20px;
    border: 1px solid #000;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.csv-upload-btn:hover {
    transform: translateY(-2px);
}

.csv-file-name {
    font-size: 0.9em;
    border: 1px solid #000;
    border-radius: 8px;
    padding: 10px 15px;
}

.csv-upload-status {
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9em;
}
