/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* 主内容区域 */
main {
    display: grid;
    gap: 25px;
}

section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

section:hover {
    transform: translateY(-2px);
}

section h2 {
    color: #4a5568;
    margin-bottom: 20px;
    font-size: 1.5rem;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 10px;
}

/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    min-width: 120px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f, #a8e6cf);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    color: white;
}

/* 设备信息样式 */
.device-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.device-info h3 {
    color: #4a5568;
    margin-bottom: 10px;
}

.device-details {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
}

/* 数据显示样式 */
.data-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.data-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s ease;
}

.data-item:hover {
    border-color: #667eea;
}

.data-item label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
}

.data-item span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
}

/* EQ类型选择样式 */
.eq-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.eq-type-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.eq-type-option:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.eq-type-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.eq-type-option input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

/* EQ点位选择样式 */
.eq-points {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.eq-point {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.eq-point:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.eq-point input[type="radio"] {
    margin-right: 8px;
    transform: scale(1.1);
}

.eq-point input[type="radio"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

/* 参数调整样式 */
.parameter-section {
    margin: 20px 0;
}

.slider-container,
.input-container {
    margin-top: 15px;
}

.slider-container label,
.input-container label {
    display: block;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 10px;
}

/* 数字输入框样式 */
input[type="number"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
}

/* 频率预设按钮样式 */
.input-helper {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.input-helper span {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.freq-preset {
    padding: 6px 12px;
    background: #e9ecef;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.freq-preset:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.9rem;
    color: #666;
}

/* 应用设置区域 */
.apply-section {
    margin-top: 30px;
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #e2e8f0;
}

/* 日志样式 */
.log-container {
    background: #1a1a1a;
    color: #00ff00;
    padding: 15px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    border: 2px solid #333;
}

.log-entry {
    margin-bottom: 5px;
    padding: 2px 0;
}

.log-entry.info {
    color: #00ff00;
}

.log-entry.warning {
    color: #ffaa00;
}

.log-entry.error {
    color: #ff4444;
}

.log-entry.success {
    color: #00ff88;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .data-display {
        grid-template-columns: 1fr;
    }
    
    .frequency-bands {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* 状态指示器 */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-connected {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
}

.status-disconnected {
    background: #ff4444;
    box-shadow: 0 0 10px #ff4444;
}

.status-monitoring {
    background: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}
