:root {
    --primary-color: #007bff;
    --background-color: #f4f7f9;
    --container-bg: #ffffff;
    --text-color: #333;
    --error-color: #e74c3c;
}
body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}
.container, .auth-container {
    background: var(--container-bg);
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 500px;
}
h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
}
p {
    color: #666;
    margin-bottom: 25px;
}
input[type="url"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    text-align: right;
    direction: ltr; /* To make URL and email input LTR */
}
button {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-family: 'Tajawal', sans-serif;
    transition: background-color 0.3s;
}
button:hover {
    background-color: #0056b3;
}
.language-selector { margin: 15px 0; display: flex; justify-content: center; gap: 20px; }
.result-box {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fafafa;
    text-align: right;
    white-space: pre-wrap;
    min-height: 50px;
    word-wrap: break-word;
}
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.error-message { color: var(--error-color); font-size: 14px; margin-top: 10px; min-height: 1em; }

/* Modal Styles */
.modal {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.5);
    align-items: center; justify-content: center;
}
.modal-content {
    background-color: #fefefe; margin: auto; padding: 20px; border: 1px solid #888;
    width: 90%; max-width: 400px; border-radius: 12px; text-align: center;
}
.close-btn { color: #aaa; float: left; font-size: 28px; font-weight: bold; cursor: pointer; }

/* Auth Buttons & User Info */
.auth-container button { width: auto; margin: 0 10px; padding: 10px 20px; }
.user-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 10px;}
#logout-btn { width: auto; background-color: #6c757d; font-size: 14px; padding: 8px 12px;}
#logout-btn:hover { background-color: #5a6268; }
