:root {
    --primary-color: #3a5a78;
    --primary-hover: #2c4459;
    --secondary-color: #f5f7fa;
    --text-color: #333;
    --border-radius: 4px;
    --box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --transition: all 0.2s ease;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
}

header {
    background-color: white;
    padding: 15px;
    box-shadow: var(--box-shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

h1 {
    font-size: 22px;
    margin: 0;
    color: var(--primary-color);
}

.btn {
    padding: 8px 16px;
    cursor: pointer;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn i {
    margin-right: 8px;
}

.btn:hover {
    background-color: var(--primary-hover);
}

.btn-secondary {
    background-color: #d9534f;
}

.btn-secondary:hover {
    background-color: #c9302c;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

#report-selection {
    margin-bottom: 20px;
}

select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

select:focus {
    outline: none;
    border-color: var(--primary-color);
}

#text-boxes {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex: 1;
    min-height: 0;
}

#input-area, #output-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

textarea {
    width: 100%;
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    resize: none;
    transition: var(--transition);
    box-sizing: border-box;
    min-height: 150px;
}

textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

#translate-btn {
    align-self: center;
    margin: 20px 0;
}

.loader {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    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); }
}

#processing-message {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 20px;
}

/* 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.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    position: sticky;
    top: 0;
    background-color: #fefefe;
    padding: 0 8px;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 20px;
}

.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-container {
    background-color: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}

.login-container input {
    display: block;
    margin: 10px auto;
    padding: 8px;
    width: 100%;
    max-width: 280px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.login-container input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.login-container button {
    margin-top: 20px;
    width: 100%;
    max-width: 280px;
}

@media (max-width: 768px) {
    #text-boxes {
        flex-direction: column;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    h1 {
        margin-bottom: 15px;
    }
}

#output-area {
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0;
    font-size: 14px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    box-shadow: var(--box-shadow);
}

.copy-btn i {
    margin: 0; /* Remove any margin to ensure perfect centering */
}

.copy-btn:hover {
    background-color: var(--primary-hover);
}

.copy-btn:active {
    background-color: #1e2f3d;
}

#prompt-selection {
    margin-bottom: 20px;
}

#prompt-dropdown {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

#prompt-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
}
