* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    --primary-color: #1e88e5;
    --primary-dark: #0d47a1;
    --secondary-color: #ff6d00;
    --background-color: #f8f9fa;
    --surface-color: #ffffff;
    --border-color: #e0e0e0;
    --text-primary: #212121;
    --text-secondary: #757575;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    --cold-1: #1e88e5;
    --cold-2: #42a5f5;
    --normal: #66bb6a;
    --hot-1: #ffa726;
    --hot-2: #ef5350;
}

body {
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
    font-size: 14px;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--surface-color);
    box-shadow: var(--shadow);
}

header {
	background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.market-temp-display {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: -3px;
}

#temp-icon {
    margin-right: -1px; /* 单独控制图标右侧间距 */
    width: 25px; /* 可选：调整图标大小 */
    height: 25px; /* 可选：调整图标大小 */
}

.temp-indicator-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--normal);
}

.subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 300;
}

.subtitle9 {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 300;
}

.calculator-content {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.input-section {
    padding: 16px;
    background: var(--surface-color);
}

.result-section {
    padding: 16px;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 20px;
    background: var(--surface-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow);
    position: relative;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
}

.section-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background: var(--primary-color);
    margin-right: 8px;
    border-radius: 2px;
}

.form-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") no-repeat right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

.card {
    background: var(--surface-color);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    position: relative;
    animation: fadeIn 0.4s ease-out;
}

.card h3 {
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-size: 1.05rem;
    font-weight: 600;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.result-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.result-value {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
}

/* 自适应字体大小 */
.adaptive-font {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60%;
    transition: all 0.3s;
}

.btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    width: 100%;
    box-shadow: 0 4px 6px rgba(30, 136, 229, 0.2);
    margin: 16px 0;
    text-align: center;
}

.btn:hover, .btn:focus {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(30, 136, 229, 0.3);
}

.chart-container {
    height: 220px;
    margin-top: 16px;
    position: relative;
    overflow-x: auto;
}

.highlight {
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.05), rgba(13, 71, 161, 0.05));
    padding: 16px;
    border-radius: 12px;
    margin-top: 16px;
    border-left: 4px solid var(--primary-color);
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: #f5f7fa;
    padding: 4px;
}

.tab {
    padding: 12px 0;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    flex: 1;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.flex-row {
    display: flex;
    gap: 12px;
}

.flex-row .form-row {
    flex: 1;
    margin-bottom: 0;
}

.summary-box {
    display: flex;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
    justify-content: space-between;
}

.summary-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
    text-align: center;
}

.summary-value {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
}

.summary-earnings {
    color: #ffc107;
}

.positive {
    color: var(--danger-color);
}

.negative {
    color: var(--success-color);
}

.temperature-control {
    background: #f7f9fc;
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
}

.temp-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.temp-header span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.temp-indicator {
    background: linear-gradient(to right, var(--cold-1), var(--cold-2), var(--normal), var(--hot-1), var(--hot-2));
    height: 20px;
    border-radius: 10px;
    position: relative;
    margin-bottom: 15px;
}

.temp-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
    margin-top: 5px;
}

.temp-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.temp-desc {
    padding: 12px;
    background: white;
    border-radius: 8px;
    margin-top: 10px;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
}

.input-with-label {
    position: relative;
}

.input-with-label::before {
    content: "¥";
    position: absolute;
    left: 16px;
    top: 68%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: var(--text-secondary);
    z-index: 2;
    line-height: 1;
}

