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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
}

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

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

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

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.main-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 20px;
    color: #667eea;
    font-size: 1.5em;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s;
}

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

.form-group button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.3s;
}

.form-group button:hover {
    background: #5568d3;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.domains-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.domain-item {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.domain-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.domain-name {
    font-size: 1.3em;
    font-weight: 600;
    color: #333;
}

.domain-actions {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

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

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

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.checks-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.check-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.check-chart-container {
    position: relative;
    width: 100%;
    height: 150px;
}

.check-info {
    flex: 1;
}

.check-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
    margin-right: 10px;
}

.check-type.http {
    background: #3498db;
    color: white;
}

.check-type.icmp {
    background: #9b59b6;
    color: white;
}

.check-type.tcp {
    background: #e67e22;
    color: white;
}

.check-type.udp {
    background: #1abc9c;
    color: white;
}

.check-details {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.check-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.check-status.enabled {
    background: #27ae60;
    color: white;
}

.check-status.disabled {
    background: #95a5a6;
    color: white;
}

.check-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85em;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
}

.modal-content.large {
    max-width: 900px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 20px;
}

.close:hover {
    color: #000;
}

.loading {
    text-align: center;
    color: #666;
    padding: 20px;
}

.error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

.success {
    background: #efe;
    color: #3c3;
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
}

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

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

.stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.results-list {
    max-height: 500px;
    overflow-y: auto;
}

.result-item {
    background: #f8f9fa;
    border-left: 4px solid #ddd;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
}

.result-item.success {
    border-left-color: #27ae60;
}

.result-item.failure {
    border-left-color: #e74c3c;
}

.result-item.timeout {
    border-left-color: #95a5a6;
}

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

.result-status {
    font-weight: 600;
}

.result-time {
    color: #666;
    font-size: 0.9em;
}

.result-details {
    color: #666;
    font-size: 0.85em;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state::before {
    content: "📭";
    font-size: 3em;
    display: block;
    margin-bottom: 10px;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    margin-top: 20px;
}

.chart-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}