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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
}

.header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    transition: all 0.3s ease;
    margin: auto;
}

/* Container style when table is visible */
.container.with-table {
    width: 90%;
    max-width: 800px;
    min-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
}

.logo img {
    margin-bottom: 20px;
    width: 300px;
    height: auto;
}

h1 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
}

form {
    padding-bottom: 10px;
}

input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
}

button {
    background-color: #0070AD; /* Default blue background */
    color: #fff; /* Text color */
    border: none; /* No border */   
    padding: 20px 40px; /* Internal Padding */  
    font-size: 16px; /* Text dimensions */  
    border-radius: 5px; /* Rounded Corners */   
    cursor: pointer; /* Mouse Pointer */   
    transition: background-color 0.3s, transform 0.2s; /* Color and transformation transitions */   
}

button:hover {
    background-color: #17ABDA; /* Lighter blue on hover */
}

.stop-button {
    background-color: #dc3545 !important; /* Red background for stop buttons */
    padding: 20px 40px !important; /* Keep original size */
    font-size: 16px !important; /* Keep original size */
}

.stop-button:hover {
    background-color: #c82333 !important; /* Darker red on hover */
}

.error {
    color: red;
    margin-top: 10px;
}

select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    justify-content: space-between;
}

#statusMessage {
    margin-top: 20px;
    font-size: 14px;
    color: #555;
}

footer {
    margin-top: 30px;
    font-size: 12px;
    color: #777;
}

/* Support email styling */
.support-email {
    color: #0070AD;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.support-email:hover {
    color: #17ABDA;
    text-decoration: underline;
}

/* Style for running instance table */
.instance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    table-layout: fixed;
}

#instanceTableContainer {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    padding-bottom: 10px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 600px) {
    .instance-table th,
    .instance-table td {
        padding: 8px 4px;
        font-size: 14px;
    }

    .instance-table button {
        padding: 4px 8px;
        font-size: 12px;
    }
}

.instance-table th,
.instance-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.instance-table td:nth-child(3) { width: 1%; } /* Access Type */
.instance-table td:nth-child(5) { width: 5%; } /* Actions */

.instance-table td a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.instance-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.instance-table tr:hover {
    background-color: #f5f5f5;
}

.instance-table .stop-button {
    padding: 6px 12px !important; /* Smaller size only for table buttons */
    font-size: 12px !important; /* Smaller font only for table buttons */
}

.instance-table .stop-button:hover {
    background-color: #c82333 !important; /* Consistent hover color */
}

/* Logout button style */
#logoutBtn {
    background-color: #dc3545 !important; /* Same red as stop button */
    color: white;
    border: none;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#logoutBtn:hover {
    background-color: #c82333 !important; /* Same hover color as stop button */
}

.user-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    width: 100%;
}

#userDisplay {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.user-icon {
    font-size: 20px;
    color: #333;
}

/* Copy button styles */
.copy-button {
    background-color: transparent;
    border: none;
    color: #0070AD;
    cursor: pointer;
    padding: 2px;
    margin-left: 4px;
    font-size: 12px;
    transition: color 0.2s;
    box-shadow: none;
}

.copy-button:hover {
    color: #17ABDA;
    transform: none;
    background-color: transparent;
    box-shadow: none;
}

.copy-button:active {
    transform: none;
    box-shadow: none;
}

/* Tooltip styles */
.copy-tooltip {
    position: fixed;
    background-color: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    opacity: 0;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}