.input-with-label input {
    padding-left: 40px !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animation-delay-1 { animation-delay: 0.1s; }
.animation-delay-2 { animation-delay: 0.2s; }
.animation-delay-3 { animation-delay: 0.3s; }

/* 快速日期按钮 */
.quick-date-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.quick-date-btn {
    padding: 8px 12px;
    background: #e3f2fd;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1565c0;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-date-btn:hover {
    background: #bbdefb;
}

/* 温度输入样式 */
.vertical-temp-inputs {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 新增样式 - 市场温度金额设置标签 */
.temp-settings-label {
    font-size: 1.1rem; /* 增大字体 */
    font-weight: 600; /* 加粗 */
    color: #1e88e5; /* 主色调蓝色 */
    margin-bottom: 12px; /* 增加下边距 */
    display: block; /* 确保独占一行 */
    border-left: 4px solid #ff6d00; /* 左侧橙色装饰线 */
    padding-left: 10px; /* 装饰线内边距 */
    transition: all 0.3s ease; /* 平滑过渡效果 */
}

.temp-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.temp-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.temp-input-label {
    width: 70px;
    font-weight: 500;
    color: var(--text-secondary);
}

.temp-input-container {
    flex: 1;
    display: flex;
    position: relative;
}

.temp-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
}

.date-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    padding: 4px 8px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

/* 图表容器滚动条 */
.chart-container::-webkit-scrollbar {
    height: 6px;
}

.chart-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chart-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.chart-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 缩放控件 */
.chart-controls-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.zoom-controls {
    display: flex;
    gap: 8px;
}

.move-controls {
    display: flex;
    gap: 8px;
}

.control-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0f0f0;
    border: 1px solid #ddd;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s;
}

.control-btn:hover {
    background: #e0e0e0;
    transform: scale(1.05);
}

/* 金额显示优化 */
.summary-value, .result-value {
    position: relative;
    overflow: hidden;
}

.summary-value:hover, .result-value:hover {
    overflow: auto;
    white-space: normal;
    text-overflow: clip;
}

/* 修复金额溢出问题 */
.summary-value.adaptive-font,
.result-value.adaptive-font {
    font-size: clamp(0.85rem, 3.5vw, 1.1rem);
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .summary-value.adaptive-font,
    .result-value.adaptive-font {
        font-size: clamp(0.9rem, 2.5vw, 1.3rem);
    }
}

/* 日期选择器样式 */
.day-select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.day-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2);
}

/* 温度等级样式 */
.temp-level {
    font-weight: 600;
    color: #ff6d00;
}

/* 移动设备适配 */
@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .chart-container {
        height: 180px;
    }
    
    .control-btn {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .quick-date-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

/* 收益颜色 */
.positive {
    color: var(--danger-color);
}

.negative {
    color: var(--success-color);
}

/* 图表切换样式 */
.chart-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: #f5f7fa;
    padding: 4px;
}

.chart-tab {
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
}

.chart-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 2px 4px rgba(30, 136, 229, 0.3);
}

/* 图表区域 */
.chart-area {
    margin-top: 16px;
}

/* 修复温度输入框样式 */
.temp-input-container input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
}

/* 结果卡片动画延迟 */
.card {
    animation: fadeIn 0.4s ease-out;
}

/* 修复表单组边距 */
.form-group:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .calculator-content {
        display: flex;
        flex-direction: row;
        height: calc(100vh - var(--header-height)); /* 使用动态计算的header高度 */
        overflow: hidden;
    }
    
    .input-section,
    .result-section {
        flex: 1;
        height: 100%;
        overflow-y: auto;
        padding-right: 8px;
    }
}

/* 滚动条样式 */
.input-section::-webkit-scrollbar,
.result-section::-webkit-scrollbar {
    width: 6px;
}

.input-section::-webkit-scrollbar-track,
.result-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.input-section::-webkit-scrollbar-thumb,
.result-section::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.input-section::-webkit-scrollbar-thumb:hover,
.result-section::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 在原有样式基础上添加以下内容 */

/* 温度浮窗样式 */
.temp-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 20px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
}

.temp-popup.show {
    opacity: 1;
}

.popup-header {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: var(--primary-dark);
    text-align: center;
}

.current-temp {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.1), rgba(13, 71, 161, 0.1));
}

.other-temps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.other-temp-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.temp-value {
    font-weight: 600;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* 温度计图标 */
#temp-icon {
    margin-right: 8px;
}

/* 鼠标悬停效果 */
#market-temp-display {
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.3s;
}

#market-temp-display:hover {
    background: rgba(255, 255, 255, 0.3);
}

#popup-current-temp {
    font-size: 3rem; /* 较小字体显示指数名称 */
}

#popup-current-index {
    font-size: 1rem; /* 较小字体显示指数名称 */
}
/* 在文档5的CSS部分添加以下规则 */
.popup-header {
    display: flex; /* 使用flex布局 */
    align-items: center; /* 垂直居中 */
    justify-content: center; /* 水平居中 */
    gap: 8px; /* 图标和文本间距 */
}

