:root {
    --bg: #0a0a0c;
    --panel: #151518;
    --border: #33333d;
    --text: #e0e0e0;
    --accent: #5e35b1;
    --error: #ff5252;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-msg {
    color: var(--error);
    margin-bottom: 15px;
    font-size: 0.9em;
    text-align: center;
}

.container {
    position: relative;
    width: 100%;
    max-width: 360px;
    background: var(--panel);
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

h1 {
    margin-top: 0;
    font-size: 1.5rem;
    text-align: center;
}

label {
    display: block;
    margin: 20px 0 8px 0;
    font-size: 0.85em;
    color: #aaa;
}

input {
    width: 100%;
    padding: 12px;
    background: #050505;
    border: 1px solid var(--border);
    color: white;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-color: var(--accent);
}

button {
    margin-top: 25px;
    width: 100%;
    padding: 12px;
    background: var(--accent);
    border: none;
    color: white;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

button:hover {
    background: #4527a0;
}

p {
    text-align: center;
    margin-top: 20px;
}

a {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9em;
}

.recovery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 20px 0;
}

.word-box {
    background: #000;
    border: 1px solid var(--border);
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent);
    font-weight: bold;
}

.verify-input {
    background: #000;
    border: 1px solid var(--border);
    padding: 10px;
    text-align: center;
    border-radius: 4px;
    font-family: monospace;
    color: var(--accent);
    font-weight: bold;
}

.chat-container {
    border-radius: 15px;
    display: flex;
    width: 900px;
    height: 80vh;
    border: 1px solid var(--border);
}

.sidebar {
    width: 250px;
    background: var(--panel);
    border-right: 1px solid var(--border);
    padding: 15px;
    display: flex;
    flex-direction: column;
}

#user-list {
    flex: 1;
    overflow-y: auto;
}

.sidebar button {
    margin: 5px 0;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.chat-header {
    padding: 10px;
    font-size: 1.2rem;
    font-weight: bold;
    background: none;
}

.chat-header:not(:empty) {
    border-bottom: 1px solid var(--border);
}

.chat-header h2 {
    margin: 0px 0px 15px 5px;
    display: block;
}

#messages {
    flex: 1;
    overflow-y: auto;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
}

.user-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #333;
    border-radius: 10px;
}

.user-item:hover { background: #222; }

.msg-block {
    margin: 10px;
    padding: 8px 12px;
    border-radius: 10px;
    max-width: 70%;
    min-width: 30%;
    width: fit-content;
}

.msg-block p {
    text-align: left;
    margin: 0;
    word-wrap: break-word;
}

.me {
    background: #2b5278;
    margin-left: auto;
    text-align: right;
}

.me p {
    text-align: right;
}

.other {
    background: #333;
    margin-right: auto;
    text-align: left;
}

.other p {
    text-align: left;
}

.msg-block small {
    display: block;
    font-size: 0.7em;
    color: #aaa;
    margin-bottom: 4px;
}

.del-btn {
    cursor: pointer;
    color: #ff4d4d;
    font-weight: bold;
    margin-left: 5px;
    font-size: 1em;
}

.del-btn:hover { color: #ff8080; }

.edit-btn {
    cursor: pointer;
    color: #4da6ff;
    margin-left: 5px;
    font-size: 1em;
}

.edit-btn:hover { color: #80bfff; }

.file-link {
    display: block;
    padding: 10px;
    background: #000;
    border-radius: 5px;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

.input-area {
    display: flex;
    text-align: center;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

input:disabled, button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-container {
    width: 90%;
    margin: 50px auto;
    background: #1a1a1a;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    max-width: 800px;
    transition: max-width 0.3s ease;
}

.admin-container.small-mode {
    max-width: 500px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tabs button {
    flex: 1;
    padding: 12px;
    background: #4a2c91;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    transition: 0.2s;
}

.tabs button:hover { background: #5e39b5; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #ccc; }

.input-row { display: flex; gap: 10px; }
.input-row input, .input-row select { 
    padding: 10px; 
    background: #111; 
    border: 1px solid #444; 
    color: white;
    border-radius: 4px;
}

#email { width: 100%; padding: 10px; margin-top: 10px; background: #111; border: 1px solid #444; color: white; border-radius: 4px; }

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #4a2c91;
    border: none;
    color: white;
    margin-top: 20px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.admin-container .section {
    display: none;
}

.admin-container .section.active {
    display: block !important;
}

.btn-submit:disabled {
    background: #666 !important;
    cursor: not-allowed;
    opacity: 0.7;
}

.result-box {
    background: #252525;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #4a2c91;
    margin-top: 15px;
    word-break: break-all;
}

.copy-btn {
    margin-top: 10px;
    padding: 5px 10px;
    background: #444;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}
.copy-btn:hover { background: #555; }

.lang-container {
    display: flex;
    gap: 8px;
}

.lang-container-absolute {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 20px;
    left: 20px;
}

.lang-btn {
    padding: 5px 10px;
    background: #25252b;
    color: #888;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    border: 1px solid var(--border);
    transition: 0.2s;
}

.lang-btn:hover {
    background: #33333d;
    color: #fff;
}

.lang-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}