/* 基础样式（Apple 风格） */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f7f7f7;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 85%;
    max-width: 700px;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #222;
}

.time-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.time-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #f9f9f9;
    min-width: 0; /* 允许容器收缩 */
}

.time-block label {
    white-space: nowrap; /* 防止标签换行 */
}

.time-block span {
    white-space: nowrap; /* 防止时间换行 */
}

label {
    font-weight: 500;
    color: #555;
    margin-bottom: 5px;
}

span {
    font-size: 1.2rem;
    color: #222;
}

#dst-icon {
    width: 24px;
    height: 24px;
    margin-left: 8px;
    vertical-align: middle;
}

.trading-status {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 8px;
    background-color: #fff;
    font-size: 1.2rem;
}

.trading-status p {
    margin: 8px 0;
}

.color-switch {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.color-switch label {
    margin-right: 10px;
    font-weight: 500;
}

/* 时段颜色 */
.pre-market {
    background-color: #ddd; /* 盘前灰色 */
    color: #555;
}

.regular-market {
    /* 默认绿色，JS 会根据用户选择修改 */
    background-color: #4CAF50; /* 盘中绿色 */
    color: white;
}

.after-market {
    background-color: #ddd; /* 盘后灰色 */
    color: #555;
}

.night-market {
    background-color: #333; /* 夜盘黑色 */
    color: white;
}

#mock-timeline {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none; /* 初始隐藏 */
    align-items: center;
    width: 70%; /* 时间轴宽度自适应 */
    max-width: 600px; /* 最大宽度 */
}

#time-slider {
    width: 100%; /* 滑块占据整个时间轴宽度 */
    margin-right: 10px;
}

/* 之前所有 CSS */

.stock-info {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* 防止文字换行 */
    min-width: 0; /* 允许容器收缩 */
}

#stock-symbol {
    font-weight: 600;
    color: #333;
    margin-right: 2px;
}

#stock-price {
    font-size: 1.1rem;
    font-weight: 500;
    transition: color 0.3s ease;
    flex-shrink: 0; /* 防止价格被压缩 */
}

#stock-input {
    width: 80px; /* 减小输入框宽度 */
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

#stock-input:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}