:root {
    --bg-color: #f9fafb;
    --header-color: #ffffff;
    --text-color: #1f2937;
    --secondary-text: #4b5563;
    --accent-color: #52a8c5;
    --accent-hover: #e0e0e0;
    --border-color: #e5e7eb;
    --button-bg: #52a8c5;
    --button-text: #1f2937;
    --button-hover-bg: #e0e0e0;
    --button-border: #d1d5db;
    --svg-bg: #f0f2f5;
    --svg-border: #cccccc;
    --footer-bg: #fafafa;
    --footer-text: #888888;
    --notification-bg: #000000;
    --notification-text: #ffffff;
    --input-border: #cccccc;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.3);
    --input-bg: #ffffff;
    --auth-bg: #ffffff;
    --auth-tab-bg: #f0f0f0;
    --auth-tab-active-bg: #52a8c5;
    --auth-tab-text: #1f2937;
    --auth-input-bg: #ffffff;
    --auth-input-border: #cccccc;
    --auth-submit-bg: #52a8c5;
    --auth-submit-hover-bg: #e0e0e0;
    --auth-description: #6b7280;
    --modal-backdrop: rgba(0, 0, 0, 0.5);
}

body.dark-mode {
    --bg-color: #1e1e1e;
    --header-color: #2c2c2c;
    --text-color: #f0f0f0;
    --secondary-text: #d1d5db;
    --accent-color: #52a8c5;
    --accent-hover: #e0e0e0;
    --border-color: #3b3b3b;
    --button-bg: #0a799eab;
    --button-text: #f0f0f0;
    --button-hover-bg: #3a3a3a;
    --button-border: #444;
    --svg-bg: #2c2c2c;
    --svg-border: #444;
    --footer-bg: #1e1e1e;
    --footer-text: #999;
    --notification-bg: #ffffff;
    --notification-text: #000000;
    --input-border: #555;
    --shadow-light: rgba(255, 255, 255, 0.1);
    --shadow-medium: rgba(255, 255, 255, 0.2);
    --input-bg: #2a2a2a;
    --auth-bg: #2c2c2c;
    --auth-tab-bg: #3a3a3a;
    --auth-tab-active-bg: #52a8c5;
    --auth-tab-text: #f0f0f0;
    --auth-input-bg: #1e1e1e;
    --auth-input-border: #555555;
    --auth-submit-bg: #0a799eab;
    --auth-submit-hover-bg: #3a3a3a;
    --auth-description: #9ca3af;
    --modal-backdrop: rgba(0, 0, 0, 0.7);
}

.hidden {
    display: none;
}

/*MODAL*/

.modal {
    position: fixed;
    z-index: 999;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--modal-backdrop);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: var(--auth-bg);
    color: var(--auth-tab-text);
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    width: 320px;
    text-align: center;
    box-shadow: 0 0 20px var(--shadow-medium);
    animation: fadeIn 0.3s ease-in-out;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: var(--auth-description);
    cursor: pointer;
    font-weight: bold;
}

.close-modal:hover {
    color: red;
}

/*AUTH MODAL*/

.auth-toggle {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.auth-tab {
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    border: 2px solid var(--auth-tab-active-bg);
    background-color: var(--auth-tab-bg);
    color: var(--auth-tab-text);
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.auth-tab.active {
    background-color: var(--auth-tab-active-bg);
    color: white;
}

/* forma gia eisodo email & password */
#auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#auth-form input {
    padding: 0.7rem;
    border-radius: 12px;
    border: 1px solid var(--auth-input-border);
    background-color: var(--auth-input-bg);
    color: var(--auth-tab-text);
    font-size: 1rem;
}

.auth-submit {
    background-color: var(--auth-submit-bg);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 0.7rem;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
}

.auth-submit:hover {
    background-color: var(--auth-submit-hover-bg);
    color: var(--auth-tab-text);
}

.guest-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--auth-description);
    text-align: center;
    padding: 0 1rem;
}

.modal-content h2 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: var(--text-color);
}

.modal-content input[type="text"],
.modal-content input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid var(--input-border);
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 1rem;
}

/* LISTA AUTOMATWN STON SERVER */
#manage-modal .modal-content {
    max-height: 90vh;
    width: 400px;
    overflow: hidden;
    padding: 2rem;
    border-radius: 20px;
    background-color: var(--auth-bg);
    color: var(--auth-tab-text);
    box-shadow: 0 0 20px var(--shadow-medium);
    display: flex;
    flex-direction: column;
    align-items: center;
}

#manageAutomatonList {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px;
}

#manageAutomatonList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--input-border);
}

#manageAutomatonList li span {
    flex: 1;
    font-size: 1rem;
    color: var(--text-color);
    text-align: left;
}

#manageAutomatonList button {
    background-color: var(--button-bg);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: 8px;
}

#manageAutomatonList button:hover {
    background-color: var(--button-hover-bg);
    color: var(--text-color);
}

/* scrollbar gia megales listes automatwn */
#manageAutomatonList::-webkit-scrollbar {
    width: 6px;
}

#manageAutomatonList::-webkit-scrollbar-thumb {
    background-color: #999;
    border-radius: 10px;
}

#manage-modal .close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    color: var(--auth-description);
    cursor: pointer;
    font-weight: bold;
}

#server-load-modal .modal-content {
    width: 360px;
    max-height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: 0 0 20px var(--shadow-medium);
}

#serverAutomatonList {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    max-height: 300px;
    overflow-y: auto;
}

#serverAutomatonList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 4px 0;
    border-bottom: 1px solid var(--border-color);
}

#serverAutomatonList li span {
    flex: 1;
    font-size: 1rem;
    color: var(--text-color);
    word-break: break-word;
}

#serverAutomatonList button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: 6px;
}

#serverAutomatonList button:hover {
    background-color: var(--button-hover-bg);
}

#serverAutomatonList::-webkit-scrollbar {
    width: 6px;
}

#serverAutomatonList::-webkit-scrollbar-thumb {
    background-color: #aaa;
    border-radius: 10px;
}

/* BUTTONS */
button,
.auth-submit,
.load-from-server-button,
#manageAutomatonList button {
    background-color: var(--button-bg);
    color: var(--button-text);
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-loggedIn-buttons,
.modal-buttons {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

#automatonList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#automatonList li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
}

#automatonList li span {
    flex: 1;
    font-size: 1rem;
    color: var(--text-color);
}

/*MODALS FADE IN*/
.modal-content {
    animation: fadeIn 0.3s ease-in-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}