html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f4f9;
    color: #333;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    background: white;
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
    text-align: center;
}

h1, h2 {
    color: #444;
}

.selection-container {
    margin-bottom: 20px;
    text-align: left;
}

.selection-container label {
    font-weight: bold;
    margin-right: 10px;
}

#scenario-select, #api-select {
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid #ddd;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 40px; /* Make space for the arrow */
}

.actions-container {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

#check-btn, #live-update-btn, #shutdown-btn, #api-send-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#check-btn:hover, #live-update-btn:hover, #shutdown-btn:hover, #api-send-btn:hover {
    background-color: #0056b3;
}

#check-btn:disabled, #live-update-btn:disabled, #shutdown-btn:disabled, #api-send-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

#results {
    margin-top: 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.check-item {
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
}

.check-item.success {
    border-left: 5px solid #28a745; /* Green for success */
    background-color: #e9f7ef;
}

.check-item.error {
    border-left: 5px solid #dc3545; /* Red for error */
    background-color: #fceeee;
}

#download-link a {
    color: #007bff;
    text-decoration: none;
}

#download-link a:hover {
    text-decoration: underline;
}

/* API Tester Styles */
#api-tester {
    margin-top: 20px;
}

.api-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#api-select {
    flex-grow: 1;
}

#api-result {
    background-color: #282c34; /* Dark background */
    color: #abb2bf; /* Light text */
    border-radius: 5px;
    padding: 15px;
    text-align: left;
    white-space: pre-wrap; /* Wrap long lines */
    word-break: break-all; /* Break long words */
    min-height: 100px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
}
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader {
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}