* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px;
    max-width: 700px;
    width: 100%;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-size: 32px;
}

.subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.status-box {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 2px solid #667eea;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.status-item:last-child {
    border-bottom: none;
}

.label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #667eea;
}

.indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.online {
    background: #28a745;
    box-shadow: 0 0 10px #28a745;
}

.offline {
    background: #dc3545;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 30px;
}

.cmd {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cmd:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #667eea;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.config-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #667eea;
}

.config-input {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.config-input label {
    font-weight: 600;
    color: #333;
    font-size: 13px;
    flex-basis: 100%;
}

.config-input input {
    flex: 1;
    min-width: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
}

.config-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 5px rgba(102, 126, 234, 0.3);
}

.save-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.save-btn:hover {
    background: #5568d3;
}

.config-hint {
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.buttons {
    display: flex;
    gap: 10px;
    margin: 30px 0;
}

button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    color: white;
    font-size: 14px;
    transition: all 0.3s;
}

.refresh {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.refresh:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.stop {
    background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.stop:hover {
    background: linear-gradient(135deg, #c82333 0%, #c0392b 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.error {
    background: #ffe5e5;
    color: #dc3545;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
    display: none;
}

.error.show {
    display: block;
}

.update {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 20px;
}

.footer {
    text-align: center;
    font-size: 12px;
    color: #999;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

@media (max-width: 600px) {
    .container {
        padding: 30px 20px;
    }

    h1 {
        font-size: 24px;
    }

    .buttons {
        flex-direction: column;
    }

    button {
        width: 100%;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .cmd-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }
}
