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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #131A25;
    color: #E6EAEB;
    padding: 20px;
}

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

.header {
    background: #1D2434;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.header p {
    color: #A0AEC0;
    font-size: 16px;
}

.filter-info {
    background: #e3f2fd;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    color: #1565c0;
    border-left: 4px solid #2196f3;
}

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

.header-title {
    flex: 1;
}

.header-logo {
    flex-shrink: 0;
    margin-left: 20px;
}

.header-logo svg {
    max-height: 80px;
    max-width: 200px;
    height: auto;
    width: auto;
}

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

.stat-box {
    background: #2D3340;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s;
}

.stat-box:hover {
    transform: translateY(-2px);
}

.stat-box .number {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.stat-box.slow .label {
    color: #A0AEC0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* NEU: Details unter der Zahl anzeigen */
.stat-box.slow .details {
    font-size: 11px;
    color: #A0AEC0;
    margin-top: 5px;
    font-weight: normal;
}

.stat-box.online .number { color: #3CD670; }
.stat-box.offline .number { color: #DF484A; }
.stat-box.uptime .number { color: #7A74FF; }
.stat-box.slow .number { color: #ffc107; }

.sites {
    display: grid;
    gap: 15px;
}

.site {
    background: #1D2434;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: box-shadow 0.2s;
}

.site:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.site.offline {
    border-left: 4px solid #dc3545;
    background: #2D3340;
}

.site.online {
    border-left: 4px solid #3CD670;
}

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

.site-name {
    font-size: 18px;
    font-weight: 600;
}

.site-info {
    background: #1D2434;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.8;
}

.site-info-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #131A25;
}

.site-info-row:last-child {
    border-bottom: none;
}

.site-info-label {
    color: #A0AEC0;
    font-weight: 600;
}

.site-info-value {
    font-weight: 600;
}

.incident-box {
    background: rgba(223, 72, 74, .2);
    padding: 15px;
    margin-top: 12px;
    border-radius: 4px;
}

.incident-box h4 {
    margin-bottom: 10px;
    font-size: 15px;
}

.incident-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    font-size: 14px;
}

.incident-label {
    font-weight: 600;
}

.incident-value {
    font-weight: 600;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.status-badge.online {
    background: #3CD670;
    color: #1D2434;
}

.status-badge.offline {
    background: #DF484A;
}

.last-update {
    text-align: center;
    color: #A0AEC0;
    margin-top: 20px;
    font-size: 14px;
    padding: 15px;
    border-radius: 8px;
}

.auto-refresh {
    display: inline-block;
    padding: 4px 8px;
    background: #1D2434;
    color: #3CD670;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 10px;
}

/* Refresh Button */
.refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2D3340;
    color: #E6EAEB;
    border: 2px solid #3CD670;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin: 10px 0;
}

.refresh-btn:hover {
    background: #3CD670;
    color: #1D2434;
    transform: translateY(-2px);
}

.refresh-btn:active {
    transform: translateY(0);
}

.refresh-btn.loading {
    pointer-events: none;
    opacity: 0.6;
}

.refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    background: white;
    border-radius: 10px;
}

.loading::before {
    content: "⏳";
    font-size: 48px;
    display: block;
    margin-bottom: 20px;
}

.error {
    background: #f8d7da;
    color: #721c24;
    padding: 30px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: center;
    border-left: 4px solid #dc3545;
}

@media (max-width: 768px) {
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .site-info-row {
        flex-direction: column;
    }
    
    .header h1 {
        font-size: 24px;
    }
    
    /* Logo auf Mobile OBEN */
    .header-top {
        flex-direction: column-reverse;  /* Logo kommt nach oben */
        align-items: left;  /* Zentriert */
    }
    
    .header-title {
        text-align: left;  /* Titel zentriert */
        margin-top: 15px;
    }
    
    .header-logo {
        margin-left: 0;
    }
    
   .header-logo svg {
    max-height: 60px;
    }
}

.performance-box {
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 14px;
}

.performance-box.perf-critical {
    background: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.4);
    color: #dc3545;
}

.performance-box.perf-slow {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #ffc107;
}

.performance-box small {
    display: block;
    opacity: 0.8;
    margin-top: 4px;
}

.perf-stats {
    margin-top: 10px;
    text-align: center;
}

.perf-stats span {
    margin: 0 10px;
    font-weight: bold;
}

.perf-critical {
    color: #dc3545;
}

.perf-slow {
    color: #ffc107;
}