/* ================================
   主控制区域样式
   ================================ */

/* 主要控制容器 */
.main-controls {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

/* 第一行：核心数据设置 */
.primary-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
}

/* 第二行：交易对选择 */
.secondary-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* 主要选择器样式 */
.primary-selector {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 120px;
    cursor: pointer;
}

.primary-selector:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.primary-selector option {
    background: #2d3748;
    color: #e2e8f0;
    padding: 8px;
}

/* 自动刷新开关（紧凑版） */
.auto-refresh-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-label {
    font-size: 13px;
    color: #e2e8f0;
    white-space: nowrap;
}

/* 自动刷新控件容器 */
.auto-refresh-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.refresh-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-switch span {
    font-size: 14px;
    color: #e2e8f0;
    white-space: nowrap;
}

.refresh-interval-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    transition: all 0.3s ease;
    min-width: 80px;
}

.refresh-interval-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.refresh-interval-select option {
    background: #2d3748;
    color: #e2e8f0;
}

/* 开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #cbd5e0;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4299e1;
}

input:checked + .slider:before {
    transform: translateX(24px);
    background-color: white;
}

/* 刷新状态指示器 */
.refresh-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #a8b3cf;
}

.refresh-status.active {
    color: #48bb78;
}

.refresh-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #6b7280;
}

.refresh-status.active .status-dot {
    background-color: #48bb78;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* 控制组标签样式 */
.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.control-group label {
    font-size: 13px;
    font-weight: 600;
    color: #a8b3cf;
    margin-bottom: 4px;
    white-space: nowrap;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .primary-controls {
        gap: 15px;
    }
    
    .secondary-controls {
        gap: 15px;
    }
    
    .primary-selector {
        min-width: 100px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .main-controls {
        padding: 15px;
    }
    
    .primary-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }
    
    .secondary-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .control-group {
        width: 100%;
    }
    
    .primary-selector {
        width: 100%;
        min-width: auto;
    }
    
    .auto-refresh-toggle {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-controls {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .primary-controls,
    .secondary-controls {
        gap: 10px;
    }
    
    .control-group label {
        font-size: 12px;
    }
    
    .primary-selector {
        padding: 6px 10px;
        font-size: 13px;
    }
} 