﻿body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f0f2f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

@keyframes move-bg {
    from { background-position: 0 0; }
    to { background-position: 75px 75px; }
}

@keyframes fade-bg {
    0% { opacity: 0.02; }
    25% { opacity: 0.05; }
    50% { opacity: 0.03; }
    75% { opacity: 0.04; }
    100% { opacity: 0.02; }
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://avatars.githubusercontent.com/u/182288589?s=200&v=4');
    background-size: 75px;
    z-index: -1;
    animation: move-bg 8s linear infinite, fade-bg 5s ease-in-out infinite;
}

.login-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 550px;
    text-align: center;
    box-sizing: border-box;
    position: relative; /* Added for modal positioning */
}

.logo-container {
    margin-bottom: 90px;
    text-align: center;
}

.logo-wrapper {
    display: inline-block;
    position: relative;
}

.apiquality-logo {
    max-width: 280px;
    height: auto;
    display: block;
}

.mcp-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: -50px;
    width: 50px;
    height: 50px;
}

.beta-tag {
    position: absolute;
    left: 55%;
    bottom: -55px;
    background-color: #6c757d;
    color: white;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

h2 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 2.2em;
}

.input-container {
    position: relative;
    margin-bottom: 15px;
}

.input-icon {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #555;
}

    .input-icon svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

.search-input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #555;
}

    .search-input-icon svg {
    width: 16px;
    height: 16px;
        fill: currentColor;
}

input[type='text'],
input[type='password'],
input[type='datetime-local'] {
    width: 100%;
    padding: 14px 12px 14px 40px;
    margin-bottom: 0;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.search-input-container {
    position: relative;
    margin-bottom: 15px;
    display: flex; /* Ensures input and button are on the same line */
    align-items: center;
}

#toolSearchInput {
    padding-right: 35px; /* Make space for the clear button */
    padding-left: 40px; /* Add padding for the search icon */
    flex-grow: 1; /* Allows input to take available space */
}

.clear-button {
    position: absolute;
    right: 10px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.2em;
    font-weight: bold;
    background: none;
    border: none;
    padding: 0 5px;
    line-height: 1; /* Ensures single line height */
    display: none; /* Hidden by default */
}


.clear-button:hover {
    color: #555;
}

    input[type='text']:focus,
    input[type='password']:focus,
    input[type='datetime-local']:focus {
        border-color: #007bff;
        outline: none;
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

button {
    background-color: #007bff;
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    width: 100%;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

    button:hover {
        background-color: #0056b3;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px; /* Space between buttons */
    margin-top: 25px;
}

form#tokenForm > .form-actions > button[type='submit'],
form#tokenForm > .form-actions > button#showToolsButton {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    padding: 0;
    margin: 0;
}

form#tokenForm > .form-actions > button#showToolsButton {
    background-color: #6c757d; /* Different color for tools button */
}

form#tokenForm > .form-actions > button#showToolsButton:hover {
    background-color: #5a6268;
}

.tools-container {
    margin-top: 30px;
    padding: 20px;
    background-color: #e9ecef;
    border-radius: 8px;
    border: 1px solid #ced4da;
    text-align: left;
    display: none; /* Hide the old tools container */
}

.tools-container h3 {
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5em;
}

/* Removed #toolsTable styles as it's no longer a table */
#toolsList ul {
    list-style: none;
    padding: 0;
}

#toolsList li {
    background-color: #f8f9fa;
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    font-size: 0.95em;
    color: #495057;
    text-align: left; /* Ensure text is left-aligned within list items */
}

#toolsList li strong {
    color: #007bff;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

#fetchToolsButton {
    margin-top: 20px;
    padding: 10px 15px;
    font-size: 1em;
    width: auto;
}

#responseMessage {
    margin-top: 30px;
    padding: 15px;
    border-radius: 8px;
    font-size: 1em;
    word-wrap: break-word;
    text-align: left;
    display: none;
    position: relative;
}

.success {
    background-color: #e9ecef;
    color: #333;
    border: 1px solid #ced4da;
}

.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.token-display {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
    word-break: break-all;
    position: relative;
    padding-right: 45px;
}

    .token-display pre {
        margin: 0;
        white-space: pre-wrap;
        font-family: 'Consolas', 'Courier New', monospace;
        font-size: 0.9em;
        color: #333;
    }

.copy-button, .vscode-install-button {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.copy-button {
    top: -10px;
    right: -10px;
}

.vscode-install-button {
    top: 16px;
    right: -10px;
}

.copy-button:hover, .vscode-install-button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}
.copy-button svg {
    width: 16px;
    height: 16px;
    fill: #555;
}

.vscode-install-button img {
    width: 16px;
    height: 16px;
    fill: #555;
}

.copy-notification {
    position: absolute;
    top: -7px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: 50px auto;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 700px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.modal-content h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

#toolsList {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 15px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #007bff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

