* {
    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: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.header {
    background: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

.header h1 {
    margin-bottom: 10px;
}

.tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.tab {
    padding: 15px 20px;
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    transition: all 0.3s;
    position: relative;
}

.tab.active {
    background: white;
    color: #2c3e50;
}

.tab:hover {
    background: #e9ecef;
}

.tab-content {
    display: none;
    padding: 20px;
}

.tab-content.active {
    display: block;
}

.controls {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.input-group label {
    font-weight: bold;
    color: #495057;
    min-width: 120px;
}

.input-group input, .input-group select {
    padding: 8px;
    border: 2px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
}

.input-group input[type="url"] {
    flex: 1;
    min-width: 200px;
}

.input-group input[type="number"] {
    width: 80px;
}

.input-group input:focus {
    border-color: #667eea;
    outline: none;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-start {
    background: #28a745;
    color: white;
}

.btn-start:hover {
    background: #218838;
}

.btn-stop {
    background: #dc3545;
    color: white;
}

.btn-stop:hover {
    background: #c82333;
}

.btn-add {
    background: #007bff;
    color: white;
}

.btn-add:hover {
    background: #0056b3;
}

.btn-remove {
    background: #dc3545;
    color: white;
    padding: 6px 8px;
    font-size: 16px;
    border-radius: 4px;
    min-width: 32px;
}

.btn-remove:hover {
    background: #c82333;
}

.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

.monitor-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
}

.monitor-header {
    background: #f8f9fa;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
}

.monitor-url {
    font-weight: bold;
    color: #2c3e50;
}

.monitor-status {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-indicator {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
}

.status-monitoring {
    background: #d4edda;
    color: #155724;
}

.status-stopped {
    background: #f8d7da;
    color: #721c24;
}

.status-error {
    background: #f8d7da;
    color: #721c24;
}

.monitor-content {
    padding: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #e9ecef;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
}

.stat-value.good {
    color: #28a745;
}

.stat-value.warning {
    color: #ffc107;
}

.stat-value.error {
    color: #dc3545;
}

.history-section {
    margin-top: 20px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
}

.history-item {
    padding: 8px 12px;
    border-bottom: 1px solid #dee2e6;
    display: grid;
    grid-template-columns: 80px 80px 100px 80px 80px 1fr;
    gap: 10px;
    align-items: center;
    font-size: 12px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item:nth-child(even) {
    background: #f8f9fa;
}

.history-item .good {
    color: #28a745;
    font-weight: bold;
}

.history-item .warning {
    color: #ffc107;
    font-weight: bold;
}

.history-item .error {
    color: #dc3545;
    font-weight: bold;
}

.history-header-item {
    font-weight: bold;
    color: #495057;
    padding: 8px 12px;
    background: #e9ecef;
    display: grid;
    grid-template-columns: 80px 80px 100px 80px 80px 1fr;
    gap: 10px;
    font-size: 12px;
}

.alert-section {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-config {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    z-index: 1000;
    animation: slideIn 0.3s;
}

.notification.success {
    background: #28a745;
}

.notification.warning {
    background: #ffc107;
    color: #212529;
}

.notification.error {
    background: #dc3545;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

.export-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.export-buttons {
    display: flex;
    gap: 10px;
}

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

.btn-export:hover {
    background: #138496;
}