/* Website Monitoring Dashboard Styles */
* {
    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;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header-content {
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #4a5568;
    font-size: 2.5rem;
    font-weight: 700;
}

.header h1 i {
    color: #667eea;
    margin-right: 15px;
}

.last-updated {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #718096;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Status Overview */
.status-overview {
    margin-bottom: 30px;
}

.status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.status-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.status-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.card-icon.up {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.card-icon.down {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.card-icon.warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.card-icon.total {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.card-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #2d3748;
}

.card-content p {
    color: #718096;
    font-weight: 500;
}

/* Availability Meter */
.availability-meter {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.meter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.meter-header h3 {
    color: #2d3748;
    font-size: 1.2rem;
}

.meter-header span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
}

.progress-bar {
    height: 10px;
    background: #e2e8f0;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    transition: width 0.5s ease;
    border-radius: 5px;
}

/* Filters */
.filters {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    gap: 30px;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.filter-group, .search-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label, .search-group label {
    font-weight: 600;
    color: #4a5568;
}

.filter-group select, .search-group input {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.filter-group select:focus, .search-group input:focus {
    outline: none;
    border-color: #667eea;
}

/* Sites Grid */
.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.site-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 5px solid #e2e8f0;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.site-card.status-up {
    border-left-color: #48bb78;
}

.site-card.status-down {
    border-left-color: #f56565;
}

.site-card.status-warning {
    border-left-color: #ed8936;
}

.site-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.site-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
}

.site-url {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

.site-url:hover {
    text-decoration: underline;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.up {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.down {
    background: #fed7d7;
    color: #742a2a;
}

.status-badge.warning {
    background: #feebc8;
    color: #7b341e;
}

.site-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.response-time {
    font-size: 0.9rem;
    color: #718096;
}

.site-type {
    padding: 4px 8px;
    background: #edf2f7;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}

.ssl-info {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #718096;
}

.ssl-warning {
    color: #ed8936;
    font-weight: 600;
}

/* Loading and Error States */
.loading-state, .error-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.loading-state i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.error-state i {
    font-size: 3rem;
    color: #f56565;
    margin-bottom: 20px;
}

.loading-state p, .error-state p {
    font-size: 1.1rem;
    color: #4a5568;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #2d3748;
    margin: 0;
}

.close-modal {
    font-size: 1.5rem;
    cursor: pointer;
    color: #718096;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #2d3748;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 15px 25px 25px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input[type="text"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
}

.form-help {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-top: 5px;
}

/* Checkbox style */
.form-group input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
}

/* Hidden elements */
.hidden {
    display: none;
}

/* Success and Danger buttons */
.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .status-cards {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .filters {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
    }
    
    .sites-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card {
    animation: fadeIn 0.5s ease forwards;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}
