* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

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

/* 顶部标题栏样式 */
.header-bar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
    margin-bottom: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

.company-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px;
    border-radius: 8px;
}

.company-logo:hover {
    transform: scale(1.05);
}

.main-title {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 顶部控制栏 */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-bottom: 20px;
    border-top: 1px solid #e0e0e0;
}

.left-controls, .right-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 主要内容区域 */
.main-content {
    display: flex;
    gap: 20px;
    height: calc(100vh - 140px);
}

/* 左侧控制面板 */
.control-panel {
    width: 300px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.control-panel h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.parameter-section, .speed-section, .timer-section, .statistics, .advanced-controls {
    margin-bottom: 25px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.input-group input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.limit-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
}

.ratio-text {
    font-size: 11px;
    color: #3498db;
    margin-top: 2px;
    display: block;
    font-style: italic;
}

/* 按钮样式 */
.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background-color: #138496;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.control-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* 速度控制 */
.speed-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.speed-btn {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.speed-btn.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.speed-btn:hover {
    background-color: #ecf0f1;
}

.speed-btn.active:hover {
    background-color: #2980b9;
}

/* 计时器 */
.timer-display {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
    text-align: center;
    padding: 10px;
    background: #ecf0f1;
    border-radius: 4px;
}

/* 统计信息 */
.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* 右侧演示区域 */
.demo-area {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 15px 20px 20px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.device-info {
    margin-bottom: 15px;
    text-align: center;
}

.device-info h2 {
    color: #2c3e50;
    margin-bottom: 10px;
}

.device-specs {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: #666;
    font-size: 14px;
}

/* 设备容器 */
.device-container {
    width: 100%;
    height: calc(100% - 60px);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -20px;
}

#device-svg {
    width: 100%;
    height: 100%;
    max-height: 520px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

/* PCB模型样式 */
.pcb-model {
    fill: #2ecc71;
    stroke: #27ae60;
    stroke-width: 2;
    opacity: 0.8;
}

/* 动画效果 */
.moving {
    transition: transform 0.1s linear;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        max-height: 300px;
    }
    
    .device-specs {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .control-buttons {
        justify-content: center;
    }
    
    .speed-buttons {
        justify-content: center;
    }
}

/* 设备照片展示样式 */
.device-photo-section {
    margin: 10px 0;
    background: white;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.device-photo-container {
    position: relative;
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.device-photo-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.device-photo {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.device-photo-container:hover .device-photo {
    transform: scale(1.02);
}

.photo-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 8px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.device-photo-container:hover .photo-overlay {
    transform: translateY(0);
}

.photo-label {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* 响应式设计 - 设备照片 */
@media (max-width: 768px) {
    .device-photo-section {
        margin: 8px 0;
        padding: 8px;
    }

    .device-photo-container {
        max-width: 150px;
    }

    .photo-label {
        font-size: 11px;
    }
}
