/* Quorum Demo - Modern Exciting Styles with Animations */

* {
    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;
    animation: gradientShift 30s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

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

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    text-align: center;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header h1 {
    color: #333;
    font-size: 2.8em;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

header p {
    color: #666;
    font-size: 1.2em;
}

.main-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    min-height: 500px;
}

/* Wizard Styles */
.wizard {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.wizard h2 {
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: all 0.3s ease;
}

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

.form-group input[type="checkbox"] {
    margin-right: 8px;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    font-weight: 600;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn {
    background: #f0f0f0;
    color: #333;
}

.btn:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9em;
    flex: none;
}

.btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

/* Topology Selector */
.topology-selector {
    max-width: 800px;
    margin: 0 auto;
}

.topology-selector h2 {
    margin-bottom: 20px;
}

#topologyList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.topology-card {
    border: 2px solid #e0e0e0;
    padding: 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.topology-card:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.topology-card h3 {
    margin-bottom: 10px;
    color: #333;
}

.topology-card p {
    color: #666;
    font-size: 0.9em;
}

/* Topology Canvas */
.topology-canvas {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Scenario Buttons */
.scenario-buttons {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.scenario-buttons h3 {
    margin-bottom: 15px;
    color: #333;
    text-align: center;
    font-size: 1.2em;
}

.scenario-buttons .button-group {
    margin-top: 15px;
}

.btn-scenario {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

.btn-scenario:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.btn-scenario.danger {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
}

.btn-scenario.success {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}

/* Quorum Summary */
.quorum-summary {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 25px;
    border-radius: 12px;
    border-left: 5px solid #667eea;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.quorum-summary h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.3em;
}

#quorumInfo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.quorum-stat {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quorum-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.quorum-stat .label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

.quorum-stat .value {
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

.quorum-stat.has-quorum {
    border-color: #4caf50;
}

.quorum-stat.has-quorum .value {
    color: #4caf50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.quorum-stat.no-quorum {
    border-color: #f44336;
}

.quorum-stat.no-quorum .value {
    color: #f44336;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Cluster Status - Special Styling */
.quorum-stat.cluster-status {
    grid-column: 1 / -1;
    padding: 30px;
    text-align: center;
    border-width: 3px;
}

.quorum-stat.cluster-status .label {
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 15px;
}

.quorum-stat.cluster-status .value-large {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 2px;
}

.quorum-stat.cluster-healthy {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
}

.quorum-stat.cluster-healthy .value-large {
    color: #2e7d32;
    text-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.quorum-stat.cluster-degraded {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
}

.quorum-stat.cluster-degraded .value-large {
    color: #c62828;
    animation: pulse 2s ease-in-out infinite;
}

/* Canvas Area - CENTERED */
.canvas-area {
    display: flex;
    gap: 20px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    border-radius: 12px;
    min-height: 500px;
    overflow-x: auto;
    justify-content: center; /* CENTERED! */
    align-items: flex-start;
}

.datacenter {
    flex: 0 0 280px;
    background: white;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.datacenter:hover {
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.datacenter-header {
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
    color: #333;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nodes-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.offline-vms-section {
    flex: 0 0 auto;
    width: 100%;
    margin-top: 20px;
}

.offline-vms-section .datacenter-header {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    border-bottom-color: #f44336;
}

.offline-vms-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 8px;
}

.vm-badge.passive {
    opacity: 0.5;
    background: #e0e0e0 !important;
    color: #666 !important;
    border: 2px dashed #999;
}

.vm-badge.passive:hover {
    opacity: 0.8;
}

.vm-badge.offline {
    background: #bdbdbd;
    color: #666;
    opacity: 0.7;
    cursor: pointer;
}

.vm-badge.offline:hover {
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.node-card {
    background: white;
    border: 3px solid #ddd;
    border-radius: 10px;
    padding: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.node-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.node-card:hover::before {
    left: 100%;
}

.node-card.state-on {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.2);
}

.node-card.state-off {
    border-color: #f44336;
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    opacity: 0.7;
    animation: fadeOpacity 2s ease-in-out infinite;
}

@keyframes fadeOpacity {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 0.5; }
}

.node-card.no-quorum {
    border-color: #ff9800;
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.node-card.is-witness::after {
    content: '👁️';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5em;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.node-header {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

.node-info {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 12px;
}

.node-info div {
    margin-bottom: 5px;
}

.node-controls {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.node-toggle {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    flex: 1;
    font-weight: 600;
    transition: all 0.3s ease;
}

.node-toggle.on {
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
}

.node-toggle.on:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.5);
}

.node-toggle.off {
    background: linear-gradient(135deg, #f44336 0%, #e91e63 100%);
    color: white;
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3);
}

.node-toggle.off:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(244, 67, 54, 0.5);
}

/* VM indicators */
.node-vms {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px dashed #e0e0e0;
}

.node-vms-title {
    font-size: 0.85em;
    color: #666;
    font-weight: bold;
    margin-bottom: 8px;
}

.vm-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8em;
    margin: 3px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
}

.vm-badge:hover {
    transform: scale(1.05);
}

.vm-badge.workload {
    background: linear-gradient(135deg, #2196f3 0%, #64b5f6 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.vm-badge.linstor_controller {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(156, 39, 176, 0.6);
    }
}

.vm-badge.cloudstack_mgmt {
    background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
    animation: glow 2s ease-in-out infinite;
}

.vm-badge.migrated {
    animation: migrationPulse 1.5s ease-in-out;
}

@keyframes migrationPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.vm-badge.offline {
    background: #bdbdbd;
    color: #666;
    opacity: 0.6;
}

/* Legend */
.legend {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.legend-item:hover {
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.legend-box {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    border: 3px solid;
}

.legend-box.green {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border-color: #4caf50;
}

.legend-box.yellow {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ff9800;
}

.legend-box.red {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border-color: #f44336;
}

.legend-vm {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Event Log */
.event-log {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 25px;
    border-radius: 12px;
    max-height: 350px;
    overflow-y: auto;
    border: 2px solid rgba(102, 126, 234, 0.2);
}

.event-log h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    font-size: 0.9em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    animation: slideInRight 0.3s ease-out;
    transition: all 0.3s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.event-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.event-item .event-type {
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.85em;
}

.event-item .event-details {
    color: #666;
}

.event-item .event-time {
    color: #999;
    font-size: 0.8em;
    margin-top: 5px;
}

.event-item.type-vm_migrated {
    border-left-color: #4caf50;
}

.event-item.type-vm_offline {
    border-left-color: #f44336;
}

.event-item.type-service_failover {
    border-left-color: #ff9800;
}

.event-item.type-service_offline {
    border-left-color: #f44336;
}

.event-item.type-node_toggle {
    border-left-color: #2196f3;
}

.event-item.type-scenario_executed {
    border-left-color: #9c27b0;
}

/* Responsive */
@media (max-width: 1200px) {
    .canvas-area {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .canvas-area {
        flex-direction: column;
        align-items: center;
    }

    .datacenter {
        width: 100%;
        max-width: 400px;
    }

    #quorumInfo {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .legend {
        justify-content: center;
    }
}

/* ============================================================================
   COMPACT LAYOUT STYLES
   ============================================================================ */

/* Compact Quorum Summary */
.quorum-summary-compact {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.quorum-summary-compact h3 {
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
}

.quorum-summary-compact #quorumInfo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.quorum-summary-compact .quorum-stat {
    padding: 12px;
    font-size: 0.9em;
}

.quorum-summary-compact .quorum-stat .label {
    font-size: 0.8em;
    margin-bottom: 4px;
}

.quorum-summary-compact .quorum-stat .value {
    font-size: 1.3em;
}

.quorum-summary-compact .quorum-stat.cluster-status {
    padding: 15px;
}

.quorum-summary-compact .quorum-stat.cluster-status .value-large {
    font-size: 1.8em;
}

/* Compact Scenario Buttons */
.scenario-buttons-compact {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%);
    padding: 12px;
    border-radius: 10px;
    margin: 15px 0;
    border: 2px solid rgba(102, 126, 234, 0.15);
}

.scenario-buttons-compact h3 {
    margin-bottom: 10px;
    color: #333;
    text-align: center;
    font-size: 1.05em;
}

.scenario-buttons-compact .button-group {
    margin-top: 10px;
    gap: 8px;
}

.scenario-buttons-compact .btn-scenario {
    padding: 8px 16px;
    font-size: 0.85em;
}

/* Compact Legend - Single Line */
.legend-compact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-size: 0.9em;
}

.legend-item-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    display: inline-block;
    border: 1px solid rgba(0,0,0,0.1);
}

.legend-box.green {
    background: linear-gradient(135deg, #e8f5e9 0%, #a5d6a7 100%);
    border-color: #4caf50;
}

.legend-box.yellow {
    background: linear-gradient(135deg, #fff9c4 0%, #fff176 100%);
    border-color: #fbc02d;
}

.legend-box.red {
    background: linear-gradient(135deg, #ffebee 0%, #ef9a9a 100%);
    border-color: #f44336;
}

/* VM Badge Mini for Legend */
.vm-badge-mini {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    color: white;
    font-weight: 600;
}

.vm-badge-mini.workload {
    background: linear-gradient(135deg, #2196f3 0%, #64b5f6 100%);
}

.vm-badge-mini.linstor_controller {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
}

.vm-badge-mini.cloudstack_mgmt {
    background: linear-gradient(135deg, #ff9800 0%, #ffa726 100%);
}

.vm-badge-mini.standby {
    background: linear-gradient(135deg, #757575 0%, #9e9e9e 100%);
}

/* Standby VM Styling */
.vm-badge.standby {
    opacity: 0.5;
    background: linear-gradient(135deg, #757575 0%, #9e9e9e 100%) !important;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    cursor: default !important;
}

.vm-badge.standby:hover {
    transform: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* VM Badge Clickable */
.vm-badge {
    cursor: pointer;
    user-select: none;
}

.vm-badge:not(.standby):hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* VM Context Menu */
.vm-menu {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    padding: 8px;
    z-index: 10000;
    min-width: 200px;
    animation: menuFadeIn 0.2s ease-out;
}

@keyframes menuFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.vm-menu-title {
    font-weight: bold;
    padding: 8px 12px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.95em;
}

.vm-menu button {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: white;
    text-align: left;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9em;
    transition: all 0.2s ease;
    margin: 2px 0;
}

.vm-menu button:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(5px);
}

/* Improved Datacenter Graphics */
.datacenter {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(245, 245, 250, 0.95) 100%);
    border: 3px solid #667eea;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
}

.datacenter:hover {
    box-shadow: 0 12px 48px rgba(102, 126, 234, 0.25);
    border-color: #764ba2;
    transform: translateY(-2px);
}

.datacenter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    padding: 12px;
    margin: -20px -20px 20px -20px;
    border-radius: 9px 9px 0 0;
    text-align: center;
    font-size: 1.15em;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    -webkit-text-fill-color: white;
    -webkit-background-clip: initial;
    background-clip: initial;
}

/* Node Cards Improved */
.node-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-width: 2px;
}

.node-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.node-header {
    font-weight: 700;
    font-size: 1.05em;
    color: #333;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

/* VM Dialog for Node Selection */
.vm-dialog {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10001;
    animation: fadeIn 0.2s ease-out;
}

.vm-dialog-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.vm-dialog-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.vm-dialog-content p {
    color: #666;
    margin-bottom: 15px;
}

.node-selection {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
    max-height: 400px;
    overflow-y: auto;
}

.node-select-btn {
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.node-select-btn:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: translateX(5px);
}

.node-select-btn strong {
    display: block;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
}

.node-select-btn span {
    color: #666;
    font-size: 0.9em;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
