* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(74, 144, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 179, 237, 0.2) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 60% 70%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(1px 1px at 80% 10%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 90% 60%, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(1px 1px at 33% 80%, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 10% 90%, rgba(255, 255, 255, 0.3), transparent);
    background-size: 200% 200%;
    animation: particleMove 25s linear infinite;
    z-index: 0;
    pointer-events: none;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

@keyframes particleMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(15, 32, 39, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 30px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(74, 144, 226, 0.3);
}

header h1 {
    font-size: 2rem;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.last-updated {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #5568d3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #138496;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #c82333;
}

.btn-sm {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(74, 144, 226, 0.3);
    padding: 20px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(74, 144, 226, 0.6);
}

.stat-card.healthy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: 2px solid rgba(56, 239, 125, 0.5);
}

.stat-card.warning {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    border: 2px solid rgba(242, 201, 76, 0.5);
}

.stat-card.critical {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: 2px solid rgba(244, 92, 67, 0.5);
}

.stat-card.expired {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    border: 2px solid rgba(76, 161, 175, 0.5);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.actions-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(32, 58, 67, 0.5);
    backdrop-filter: blur(10px);
    color: #ffffff;
    transition: all 0.3s ease;
}

.filter-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.filter-input:focus {
    outline: none;
    border-color: rgba(74, 144, 226, 0.8);
    background: rgba(32, 58, 67, 0.7);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid rgba(74, 144, 226, 0.3);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(32, 58, 67, 0.5);
    backdrop-filter: blur(10px);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.filter-select option {
    background: rgba(15, 32, 39, 0.95);
    color: white;
}

.filter-select:hover {
    border-color: rgba(74, 144, 226, 0.6);
    background: rgba(32, 58, 67, 0.7);
}

.filter-select:focus {
    outline: none;
    border-color: rgba(74, 144, 226, 0.8);
    background: rgba(32, 58, 67, 0.7);
    box-shadow: 0 0 15px rgba(74, 144, 226, 0.3);
}

.servers-section h2 {
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.servers-list {
    display: grid;
    gap: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #667eea;
    font-size: 1.2rem;
}

.server-card {
    background: rgba(32, 58, 67, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(74, 144, 226, 0.3);
    padding: 20px;
    border-radius: 15px;
    border-left: 5px solid rgba(74, 144, 226, 0.8);
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.server-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transform: translateY(-3px);
    border-color: rgba(74, 144, 226, 0.6);
}

.server-card.healthy {
    border-left-color: #38ef7d;
}

.server-card.warning {
    border-left-color: #f2c94c;
}

.server-card.critical {
    border-left-color: #ff0000;
}

.server-card.expired {
    border-left-color: #6c757d;
    opacity: 0.9;
}

/* Power Status Colors */
.server-card.power-running {
    border-left-color: #38ef7d !important;
}

.server-card.power-offline {
    border-left-color: #ff0000 !important;
}

.server-card.power-transitioning {
    border-left-color: #f2c94c !important;
}

.server-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.server-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.status-badge.healthy {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    box-shadow: 0 2px 8px rgba(56, 239, 125, 0.4);
}

.status-badge.warning {
    background: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
    box-shadow: 0 2px 8px rgba(242, 201, 76, 0.4);
}

.status-badge.critical {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    box-shadow: 0 2px 8px rgba(244, 92, 67, 0.4);
}

.status-badge.expired {
    background: linear-gradient(135deg, #2c3e50 0%, #4ca1af 100%);
    box-shadow: 0 2px 8px rgba(76, 161, 175, 0.4);
}

.server-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-size: 0.9rem;
}

.server-detail {
    display: flex;
    align-items: center;
    gap: 5px;
}

.server-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    padding: 15px 30px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 9999;
    max-width: 500px;
    text-align: center;
    transform: translateX(-50%) translateY(-100px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
    display: block;
    animation: slideInDown 0.4s ease forwards;
}

@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

.notification.success {
    background: #28a745;
}

.notification.error {
    background: #ff0000;
}

.notification.info {
    background: #17a2b8;
}

.notification.warning {
    background: rgba(255, 193, 7, 0.95);
    color: #333;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: rgba(15, 32, 39, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(74, 144, 226, 0.4);
    animation: modalSlideIn 0.4s ease;
    text-align: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.7) translateY(-50px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-title {
    font-size: 1.8rem;
    color: #ffffff;
    margin-bottom: 15px;
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.modal-message {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.modal-actions .btn {
    min-width: 100px;
    padding: 12px 24px;
    font-size: 1rem;
    justify-content: center;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .actions-bar {
        flex-direction: column;
    }

    .server-card {
        grid-template-columns: 1fr;
    }

    .server-actions {
        justify-content: flex-start;
    }
}

.fa-spin {
    animation: fa-spin 1s infinite linear;
}

@keyframes fa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
