/* ================================
   顶部Header控件样式 - 简洁版
   ================================ */

/* 主Header容器 */
.top-header {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

/* 应用标题 */
.app-title h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #e2e8f0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

.app-title h1 i {
    color: #4299e1;
    font-size: 28px;
}

/* 主控制面板 */
.main-controls-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
    flex-wrap: wrap;
    justify-content: center;
}

/* 控制组 */
.control-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.control-group label {
    font-size: 12px;
    font-weight: 600;
    color: #a8b3cf;
    text-align: center;
    white-space: nowrap;
    margin: 0;
}

/* 选择器样式 */
.control-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 110px;
    cursor: pointer;
}

.control-select.compact {
    min-width: 80px;
    padding: 6px 10px;
    font-size: 13px;
}

.control-select: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);
}

.control-select option {
    background: #2d3748;
    color: #e2e8f0;
    padding: 8px;
}

/* 快速选择按钮 */
.quick-symbols {
    display: flex;
    gap: 4px;
}

.quick-symbol-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e0;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.quick-symbol-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #4299e1;
    color: #4299e1;
}

.quick-symbol-btn.active {
    background: #4299e1;
    border-color: #4299e1;
    color: white;
    box-shadow: 0 2px 8px rgba(66, 153, 225, 0.3);
}

/* 自动刷新控件 */
.auto-refresh-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 开关控件 */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.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: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #4299e1;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.action-btn.primary {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    border-color: #4299e1;
    color: white;
}

.action-btn.primary:hover {
    background: linear-gradient(135deg, #3182ce, #2b77c9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

/* 状态信息 */
.header-status {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    flex-shrink: 0;
}

.connection-status,
.refresh-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #e2e8f0;
}

.status-offline {
    color: #f56565;
}

.status-online {
    color: #48bb78;
}

.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% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .main-controls-panel {
        gap: 15px;
    }
    
    .control-select {
        min-width: 100px;
        font-size: 13px;
    }
}

@media (max-width: 1200px) {
    .top-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .main-controls-panel {
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-status {
        justify-content: center;
        margin-left: 0;
    }
}

@media (max-width: 992px) {
    .main-controls-panel {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-group {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .control-group label {
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .control-select {
        width: auto;
        min-width: 120px;
    }
    
    .quick-symbols {
        justify-content: space-between;
        width: 200px;
    }
    
    .action-buttons {
        justify-content: space-between;
        width: 200px;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 12px 15px;
    }
    
    .app-title h1 {
        font-size: 20px;
    }
    
    .app-title h1 i {
        font-size: 24px;
    }
    
    .control-select {
        width: 100%;
        min-width: auto;
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .quick-symbol-btn {
        padding: 4px 8px;
        font-size: 11px;
        flex: 1;
    }
    
    .action-btn {
        padding: 6px 12px;
        font-size: 12px;
        flex: 1;
    }
    
    .header-status {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .control-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .control-group label {
        text-align: left;
        font-size: 11px;
    }
    
    .quick-symbols {
        width: 100%;
    }
    
    .auto-refresh-controls {
        justify-content: space-between;
        width: 100%;
    }
    
    .action-buttons {
        width: 100%;
    }
} 