body {
    font-family: Arial, sans-serif;
    margin: 5px;
}

.container {
    max-width: 95%;
    margin: 1rem auto;
}

.button-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.button {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    margin: 0;
    font-size: 16px;
    cursor: pointer;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.result {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;    
    max-height: 50px;
    width: 97.6%;            
}

.stock-chart {
    margin-top: 20px;
    width: 100%;
    height: 400px;    
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

/* 自定义滚动条样式 */
.result::-webkit-scrollbar {
    width: 8px;
}

.result::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.result::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.result::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 选项卡样式 */
.tab-container {
    margin-top: 20px;
}

.tab-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
}

.tab-item {
    padding: 0.5rem 0.8rem;
    cursor: pointer;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-bottom: none;
    margin-right: 0.15rem;
    border-radius: 5px 5px 0 0;
    white-space: nowrap;
    font-size: 0.875rem;
    flex: 1 1 auto;
    text-align: center;
    min-width: 3.5rem;
}

.tab-item.active {
    background-color: #4CAF50;
    color: white;
}

.tab-content {
    display: none;
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
    overflow-x: hidden;
}

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

/* 热门行业样式 */
#hotindustry {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 10px;
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#hotindustry h3 {
    grid-column: span 2;
    font-size: 18px;
    color: #333;
    font-weight: bold;
}

#hotindustry div {
    display: flex;
    justify-content: center;    
    padding: 0.1875rem 0.925rem;
    align-items: center;    
    color: white;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    text-align: center;
    position: relative;
}

#hotindustry div input[type="checkbox"] {
    position: absolute;
    right: 5px;
    bottom: 5px;
    opacity: 0.7;
    transform: scale(1.4);
    cursor: pointer;
}

.positive-color {
    background-color: #ff4d4d;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    padding: 0.5rem;
}

.negative-color {
    background-color: #00c853;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: 1.2;
    padding: 0.5rem;
} 

/* 确保这些样式不会被覆盖 */
#hotindustry .positive-color,
#hotindustry .negative-color {
    animation: none !important;
    transition: none !important;
}

/* 修改 .negative 类，使其不影响我们的新样式 */
#hotindustry div.negative {
    /* 移除所有样式，或者根据需要保留部分样式 */
    background: none;
    color: inherit;
    box-shadow: none;
    animation: none;
}

/* 修改layui radio样式 */
#hotindustry div .layui-form-radio {
    position: absolute;
    right: 5px;
    bottom: 5px;
    margin: 0;
    width: 18px;
    height: 18px;
}

#hotindustry div .layui-form-radio i {
    color: #fff;
    font-size: 16px;
}

#hotindustry div .layui-form-radioed i {
    color: #ff5722;
    font-size: 16px;
}

#hotindustry div .layui-form-radio > div {
    display: none; /* 隐藏默认的文本 */
}

