* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rajdhani', 'Segoe UI', sans-serif;
    background: #000000;
    background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.02)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    min-height: 100vh;
    padding: 0;
    color: #e0e0e0;
    margin: 0;
}

.container {
    max-width: 100%;
    margin: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
    padding-bottom: 105px;
}

header {
    background:
        linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0.9) 50%, rgba(0, 0, 0, 0.7) 100%),
        repeating-conic-gradient(#000000 0% 25%, rgba(255, 255, 255, 0.15) 0% 50%) 50% / 20px 20px;
    color: white;
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    padding: 20px 15px;
    gap: 30px;
}

.logo-link {
    flex-shrink: 0;
    display: block;
    line-height: 0;
    transition: opacity 0.2s ease;
}

.logo-link:hover {
    opacity: 0.85;
}

.🌈 {
    width: 228px;
    height: 63px;
    background: url(https://game.raceroom.com/ranked/a-Bfc7VK9b.svg) center / contain no-repeat;
}

header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #ffffff;
    margin: 0;
    line-height: 63px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    flex: 1;
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.logout-button:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
}

.logout-button svg {
    width: 16px;
    height: 16px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 40px;
    background: #0a0a0a;
    border-bottom: 1px solid #1a1a1a;
    flex-wrap: wrap;
    gap: 15px;
}

.create-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.refresh-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 1px;
}

select {
    padding: 8px 13px;
    border: 2px solid #374151;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    background: #1f2937;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

select:hover {
    border-color: #dc2626;
    background: #273142;
}

select:focus {
    outline: none;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

button {
    padding: 8px 17px;
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

button:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    background: #374151;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    justify-content: center;
}

.dropdown-button svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: #1f2937;
    border: 2px solid #374151;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    min-width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.dropdown-item {
    width: 100%;
    padding: 10px 16px;
    background: #1f2937;
    border: none;
    border-radius: 0;
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.5px;
    text-transform: none;
    box-shadow: none;
    border-bottom: 1px solid #374151;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #273142;
    transform: none;
    box-shadow: none;
}

.dropdown-item:active {
    background: #374151;
}

/* Cost Dashboard */
.cost-dashboard {
    background: #141824;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.cost-dashboard.collapsed {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

.cost-toggle {
    padding: 6px 15px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 12px;
    color: #10b981;
    text-transform: uppercase;
    letter-spacing: 1px;
    user-select: none;
    transition: all 0.2s;
}

.cost-toggle:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

.cost-content {
    padding: 15px;
}

.cost-dashboard h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35em;
    color: #10b981;
    margin-bottom: 19px;
    text-transform: uppercase;
    font-weight: 700;
}

.metrics-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.metric-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 12px;
    border-radius: 6px;
    border: 1px solid #334155;
    flex: 1;
    min-width: 200px;
}

.metric-card.total-cost {
    background: linear-gradient(135deg, #1e3a2e 0%, #0f1f1a 100%);
    border: 1px solid #10b981;
    flex: 0 0 auto;
    width: 250px;
    min-width: 250px;
}

.metric-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 21px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    color: #ffffff;
    margin-bottom: 3px;
}

.metric-card.total-cost .metric-value {
    color: #10b981;
}

.metric-subtitle {
    font-size: 11px;
    color: #64748b;
}

#refresh-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

#refresh-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.5);
}

.vm-list {
    padding: 25px 40px;
    background: transparent;
    padding: 30px;
    background: #141824;
}

.vm-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vm-list h2 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.35em;
    color: #ef4444;
    margin-bottom: 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

#loading {
    text-align: center;
    padding: 60px;
    color: #6b7280;
    font-size: 1.2em;
    font-weight: 600;
}

.error {
    background: #7f1d1d;
    color: #fca5a5;
    padding: 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #dc2626;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
    background: #1a1f2e;
    border-radius: 6px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

th {
    padding: 18px 15px;
    text-align: left;
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    color: #ef4444;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1.5px;
    border-bottom: 2px solid #dc2626;
}

td {
    padding: 16px 15px;
    border-bottom: 1px solid #1f2937;
    color: #d1d5db;
    font-size: 14px;
}

/* Fixed width for status column to prevent jumping */
td:nth-child(2) {
    width: 100px;
    min-width: 100px;
}

/* Fixed width for Management column (4th) to prevent jumping */
td:nth-child(4) {
    width: 110px;
    min-width: 110px;
}

/* Fixed width for Log column (5th) to prevent jumping */
td:nth-child(5) {
    width: 110px;
    min-width: 110px;
}

tbody tr {
    transition: all 0.3s;
}

tbody tr:hover {
    background: #1f2937;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.1);
}

.status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status.running {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #d1fae5;
    box-shadow: 0 0 10px rgba(5, 150, 105, 0.3);
}

.status.off {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: #fecaca;
    box-shadow: 0 0 10px rgba(153, 27, 27, 0.3);
}

.status.starting {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fef3c7;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.status.stopping {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fef3c7;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.status.initializing {
    background: linear-gradient(135deg, #db2777 0%, #be185d 100%);
    color: #fce7f3;
    box-shadow: 0 0 10px rgba(219, 39, 119, 0.3);
}

.age {
    font-size: 14px;
    font-weight: 600;
}

.age-safe {
    color: #10b981;
}

.age-warning {
    color: #f59e0b;
}

.age-critical {
    color: #ef4444;
}

.labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.label-tag {
    background: #1f2937;
    color: #60a5fa;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.actions {
    display: flex;
    gap: 8px;
}

.reboot-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.reboot-btn:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.5);
}

.start-btn {
    padding: 8px 16px;
    min-width: 100px;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.start-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.5);
}

.stop-btn {
    padding: 8px 16px;
    min-width: 100px;
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(153, 27, 27, 0.3);
}

.stop-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    box-shadow: 0 4px 12px rgba(153, 27, 27, 0.5);
}

.delete-btn {
    padding: 8px 16px;
    min-width: 100px;
    background: linear-gradient(135deg, #7f1d1d 0%, #450a0a 100%);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(127, 29, 29, 0.3);
    border: 1px solid #991b1b;
}

.delete-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    box-shadow: 0 4px 12px rgba(127, 29, 29, 0.6);
}

.delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.management-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: normal;
    transition: all 0.3s;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.management-link:hover {
    color: #93c5fd;
    text-shadow: 0 0 8px rgba(96, 165, 250, 0.5);
}

.ip-text {
    color: #e0e0e0;
    font-weight: normal;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.server-name {
    font-size: 14px;
    font-weight: normal;
}

.checking-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fef3c7;
    box-shadow: 0 0 10px rgba(217, 119, 6, 0.3);
}

.error-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #991b1b 0%, #7f1d1d 100%);
    color: #fecaca;
    box-shadow: 0 0 10px rgba(153, 27, 27, 0.3);
}

.waiting-status {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: #e5e7eb;
    box-shadow: 0 0 10px rgba(107, 114, 128, 0.3);
}

input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #dc2626;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .controls {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }

    .create-section,
    .refresh-section {
        flex-direction: column;
        width: 100%;
    }

    table {
        font-size: 12px;
    }

    th,
    td {
        padding: 10px;
    }
}