* {
    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;
    padding: 20px;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.last-refresh {
    font-size: 0.9em;
    opacity: 0.9;
}

.auto-refresh {
    color: #a0aec0;
    font-size: 0.9em;
}

.alert {
    padding: 15px;
    margin: 20px;
    border-radius: 5px;
    background: #bee3f8;
    border-left: 4px solid #3182ce;
}

.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f7fafc;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-label {
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.stat-success .stat-value {
    color: #38a169;
}

.stat-danger .stat-value {
    color: #e53e3e;
}

.table-container {
    padding: 30px;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

thead {
    background: #edf2f7;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2d3748;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 0.5px;
}

td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

tr:hover {
    background: #f7fafc;
}

.container-name {
    font-weight: 600;
    color: #2d3748;
}

.vm-hostname {
    color: #4a5568;
    font-family: 'Courier New', monospace;
}

.last-update {
    color: #718096;
    font-size: 0.9em;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-running {
    background: #c6f6d5;
    color: #22543d;
}

.status-stopped,
.status-exited {
    background: #fed7d7;
    color: #742a2a;
}

.status-paused {
    background: #feebc8;
    color: #7c2d12;
}

.status-restarting {
    background: #bee3f8;
    color: #2c5282;
}

.status-created {
    background: #e6fffa;
    color: #234e52;
}

.status-dead {
    background: #e2e8f0;
    color: #1a202c;
}

.status-removing {
    background: #fef5e7;
    color: #7d6608;
}

.no-data {
    text-align: center;
    padding: 40px !important;
    color: #a0aec0;
    font-style: italic;
}

.warning {
    font-size: 1.2em;
    cursor: help;
}

footer {
    background: #f7fafc;
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9em;
    color: #718096;
}

code {
    background: #edf2f7;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

footer a {
    color: #3182ce;
    text-decoration: none;
    font-weight: 600;
}

footer a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .statistics {
        grid-template-columns: repeat(2, 1fr);
        padding: 20px;
    }
    
    .table-container {
        padding: 20px;
    }
    
    th, td {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Add these new styles to the existing styles.css file */

/* Filter Section */
.filter-section {
    padding: 30px;
    background: #f7fafc;
    border-bottom: 2px solid #e2e8f0;
}

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

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    font-size: 0.85em;
    color: #4a5568;
    margin-bottom: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-item input[type="text"],
.filter-item select {
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 1em;
    background: white;
    transition: all 0.3s;
}

.filter-item input[type="text"]:focus,
.filter-item select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
}

.active-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 2px solid #e2e8f0;
    flex-wrap: wrap;
}

.active-filters strong {
    color: #2d3748;
}

.filter-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #edf2f7;
    color: #2d3748;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Table Info */
.table-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e2e8f0;
}

.results-count {
    font-size: 0.9em;
    color: #718096;
    font-weight: 600;
}

/* Sortable Table Headers */
th a {
    color: #2d3748;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.3s;
}

th a:hover {
    color: #667eea;
}

.sort-icon {
    font-size: 0.8em;
    color: #667eea;
}

/* No Data Link */
.no-data a {
    color: #3182ce;
    text-decoration: underline;
    font-weight: 600;
}

.no-data a:hover {
    color: #2c5282;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .filter-actions .btn {
        width: 100%;
    }
    
    .active-filters {
        font-size: 0.9em;
    }
    
    th a {
        font-size: 0.75em;
    }
}

/* Print styles */
@media print {
    .filter-section,
    .statistics,
    footer {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
    }
}