.popup-temp-icon {
    color: var(--primary-dark); /* 使用标题相同的颜色 */
	width: 25px; /* 可选：调整图标大小 */
    height: 25px; /* 可选：调整图标大小 */
    flex-shrink: 0; /* 防止图标被压缩 */
}

.other-temp-item span:first-child {
    font-size: 0.9rem; /* 指数名称字体大小 */
    font-weight: 500; /* 中等粗细 */
}

.other-temp-item .temp-value {
    font-size: 0.9rem; /* 温度值字体大小 */
    font-weight: 600; /* 加粗显示 */
}

#header-temp-value {
font-size: 1.2em; /* 调整为您需要的大小 */
}


/* 新增样式 */
.1temp-display-wrapper {
    display: flex;
    flex-direction: column; /* 垂直布局 */
    align-items: flex-start; /* 左对齐 */
    justify-content: center;
    gap: 0; /* 移除间隙 */
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    backdrop-filter: blur(2px);
}

.temp-value-line {
    display: flex;
    align-items: center;
    gap: 2px; /* 图标和文字间距 */
    white-space: nowrap; /* 防止换行 */
    line-height: 1.1; /* 紧凑行高 */
}

#temp-icon {
    margin-right: 1px; /* 负边距让图标紧贴文本 */
    width: 25px;
    height: 25px;
    position: relative;
    top: -0.5px; /* 微调垂直位置 */
}

.temp-text {
    font-size: 0.9em; /* 稍微减小文本大小 */
}

.index-name {
    font-size: 0.7em; /* 更小的字体 */
    opacity: 0.9; /* 降低不透明度 */
    margin-top: 3px; /* 上移减少间距 */
    letter-spacing: 0.6px; /* 字母间距 */
    line-height: 1.1; /* 行高 */
    white-space: nowrap; /* 防止换行 */
    text-align: left; /* 左对齐 */
    width: 100%; /* 确保宽度 */
}

.temp-value-line span {
    white-space: nowrap;
}

.hidden {
    display: none !important;
}

/* 修复浮窗隐藏问题 */
.temp-popup {
    display: none; /* 初始隐藏 */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 20px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.3s, transform 0.3s;
}

.temp-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}


/* 在 style_release.css 中添加 */
.error-popup {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    padding: 15px 25px;
    z-index: 2000;
    animation: fadeInOut 3s forwards;
    border-left: 4px solid #ef5350;
}

.error-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-content svg {
    flex-shrink: 0;
}

.error-content p {
    margin: 0;
    font-weight: 500;
    color: #333;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    20% { opacity: 1; transform: translateX(-50%) translateY(0); }
    80% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
/* 自定义指数输入框样式 */
#custom-index-row {
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    animation: fadeIn 0.3s ease;
}

#custom-index-code {
    margin-bottom: 8px;
}
/* 自定义指数选项样式 */
#investment-type option.custom-option {
    font-weight: bold !important;
    color: var(--secondary-color) !important;
    background-color: rgba(255, 109, 0, 0.1) !important;
}

/* 修复复选框与文字分行问题 */
.custom-checkbox-container {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
    margin-top: 0 !important;
}

.custom-checkbox {
    margin: 0 !important;
    margin-right: 8px !important;
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0 !important;
}

.custom-checkbox-label {
    white-space: nowrap !important;
    display: inline !important;
    vertical-align: middle !important;
    font-size: 0.95rem !important;
}

/* 调整整体布局 */
#custom-index-row .form-row > label {
    margin-bottom: 8px;
    display: block;
}

#custom-index-row .custom-checkbox-container {
    margin-top: 8px;
}

/* 垂直对齐修复 */
.custom-checkbox-container {
    display: inline-flex;
    align-items: center; /* 确保垂直居中 */
    line-height: normal; /* 重置行高 */
}

.custom-checkbox {
    vertical-align: middle; /* 垂直对齐中间 */
    position: relative;
    top: -1px; /* 微调垂直位置 */
}

.custom-checkbox-label {
    line-height: 1.5; /* 设置合适的行高 */
    vertical-align: middle; /* 垂直对齐中间 */
}