body {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

h1 {
    color: #2c3e50;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
    text-align: center;
}

.control-panel {
    margin-bottom: 15px;
    padding: 12px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.control-panel select, 
.control-panel input[type="text"],
.control-panel input[type="number"] {
    min-width: 160px;
    padding: 6px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: #f8fafc;
    margin: 0;
}

.control-panel select:focus, 
.control-panel input[type="text"]:focus,
.control-panel input[type="number"]:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
    background: #ffffff;
}

.control-panel button {
    padding: 6px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#startBtn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

#stopBtn {
    background: linear-gradient(135deg, #f44336 0%, #da190b 100%);
    color: white;
}

#openScreenBtn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

#startBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

#stopBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

#openScreenBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#openScreenBtn:disabled {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.stats-wrapper {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    padding: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.stats-container {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-item {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    background: #f8fafc;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #edf2f7;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 2px;
}

.stat-item:hover {
    background: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stat-item label {
    flex: 0 0 auto;
    font-size: 13px;
    color: #1a2942;
    font-weight: 600;
    margin-right: 10px;
    white-space: nowrap;
    letter-spacing: 0.3px;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.stat-item span {
    flex: 0 0 100px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'SF Mono', 'Roboto Mono', monospace;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: right;
    display: inline-block;
    margin-left: auto;
}

.stats-container::before {
    content: '直播数据';
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 2px solid #edf2f7;
    text-align: center;
}

.qianchuan-stats::before {
    content: '千川数据';
}

.live-room-info {
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 4px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.control-group label {
    &:not(.switch) {
        color: #64748b;
        font-weight: 500;
        min-width: 80px;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        width: 95%;
        padding: 15px;
        margin: 10px auto;
    }

    h1 {
        font-size: 22px;
        margin-bottom: 20px;
    }

    .control-panel {
        padding: 15px;
    }

    .stats-container {
        min-width: 100%;
        max-width: 100%;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .control-panel select, 
    .control-panel input[type="text"],
    .control-panel input[type="number"], 
    .control-panel button {
        width: 100%;
        min-width: unset;
    }

    .control-group label {
        margin-bottom: 4px;
    }

    .live-room-info {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .stat-item {
        padding: 12px;
        overflow: visible !important;
    }

    .stat-item label {
        font-size: 13px;
        font-weight: 600;
        color: #1a2942;
        overflow: visible !important;
    }

    .stat-item span {
        font-size: 14px !important;
        flex: 1 1 auto !important;
        min-width: 60px !important;
        max-width: none !important;
        overflow: visible !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }

    .stats-wrapper {
        padding: 10px 0;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 5px;
    }

    .container {
        width: 98%;
        padding: 10px;
        margin: 5px auto;
    }

    h1 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .control-panel {
        padding: 12px;
    }

    .stat-item {
        padding: 10px;
        overflow: visible !important;
    }

    .stat-item label {
        font-size: 12px;
        overflow: visible !important;
    }

    .stat-item span {
        font-size: 13px !important;
        flex: 1 1 auto !important;
        min-width: 50px !important;
        max-width: none !important;
        overflow: visible !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }
} 

/* 数值显示相关的样式 */
.weighted-roi {
    min-width: 150px;
}

@media (max-width: 768px) {
    .weighted-roi {
        min-width: auto !important;
        flex: 1 1 auto !important;
    }
    
    .percent-rate {
        min-width: 35px !important;
        font-size: 11px !important;
    }
}

/* 负数和状态样式 */
.stat-item span.negative {
    color: red;
    background: #fff5f5;
}

/* 显示控制 */
.stat-item[style*="display: none"] {
    display: none !important;
}

.stat-item[style*="display: flex"] {
    display: flex !important;
}

/* 基础数值样式 */
.stat-item.money span {
    color: #059669;
    background: #ecfdf5;
}

.stat-item.count span {
    color: #3b82f6;
    background: #eff6ff;
}

.percent-rate {
    font-size: 12px !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    margin-right: 4px !important;
    flex: 0 0 auto !important;
    min-width: 40px !important;
    text-align: center !important;
}

.percent-rate.positive {
    color: #ef4444 !important;
    background: #fee2e2 !important;
}

.percent-rate.negative {
    color: #10b981 !important;
    background: #d1fae5 !important;
}

.stat-item.ratio span {
    color: #8b5cf6;
    background: #f5f3ff;
}

/* 警告状态样式 - 使用更高优先级 */
.stats-container .stat-item.count span.warning {
    color: #dc2626 !important;
    background: #fee2e2 !important;
    font-weight: 700 !important;
}

/* 确保警告样式覆盖所有其他状态 */
.stat-item.count span.warning,
.stat-item.count span.warning:hover,
#onlineUsers.warning {
    color: #dc2626 !important;
    background: #fee2e2 !important;
} 

/* 修改时间的状态样式 */
.stats-container .stat-item #modifyTime.time-success {
    color: #059669 !important;
    background: #ecfdf5 !important;
    font-weight: 600 !important;
}

.stats-container .stat-item #modifyTime.time-error {
    color: #dc2626 !important;
    background: #fee2e2 !important;
    font-weight: 600 !important;
}

/* 默认时间样式 */
.stats-container .stat-item #modifyTime {
    color: #64748b !important;
    background: #f1f5f9 !important;
}

/* 如果页面太长，可以添加最大高度限制 */
/* .data-display {
    max-height: 80vh;
    overflow-y: auto;
} */

/* 修改详情的样式 */
.stat-item.modify span {
    color: #ea580c !important;  /* 更深的橙色 */
    background: #ffedd5 !important;  /* 浅橙色背景 */
    font-weight: 600 !important;
    min-width: 100px !important;  /* 确保有足够的宽度 */
    text-align: right !important;
}

/* 微信通知开关样式 */
.notification-toggle {
    display: inline-block;
    margin: 0 5px;
    vertical-align: middle;
}

.switch {
    display: inline-flex;
    position: relative;
    align-items: center;
    width: 40px;
    height: 20px;
    margin-left: 5px;
    border: 1px solid var(--el-switch-off-color, #dcdfe6);
    outline: none;
    border-radius: 10px;
    box-sizing: border-box;
    background: var(--el-switch-off-color, #dcdfe6);
    cursor: pointer;
    transition: border-color .3s, background-color .3s;
    vertical-align: middle;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 1px;
    background-color: white;
    transition: transform .3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.slider.round {
    border-radius: 20px;
}

.slider.round:before {
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--el-switch-on-color, #20a53a);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 添加悬停效果 */
.switch:hover {
    border-color: var(--el-switch-on-color, #20a53a);
}

/* 添加禁用状态样式 */
.switch:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* 添加焦点样式 */
.switch:focus-within {
    outline: 2px solid var(--el-switch-on-color, #20a53a);
    outline-offset: 1px;
}

/* 微信通知文字标签样式 */
.notification-toggle > label {
    color: #64748b;
    font-weight: 500;
    margin-right: 5px;
}

#monitorBtn {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

/* 下拉菜单样式 */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 120px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1;
    margin-top: 5px;
}

.dropdown-content.show {
    display: block;
}

.dropdown-content a {
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    display: block;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
    color: var(--el-color-primary);
}

.dropdown-content a:first-child {
    border-radius: 8px 8px 0 0;
}

.dropdown-content a:last-child {
    border-radius: 0 0 8px 8px;
}

#openBtn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 6px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

#openBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

#openBtn:disabled {
    background: linear-gradient(135deg, #93c5fd 0%, #60a5fa 100%);
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 设置面板模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 3% auto;
    padding: 15px;
    width: 80%;
    max-width: 700px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.settings-section {
    margin-bottom: 12px;
    padding: 12px;
    background-color: #f8fafc;
    border-radius: 10px;
    border: 1px solid #edf2f7;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.settings-section h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 15px;
    color: #1e293b;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.setting-row {
    margin-bottom: 8px;
}

.setting-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.setting-group label {
    width: 70px;
    font-size: 14px;
    color: #1a2942;
    font-weight: 500;
    margin-right: 5px;
    padding-top: 8px;
}

.threshold-inputs {
    display: flex;
    align-items: flex-start;
    flex: 1;
    gap: 10px;
    justify-content: flex-start;
}

.input-group {
    display: flex;
    flex-direction: column;
    width: 45%;
    max-width: 80px;
    margin-right: 5px;
}

.input-label {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 2px;
    font-weight: 500;
    white-space: nowrap;
}

.input-group input {
    width: 100%;
    padding: 6px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    margin-bottom: 0;
}

.input-group input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
}

/* 不再需要单独的单位标签 */
.input-group span {
    display: none;
}

/* 单个输入框样式 - 与其他编辑框保持一致 */
.single-input {
    max-width: 80px;
    margin: 0;
}

/* 保留用于兼容性，但不再使用 */
.input-divider {
    display: none;
}

/* 保留旧的样式以兼容 */
.setting-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.setting-item label {
    width: 120px;
    font-size: 14px;
    color: #1a2942;
    font-weight: 500;
}

.setting-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.setting-item input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74,144,226,0.2);
}

.setting-item span {
    margin-left: 8px;
    color: #64748b;
    font-size: 14px;
}

.settings-buttons {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    gap: 10px;
}

.settings-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-buttons button:first-child {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
}

.settings-buttons button:last-child {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
}

.settings-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
#settingsBtn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    margin-right: 5px;
}
