/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #333;
}

/* Container */
.container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: fadeIn 0.5s ease;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

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

.subtitle {
    font-size: 16px;
    opacity: 0.95;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    margin-top: 10px;
    font-weight: 500;
}

/* Main Content */
.main {
    padding: 30px;
}

/* Site List */
.site-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

/* Site Card */
.site-card {
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.site-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.site-card[data-status="online"] {
    background: linear-gradient(to right, #f8f9fa, #e8f5e9);
}

.site-card[data-status="offline"] {
    background: linear-gradient(to right, #f8f9fa, #ffebee);
}

.site-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 20px;
}

.site-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-info {
    flex: 1;
}

.site-name {
    font-size: 22px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Site Status */
.site-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 20px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 2s infinite;
}

.status-dot.checking {
    background: #ffc107;
    animation: pulse 1s infinite;
}

.status-dot.online {
    background: #4caf50;
    animation: pulse 2s infinite;
}

.status-dot.offline {
    background: #f44336;
    animation: none;
}

.status-dot.warning {
    background: #ff9800;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
}

.status-text {
    color: #666;
}

.site-status .online + .status-text {
    color: #4caf50;
    font-weight: 600;
}

.site-status .offline + .status-text {
    color: #f44336;
}

.site-status .warning + .status-text {
    color: #ff9800;
}

/* Status Info */
.status-info {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
}

.update-time {
    font-size: 14px;
    color: #999;
}

#lastCheck {
    font-weight: 600;
    color: #667eea;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

.footer p {
    font-size: 14px;
    color: #666;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 40px 20px;
}

.error-message p {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

.error-message button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.error-message button:hover {
    transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 currentColor;
    }
    70% {
        box-shadow: 0 0 0 10px transparent;
    }
    100% {
        box-shadow: 0 0 0 0 transparent;
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .header h1 {
        font-size: 24px;
    }

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

    .site-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .site-status {
        padding-left: 0;
    }

    .legend {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .main {
        padding: 20px;
    }
}