/* --- Global & Dark Mode Theme --- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    font-size: 16px;
}

h1 {
    color: #bb86fc;
    text-align: center;
    margin-bottom: 25px;
}

/* --- Main Translator Page (chat.html) --- */
#chat-container {
    width: 100%;
    height: 100vh;
    background-color: #121212;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#header-area {
    padding: 16px 20px;
    background-color: #1e1e1e;
    color: #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    border-bottom: 1px solid #3f3f3f; /* MODIFIED */
}
#header-area h4 { margin: 0; font-weight: 600; font-size: 1.3em; }
.header-buttons a { color: #e0e0e0; text-decoration: none; font-size: 0.9em; font-weight: 500; padding: 6px 12px; border: 1px solid #555; border-radius: 20px; transition: all 0.2s; margin-left: 10px; }
.header-buttons a:hover {
    background-color: #007acc; /* MODIFIED */
    border-color: #007acc;
    color: #fff;
}

#options-area { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 15px; padding: 15px 20px; background-color: #1e1e1e; border-bottom: 1px solid #333; flex-shrink: 0; align-items: center; }

/* NEW: Styles for the minimalist language switcher */
.language-switcher { display: flex; align-items: center; gap: 10px; flex-grow: 2; min-width: 250px; }
.language-arrow { color: #888; font-size: 1.5em; font-weight: bold; }

.option-group { flex: 1; min-width: 150px; }
.option-group input, .option-group select { width: 100%; padding: 8px 10px; border: 1px solid #444; border-radius: 4px; font-size: 0.95em; box-sizing: border-box; background-color: #2a2a2a; color: #e0e0e0; }

#status-messages { padding: 0; margin: 0; flex-shrink: 0; }
.status-message.error { background-color: #cf6679; color: #121212; font-weight: bold; }

#chatbox { flex-grow: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; }
.message-wrapper { display: flex; margin-bottom: 15px; max-width: 100%; }
.message { padding: 10px 15px; border-radius: 18px; max-width: 85%; line-height: 1.5; word-wrap: break-word; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }

.user-message {
    background-color: #007acc; /* MODIFIED */
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}
.bot-message { background-color: #333333; color: #e0e0e0; margin-right: auto; border-bottom-left-radius: 5px; transition: background-color 0.2s; }
.bot-message.editable { cursor: pointer; }
.bot-message.editable:hover { background-color: #444; }
.bot-message.editing { background-color: #444; border: 1px solid #bb86fc; color: #fff; }

#input-area { display: flex; border-top: 1px solid #333; padding: 12px 20px; background-color: #1e1e1e; flex-shrink: 0; align-items: center; }
#userInput { flex-grow: 1; padding: 12px 15px; border: 1px solid #444; border-radius: 25px; outline: none; font-size: 1em; margin-right: 10px; background-color: #2a2a2a; color: #e0e0e0; transition: border-color 0.2s; }
#userInput:focus { border-color: #007acc; /* MODIFIED */ }

#sendButton { padding: 0 22px; height: 44px; background-color: #007acc; /* MODIFIED */ color: #fff; border: none; border-radius: 25px; cursor: pointer; font-weight: 500; transition: background-color 0.2s;}
#sendButton:hover { background-color: #005c9e; /* MODIFIED */ }
#sendButton:disabled { background-color: #444; color: #888; cursor: not-allowed; }

/* --- Settings & Saved Chats Pages --- */
.container {
    max-width: 700px;
    background: #1e1e1e;
    padding: 25px 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    margin: 20px;
    border: 1px solid #333;
}

.chat-list, .prompt-list { list-style: none; padding: 0; }
.chat-item, .prompt-item { display: flex; justify-content: space-between; align-items: center; padding: 15px; border-bottom: 1px solid #333; }
.chat-item:hover { background-color: #2a2a2a; }
.chat-name, .prompt-text { font-weight: 600; font-size: 1.1em; color: #e0e0e0; margin-right: 15px; word-break: break-word; }
.chat-info { font-size: 0.9em; color: #aaa; }

.actions a, .actions button { text-decoration: none; margin-left: 10px; padding: 6px 12px; border-radius: 6px; font-weight: 500; cursor: pointer; border: 1px solid transparent; transition: background-color 0.2s; }
.load-btn { background-color: #007acc; /* MODIFIED */ color: #fff; }
.load-btn:hover { background-color: #005c9e; /* MODIFIED */ }
.delete-btn, .btn-danger { background-color: #cf6679; color: #121212; font-weight: bold; font-size: 0.9em; padding: 5px 10px;}
.delete-btn:hover, .btn-danger:hover { background-color: #b00020; }

.form-group { margin-bottom: 20px; }
.form-group label { color: #aaa; display: block; font-weight: 600; margin-bottom: 5px; }
.form-group input[type="text"] { width: 100%; padding: 10px; box-sizing: border-box; background-color: #2a2a2a; color: #e0e0e0; border: 1px solid #444; border-radius: 4px; }

.btn { padding: 10px 20px; border: none; border-radius: 6px; cursor: pointer; font-weight: 500; font-size: 1em; transition: background-color 0.2s; }
.btn-primary { background-color: #007acc; /* MODIFIED */ color: #fff; }
.btn-primary:hover { background-color: #005c9e; /* MODIFIED */ }

hr { border: 0; border-top: 1px solid #333; margin: 30px 0; }
.nav-link { color: #bb86fc; text-decoration: none; font-weight: 600; display: block; text-align: center; margin-top: 25px; }
.nav-link:hover { text-decoration: underline; }