* {
    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;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2.5em;
}

header p {
    color: #666;
    font-size: 1.1em;
}

.dashboard {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #667eea;
}

.card h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.hint {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 10px;
}

.status {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
}

.status-indicator {
    font-size: 20px;
    margin-right: 10px;
}

.status-indicator.online {
    color: #28a745;
}

.status-indicator.offline {
    color: #dc3545;
}

.status-indicator.checking {
    color: #ffc107;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-details {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
}

.info {
    background: #e9ecef;
    padding: 20px;
    border-radius: 10px;
}

.info h3 {
    margin-bottom: 15px;
    color: #333;
}

.info ul {
    list-style: none;
}

.info li {
    padding: 5px 0;
    color: #495057;
}

.info code {
    background: #dee2e6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

/* 连接状态样式 */
.connection-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.status-connected {
    color: #28a745;
    font-weight: bold;
}

.status-disconnected {
    color: #dc3545;
    font-weight: bold;
}

.status-error {
    color: #fd7e14;
    font-weight: bold;
}

/* 设备列表样式 */
.receivers-list {
    margin-top: 15px;
    max-height: 200px;
    overflow-y: auto;
}

.receiver-item {
    padding: 8px 12px;
    background: white;
    margin: 5px 0;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* 消息日志样式 */
.message-log {
    height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
}

.log-entry {
    padding: 5px 0;
    border-bottom: 1px solid #f1f3f4;
}

.log-entry:last-child {
    border-bottom: none;
}

/* 指令列表样式 */
.commands-list {
    max-height: 200px;
    overflow-y: auto;
}

.command-item {
    background: white;
    padding: 10px;
    margin: 5px 0;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.command-item small {
    display: block;
    color: #6c757d;
    font-size: 0.8em;
    margin-top: 2px;
}

/* 设备状态样式 */
.device-status {
    background: white;
    padding: 15px;
    border-radius: 8px;
}

.device-status div {
    margin: 5px 0;
    color: #495057;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}