#hotindustry div:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#hotindustry div.negative:hover {
    background: linear-gradient(45deg, #e53935, #f44336);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 图表相关样式 */
.chart-slider {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    cursor: grab;
    aspect-ratio: 16/13;
    margin-bottom: 3px;
}

.chart-slider::-webkit-scrollbar {
    display: none;
}

.chart-container {
    display: flex;
    width: 200%;
    transition: transform 0.3s ease;
    transform: translateX(0);
    height: 100%;
}

.chart-page {
    width: 50%;
    padding: 0 5px;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-page img {
    flex: 1;    
}

/* 刷新动画样式 */
@keyframes refreshFlash {
    0% {
        background: linear-gradient(45deg, rgba(76, 175, 80, 0), rgba(33, 150, 243, 0));
        opacity: 1;
    }
    50% {
        background: linear-gradient(45deg, rgba(33, 150, 243, 0.1), rgba(76, 175, 80, 0.1));
        opacity: 0.8;
    }
    100% {
        background: linear-gradient(45deg, rgba(76, 175, 80, 0), rgba(33, 150, 243, 0));
        opacity: 0;
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInScaleNegative {
    0% {
        opacity: 0;
        transform: scale(0.9);
        background: linear-gradient(45deg, #e53935, #f44336);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        background: linear-gradient(45deg, #f44336, #e53935);
    }
}

.refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    pointer-events: none;
    animation: refreshFlash .2s ease-in-out forwards;
    backdrop-filter: blur(1px);
}

/* 导航和控制元素样式 */
.nav-button {
    padding: 2px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.page-indicator {
    display: flex;
    gap: 5px;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
}

.page-dot.active {
    background-color: #4CAF50;
}

/* 自动刷新控制面板样式 */
.auto-refresh-control {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-switch {
    display: flex;
    align-items: center;
}

.toggle-switch input {
    margin-right: 10px;
}

.toggle-switch select {
    margin-left: 10px;
}

.refresh-all-button {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}

/* 多模型匹配股票卡片样式 */
.multi-model-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.multi-model-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.multi-model-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.multi-model-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin: 4px 0;
}

.industry-info {
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

.multi-model-models {
    color: #666;
    font-size: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}

/* 添加isMultiModeldiv类定义 */
.isMultiModeldiv {
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #f32a2a;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 10;
}

/* 响应式布局 */
@media (max-width: 480px) {
    .tab-item {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        min-width: 3rem;
    }
}

@media screen and (min-width: 1024px) {
    .container {
        max-width: 90%;
    }
    /* 已合并到.stock-chart的基础样式中 */
    .stock-container {
        flex: 0 0 calc(47% - 10px);
        margin-bottom: 20px !important;
    }
}

@media screen and (min-width: 1440px) {
    .container {
        max-width: 95%;
    }
    .stock-container {
        flex: 0 0 calc(24.333% - 26px)
    }
}

@media screen and (min-width: 1920px) {
    .container {
        max-width: 80%;
    }
    .stock-container {
        flex: 0 0 calc(25% - 2% - 15px);
    }
}

.stock-container {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 9px;
    position: relative;
}

.stock-container[data-multi-model="true"] {
    border: 2px solid #f32a2a;
}
/* 时间轴样式 */
.timeline-container {
    position: absolute;
    bottom: 25%;
    left: 11%;
    right: 11%;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 2;
}

.event-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.event-dot-long {
    background-color: #f44336;
}

.event-dot-short {
    background-color: #4CAF50;
}

.refresh-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    pointer-events: none;
    animation: refreshFlash .2s ease-in-out forwards;
    backdrop-filter: blur(1px);
}

/* 导航和控制元素样式 */
.nav-button {
    padding: 2px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.page-indicator {
    display: flex;
    gap: 5px;
}

.page-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ccc;
}

.page-dot.active {
    background-color: #4CAF50;
}

/* 自动刷新控制面板样式 */
.auto-refresh-control {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toggle-switch {
    display: flex;
    align-items: center;
}

.toggle-switch input {
    margin-right: 10px;
}

.toggle-switch select {
    margin-left: 10px;
}

.refresh-all-button {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
}

/* 键盘导航相关样式 */
.stock-container.keyboard-focused {
    outline: 2px solid #ec7373;
    box-shadow: 0 0 8px #ec7373;
    transition: outline 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    z-index: 10;
}

.keyboard-hint {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(76, 175, 80, 0.8);
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    z-index: 10;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: bold;
}

.key-press-effect {
    position: absolute;
    top: 50%;
    background-color: rgba(76, 175, 80, 0.5);
    color: white;
    padding: 10px;
    border-radius: 50%;
    font-size: 20px;
    transform: translateY(-50%);
    z-index: 100;
    animation: keyPressEffect 0.5s forwards;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.4);
}

.activation-effect {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid #4CAF50;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.6);
    pointer-events: none;
    z-index: 99;
    animation: activationEffect 0.5s forwards;
}

@keyframes keyPressEffect {
    0% { opacity: 0.8; transform: translateY(-50%) scale(1); }
    100% { opacity: 0; transform: translateY(-50%) scale(1.5); }
}

@keyframes activationEffect {
    0% { opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { opacity: 0; }
}

/* 添加焦点状态的视觉提示 */
.stock-container:focus-within {
    outline: 2px solid #4CAF50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}

/* 添加键盘导航的可访问性提示 */
.keyboard-navigation-tip {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 14px;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.5;
    max-width: 300px;
    text-align: center;
}

.keyboard-navigation-tip.show {
    display: block;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 添加点击效果 */
.stock-container {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.stock-container:active {
    transform: scale(0.99);
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px; /* 添加一些间距 */
}
#main #simple-clock {
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: #4CAF50;
    padding: 8px 15px;
    border-radius: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}
#main #simple-clock.trading-time {
    background: #ff4b4b;
    animation: blink 1s infinite;
}
@keyframes blink {
    0% { background-color: #ff4b4b; }
    50% { background-color: #f82f2f; }
    100% { background-color: #ff4b4b; }
}

/* 修改 #button_history 和 .history-container 的样式 */
#button_history {
    margin-top: 18px;
    padding: 4px;
    background-color: #f5f5f5;
    border-radius: 5px;
    display: none; /* 初始状态为隐藏 */
    overflow-x: auto; /* 添加水平滚动条 */
    white-space: nowrap; /* 防止换行 */
}

.history-container {
    display: flex;
    align-items: center; /* 垂直居中 */
    gap: 3px; /* 元素之间的间距 */
    flex-wrap: nowrap; /* 禁止换行 */
    width: max-content; /* 让容器宽度根据内容自适应 */
}

.history-item {
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.6rem;
    white-space: nowrap; /* 防止文本换行 */
}

.reset-history {
    background-color: #ff4b4b;
    color: white;
    border: none;
    padding: 3px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.6rem;
    white-space: nowrap; /* 防止文本换行 */
}

.reset-history:hover {
    background-color: #f82f2f;
}

/* zijing 更新动画 */
.zijing-update {
    animation: zijingUpdate 0.5s ease-in-out;
}

@keyframes zijingUpdate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.08);
        opacity: 0.6;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 确保 zijing 元素有正确的初始样式 */
.zijing {
    display: inline-block;
    transition: transform 0.3s ease;
    font-weight: bold;
    font-size: 14px;
}
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background-color: #4caf4f8c;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 5px rgba(0,0,0,0.3);
    display: none;
    z-index: 9999;
    transition: all 0.3s ease;
}
.back-to-top:hover {    
    transform: scale(1.1);
}
.new-stock-highlight {
    animation: highlightNew 1s linear 15 forwards;
    transform: scale(1.0);
    transition: transform 0.3s ease;
}
.new-stock-highlight:hover {
    animation: none; /* 鼠标悬停时停止动画 */
}
@keyframes highlightNew {
    0% { 
        background-color: rgba(76, 175, 80, 0.8);
        border-left: 2px solid #4CAF50;
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    }
    50% {
        background-color: rgba(255, 99, 71, 0.8);
        border-left: 1px solid #FF6347;
        box-shadow: 0 0 10px rgba(255, 99, 71, 0.8);
    }
    100% { 
        background-color: rgba(76, 175, 80, 0.8);
        border-left: 2px solid #4CAF50;
        box-shadow: 0 0 20px rgba(76, 175, 80, 0.8);
    }
}

.new-stock-notification {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { 
        transform: translateX(100%);
        opacity: 0;
    }
    to { 
        transform: translateX(0);
        opacity: 1;
    }
}

/* 静默监测样式 */
.silent-monitoring {
    color: #e73e3ee8;
    font-size: 12px;
    animation: blinkSilent 1s infinite;
}

@keyframes blinkSilent {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}
.stock-info {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.stock-info > div {
    flex: 0 0 calc(50% - 10px);
    margin-bottom: 10px;
}


/* 添加底部内边距 */
.container {
    padding-bottom: 60px; /* 根据导航栏高度调整 */
}

/* 美化底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    height: 60px;
}
.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px;
    cursor: pointer;
    color: #666;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}
.nav-item i {
    font-size: 20px;
    margin-bottom: 4px;
}
.nav-item.active {
    color: #4CAF50;
    font-weight: bold;
}
.nav-item:hover {
    background-color: #f5f5f5;
}

/* 明天玩什么数据样式 */
.kaipanla-container {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.kaipanla-container h3 {
    color: #333;
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 5px;
}
.kaipanla-container ul {
    list-style-type: none;
    padding: 0;
}
.kaipanla-container li {
    background-color: #fff;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kaipanla-container .title {
    font-weight: bold;
    color: #f52222;
}
.kaipanla-container .hot-value {
    background-color: #fc2828;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
}
/* 在 xg.css 中添加 */
.disabled-button {
    background-color: #ccc; /* 灰色背景 */
    color: #666; /* 灰色文字 */
    cursor: not-allowed; /* 禁用光标 */
    opacity: 0.6; /* 透明度 */
}
/* 添加新的样式 */
.charts-container {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-item {
    flex: 1;
    height: 200px;
}

/* 添加数字字体样式 */
.stock-pchg,
.time-label,
#simple-clock,
.stock-count,
.zhaban-label,
.lianban-label {
    font-family: "DIN Alternate", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 500;
    letter-spacing: -0.02em;
}

/* 主线逻辑表格样式 */
.top4luoji {
    margin-bottom: 20px;
}

.top4luoji h3 {    
    font-size: 18px;
    font-weight: bold;
}

#zhuxian-table-container {
    overflow-x: auto;
}

#zhuxian-table-container table {
    width: 100%;
    border-collapse: collapse;
}

#zhuxian-table-container th {
    background-color: #f2f2f2;
    font-weight: bold;
    text-align: center;
    padding: 10px 12px;
    border: 1px solid #e6e6e6;
    min-width: 100px;
}

#zhuxian-table-container td {
    padding: 8px 12px;
    border: 1px solid #e6e6e6;
    text-align: center;
}

#zhuxian-table-container tr:hover {
    background-color: #f9f9f9;
}

/* 添加layui-this类的样式，使其有底部边框效果 */
#zhuxian-table-container tr.layui-this th {
    border-bottom: 2px solid #5FB878;
    background-color: #f8f8f8;
}

/* 表格样式优化 */
#zhuxian-table-container table {
    margin-bottom: 20px;
}

#zhuxian-table-container td {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 涨幅颜色样式 */
.positive-rate {
    color: #f56c6c; /* 红色，表示涨幅为正 */
    font-weight: bold;
}

.negative-rate {
    color: #67c23a; /* 绿色，表示涨幅为负 */
    font-weight: bold;
}

.error-message, .no-data-message {
    padding: 15px;
    text-align: center;
    color: #999;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.error-message {
    color: #f56c6c;
}
