:root { --bg: #f4f5f7; --surface: #ffffff; --text-primary: #111827; --text-secondary: #6b7280; --accent: #3b82f6; --accent-hover: #2563eb; --accent-bg: #eff6ff; --border: #e2e8f0; --radius: 12px; --radius-sm: 8px; --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05); }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body { background-color: var(--bg); color: var(--text-primary); max-width: 850px; margin: 0 auto; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; padding-bottom: 40px; }

a { color: var(--accent); text-decoration: none; transition: opacity 0.2s ease; }

a:active { opacity: 0.6; }

.fw-bold, b, strong, h1, h2, h3 { font-weight: 600; }

h1, h2, h3 { margin: 0 0 8px 0; }

.text-muted { color: var(--text-secondary); font-size: 13px; font-weight: normal; }

.top, .navbar { position: sticky; top: 0; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 14px 16px; border-bottom: 1px solid var(--border); z-index: 100; display: flex; align-items: center; gap: 8px; }

.top { font-size: 15px; flex-wrap: wrap; }

.top a { font-weight: 500; color: var(--text-secondary); }

.top a:last-of-type { color: var(--accent); }

.top .theme-title, .top .sec-title, .top .top-title { font-weight: 600; color: var(--text-primary); }

body > div:not([class]) { background: transparent !important; border: none !important; box-shadow: none !important; padding: 0 !important; margin: 0 !important; }

div[style*="text-align:center"] { background: transparent !important; border: none !important; box-shadow: none !important; padding: 16px 16px 8px 16px !important; margin: 0 !important; color: var(--text-secondary); font-size: 13px; line-height: 1.5; }

div[style*="text-align:center"] img { max-width: 235px; height: auto; margin-bottom: 12px; }

div[style*="text-align:center"] br { display: block !important; }

.lnkd { background: var(--surface) !important; margin: 6px 12px !important; padding: 10px 16px !important; border-radius: var(--radius-sm) !important; box-shadow: var(--shadow-sm) !important; border: 1px solid var(--border) !important; display: flex !important; align-items: center !important; justify-content: center !important; transition: all 0.2s ease !important; min-height: 44px; }

.lnkd:active { transform: scale(0.98) !important; background: var(--bg) !important; }

.lnkd_s { display: flex !important; align-items: center !important; gap: 8px !important; width: 100% !important; justify-content: center !important; }

.lnkd_s a { font-weight: 600 !important; font-size: 14px !important; color: var(--accent) !important; text-decoration: none !important; }

.lnkd_s img { width: 16px !important; height: 16px !important; object-fit: contain !important; }

.lnkd + div:not([class]) { margin: 12px 16px 4px 16px !important; padding: 0 !important; font-size: 13px; color: var(--text-secondary); background: transparent !important; border: none !important; box-shadow: none !important; }

.mdr[style*="border-bottom: 0px"] { background: transparent !important; border: none !important; box-shadow: none !important; margin: 16px 16px 4px 16px !important; padding: 0 !important; color: var(--text-secondary) !important; font-size: 12px !important; font-weight: 600 !important; text-transform: uppercase !important; }

div.menu[style*="border-top: 0px"] { margin: 0 12px 12px 12px !important; padding: 12px 16px !important; background: var(--surface) !important; border: 1px solid var(--border) !important; border-radius: var(--radius-sm) !important; box-shadow: var(--shadow-sm) !important; color: var(--text-primary) !important; font-size: 13px !important; font-style: italic; }

form[action="/"] .menu, form[action="index.lm"] .menu { margin: 16px 12px !important; padding: 16px !important; background: var(--surface) !important; border-radius: var(--radius-sm) !important; border: 1px solid var(--border) !important; box-shadow: var(--shadow-sm) !important; display: block !important; }

form[action="/"] .menu select, form[action="index.lm"] .menu select { margin: 8px 0 12px 0 !important; width: 100% !important; }

.btm span[style*="float:right"] { float: right !important; }

.navbar.messages-nav { position: relative; background: var(--surface); margin: 12px; padding: 6px; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); justify-content: space-between; }

.navbar.messages-nav a { flex: 1; text-align: center; padding: 10px 4px; font-size: 14px; font-weight: 600; border-radius: var(--radius-sm); color: var(--text-secondary); transition: 0.2s; }

.navbar.messages-nav a:active { background: var(--bg); color: var(--accent); }

input[type="text"], input[type="password"], input[type="email"], textarea, select, .form-control { background: var(--surface); border: 1px solid var(--border); padding: 12px 14px; border-radius: var(--radius-sm); width: 100%; font-family: inherit; font-size: 15px; color: var(--text-primary); font-weight: normal; transition: 0.2s; appearance: none; }

.form-control { margin-bottom: 12px; }

.form-select { width: auto; }

input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-bg); outline: none; }

select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; padding-right: 40px; }

.form-group { margin-bottom: 16px; }

.form-label { font-size: 13px; font-weight: normal; color: var(--text-secondary); margin-bottom: 8px; display: inline-block; }

.forum_btn, .btn { border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center; transition: 0.2s ease; }

.forum_btn { background-color: var(--accent-bg); color: var(--accent) !important; border: none; padding: 10px 16px; }

.btn { background-color: var(--surface); color: var(--text-primary); border: 1px solid var(--border); padding: 10px 16px; box-shadow: var(--shadow-sm); text-decoration: none; }

.btn-sm { padding: 6px 12px; font-size: 13px; }

.forum_btn:active, .btn:active, .btm a:active, .btm .forum_btn:active, .pagination .forum_btn:active { transform: scale(0.97); }

.btn-submit, .btn-save, .btm .btn-reply-main, .btm .btn-create, .btn-primary, form[action="/register"] input[type="submit"], form[action^="/login"] input[type="submit"] { background-color: var(--accent) !important; color: #ffffff !important; border: none !important; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3) !important; }

.btn-submit, .btn-save { width: 100%; margin-top: 8px; padding: 14px; }

.btn-danger, .post-actions .btn-delete, .msg-actions .btn-delete, .btn-delete-topic { background: #fef2f2; color: #ef4444 !important; }

.btn-danger { border-color: #fecaca; }

.btn-delete-topic { border: 1px solid #fecaca; width: 100%; }

.forum_auth, .editor-wrapper, .auth-wrapper, .rules-container, .rule-block, .profile-info, .forum_message, body > div:not([class]), form > div, div[class="menu"], .msg-item, .card { background: var(--surface); margin: 12px; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }

.forum_auth, .editor-wrapper, .auth-wrapper, .rules-container, .rule-block, .forum_message, body > div:not([class]), form > div, div[class="menu"], .msg-item, .card-body { padding: 16px; }

.forum_message, body > div:not([class]), form > div, div[class="menu"], .msg-item { margin: 0 12px 12px 12px; }

.forum_message { margin-bottom: 16px; box-shadow: var(--shadow-md); }

.card-header, .forum_splitter { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); }

.forum_splitter { padding: 24px 16px 8px 16px; }

.error-msg, .success-msg, .alert { padding: 14px 16px; margin: 12px; border-radius: var(--radius-sm); font-weight: 500; font-size: 14px; }

.error-msg, .alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.success-msg, .alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

.topic-count, .badge { background: var(--bg); color: var(--text-secondary); padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; border: 1px solid var(--border); }

.topic-count { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; }

.list-group { list-style-type: none; padding: 0; margin: 0; }

.list-group-item { padding: 12px 0; border-bottom: 1px solid var(--border); }

.list-group-item:last-child { border-bottom: none; padding-bottom: 0; }

.d-flex { display: flex; }

.flex-wrap { flex-wrap: wrap; }

.gap-2 { gap: 8px; }

.align-items-center { align-items: center; }

.m-0 { margin: 0 !important; }

.mt-2 { margin-top: 8px !important; }

.mt-3 { margin-top: 16px !important; }

.mb-0 { margin-bottom: 0 !important; }

.mb-2 { margin-bottom: 8px !important; }

.mb-3 { margin-bottom: 16px !important; }

.w-auto { width: auto !important; }

.flex-1 { flex: 1 1 0% !important; }

.btm, .footer { display: flex; flex-direction: column; gap: 10px; }
.btm { display: block !important; margin: 16px 12px 24px 12px; padding: 0 !important; background: transparent !important; border: none !important; box-shadow: none !important; color: var(--text-secondary) !important; font-size: 12px !important; }

.footer { margin: 16px 12px; }

.forum_auth { text-align: center; color: var(--text-secondary); font-size: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; }

.forum_auth a { color: var(--accent); }

.forum_auth .forum_btn { padding: 8px 16px; border-radius: 20px; }

.forum_section { background: var(--surface); padding: 16px; border-bottom: 1px solid var(--border); margin: 0 12px; position: relative; }

.forum_section:first-of-type { border-radius: var(--radius) var(--radius) 0 0; border-top: 1px solid var(--border); }

.forum_section:last-of-type { border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 12px; }

.forum_section a { font-weight: 600; font-size: 16px; color: var(--text-primary); display: inline-block; margin-bottom: 4px; }

.forum_section .mini { color: var(--text-secondary); font-size: 13px; display: block; margin-top: 2px; padding-right: 40px; }

.forum_section .topic-count { position: absolute; right: 16px; top: 16px; }

.section-container, .topics-container { margin: 12px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow: hidden; }

.forum_topic { display: flex; flex-direction: column; padding: 14px 16px; border-bottom: 1px solid var(--border); gap: 6px; background: var(--surface); }

.forum_topic:last-child { border-bottom: none; }

.topic-meta { font-size: 13px; color: var(--text-secondary); display: block; }

.topic-meta .topic-date { margin-left: 4px; }

.topic-author { color: var(--text-primary); }

.topic-title-wrap { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

.topic-link { font-size: 15px; color: var(--accent); font-weight: normal !important; line-height: 1.4; flex: 1; }

.theme-controls { display: flex; align-items: center; justify-content: space-between; padding: 16px 12px; }

.theme-controls a { font-size: 13px; font-weight: 600; color: var(--text-secondary); background: var(--surface); padding: 8px 14px; border-radius: 20px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

.post-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }

.post-author a { font-weight: 600; color: var(--text-primary) !important; font-size: 15px; }

.post-time { color: var(--text-secondary); font-size: 12px; font-weight: 500; }

.post-body { font-size: 15px; line-height: 1.6; color: #374151; margin-bottom: 16px; word-break: break-word; }

.post-actions, .msg-actions { display: flex; gap: 8px; border-top: 1px solid var(--bg); padding-top: 14px; margin-top: 12px; flex-wrap: wrap; }

.post-actions .forum_btn, .post-actions .adm_btn, .msg-actions .forum_btn { padding: 8px 16px; font-size: 13px; border-radius: 20px; background: var(--bg); color: var(--text-secondary) !important; font-weight: 600; border: none; text-decoration: none; }

.post-actions .btn-reply, .msg-actions .btn-reply { color: var(--accent) !important; background: var(--accent-bg); }

.captcha-block { background: var(--bg); padding: 16px; border-radius: var(--radius-sm); margin: 12px 0; border: 1px dashed var(--border); display: flex; flex-direction: column; align-items: center; gap: 12px; }

.captcha-img { border-radius: 6px; }

.captcha-input { text-align: center; font-weight: bold; letter-spacing: 2px; font-size: 16px !important; }

.profile-stat { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }

.profile-stat:last-of-type { border-bottom: none; }

.profile-about { padding: 14px 16px; font-size: 14px; border-top: 1px solid var(--border); }

.stat-val { font-weight: 600; color: var(--text-primary); }

.profile-actions { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.profile-actions a { display: block; text-align: center; padding: 14px; background: var(--bg); border-radius: var(--radius-sm); font-weight: 600; color: var(--accent); }

.status-badge { padding: 4px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

.st-legend { background: #fee2e2 !important; color: #dc2626 !important; }

.st-old { background: #dcfce7 !important; color: #16a34a !important; }

.st-exp { background: #dbeafe !important; color: #2563eb !important; }

.st-bad { background: #f3f4f6 !important; color: #4b5563 !important; }

.st-new { background: #fef9c3 !important; color: #ca8a04 !important; }
.st-pro { background: linear-gradient(135deg, #fef3c7, #fde68a) !important; color: #92400e !important; }
.nick-pro { color: #b45309 !important; font-weight: 700; }

.visit-mod { font-weight: 700; color: #eab308 !important; background: #fef9c3; padding: 2px 8px; border-radius: 12px; font-size: 12px; }

.visit-hidden { font-weight: 600; color: #9ca3af !important; }

.visit-date { font-weight: 600; color: var(--accent) !important; }

.visit-time { color: var(--text-secondary); font-size: 12px; }

.rule-title { font-size: 16px; color: var(--accent); display: block; margin-bottom: 8px; }

.rule-text, .rule-list { font-size: 14px; color: var(--text-primary); line-height: 1.6; }

.share-block { background: var(--surface); padding: 12px; border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); border: 1px solid var(--border); display: flex; align-items: center; gap: 10px; }

.share-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; margin: 0; }

.share-input { flex: 1; margin: 0; background: var(--bg); padding: 10px 12px; }

.pagination { padding: 16px 0; display: flex; justify-content: center; }

.pagination .forum_btn { background: var(--surface) !important; color: var(--text-primary) !important; border: 1px solid var(--border) !important; border-radius: 24px !important; padding: 10px 24px !important; font-weight: 500 !important; box-shadow: var(--shadow-sm) !important; transition: all 0.2s ease !important; }

.pagination .forum_btn:active { background: var(--bg) !important; }

body > div:not([class]), div[class="menu"] { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

body > div:not([class]) a, div[class="menu"] a { color: var(--accent); font-weight: 600; }

form > div { display: block; font-size: 14px; font-weight: normal; }

.admin-actions { text-align: center; margin: 16px 12px; }

.first-post-preview { background: var(--surface); padding: 16px; margin: 12px 12px 0 12px; border-radius: var(--radius); border-left: 4px solid var(--accent); box-shadow: var(--shadow-sm); color: var(--text-secondary); font-size: 14px; }

.auth-prompt { background: var(--accent-bg); color: var(--accent); margin: 16px; padding: 16px; border-radius: var(--radius-sm); font-weight: 500; text-align: center; }

.auth-prompt a { color: var(--accent-hover); font-weight: 700; text-decoration: none; }

.empty-state a { color: var(--accent); font-weight: 600; text-decoration: none; }

.empty-state svg { opacity: 0.6; margin-bottom: 12px; width: 48px; height: 48px; }

details.spoiler-create { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }

details.spoiler-create summary { padding: 14px 16px; font-weight: 600; cursor: pointer; background: var(--bg); color: var(--text-primary); border-bottom: 1px solid transparent; user-select: none; outline: none; display: flex; align-items: center; justify-content: space-between; }

details.spoiler-create summary::-webkit-details-marker { display: none; }

details.spoiler-create[open] summary { border-bottom-color: var(--border); }

.spoiler-content { padding: 16px; }

form > div[class="menu"] { display: block !important; }

form[action="index.lm"] > div[class="menu"] { display: flex !important; align-items: center; gap: 12px; }

form > div[class="menu"] label { display: inline-block; margin-bottom: 8px; font-weight: normal; color: var(--text-primary); }

form > div[class="menu"] input[type="text"], form > div[class="menu"] input[type="password"], form > div[class="menu"] input[type="email"], form > div[class="menu"] textarea { margin-bottom: 16px; display: block; width: 100%; }

form > div[class="menu"] input[type="submit"] { width: 100%; margin-top: 4px; }

.forum_section br, .btm br, form > div[class="menu"] br, form[action="/register"] br, form[action^="/login"] br { display: none !important; }

.btm a, .btm .forum_btn { width: 100%; display: block; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--accent); font-weight: 600; font-size: 14px; text-align: center; transition: 0.2s ease; }

.msg-header { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--bg); }

.msg-label { font-size: 13px; color: var(--text-secondary); }

.msg-recipient { font-size: 14px !important; font-weight: 600; }

.msg-recipient a { color: var(--text-primary) !important; }

.msg-date { margin-left: auto; font-size: 12px; color: var(--text-secondary); }

.msg-status { font-size: 12px; font-weight: 600; width: 100%; margin-top: 4px; }

form[action="/register"] > div[style], form[action^="/login"] > div { background: var(--surface) !important; margin: 12px !important; padding: 24px 20px !important; border-radius: var(--radius) !important; box-shadow: var(--shadow-sm) !important; border: 1px solid var(--border) !important; display: block !important; font-size: 14px; font-weight: normal; color: var(--text-primary); }

form[action="/register"] input:not([type="submit"]), form[action^="/login"] input:not([type="submit"]) { margin-top: 8px; margin-bottom: 20px; display: block; width: 100%; box-sizing: border-box; }

form[action="/register"] img { display: block; margin: 12px auto 20px auto; border-radius: var(--radius-sm); border: 1px dashed var(--border); padding: 16px; background: var(--bg); }

form[action="/register"] input[type="submit"], form[action^="/login"] input[type="submit"] { padding: 14px !important; border-radius: var(--radius-sm) !important; font-weight: 600 !important; font-size: 15px !important; width: 100% !important; margin-top: 8px !important; }

form[action^="/login"] .mini { display: block; margin-top: -12px; margin-bottom: 20px; color: var(--text-secondary); font-weight: 500; font-size: 13px; }

.auth-wrapper { padding: 24px 20px !important; }

.auth-form .form-label { font-size: 14px; color: var(--text-primary); font-weight: normal; }

.auth-form .form-hint { background: var(--bg); padding: 12px 16px; border-radius: var(--radius-sm); border-left: 3px solid var(--accent); margin: 16px 0; font-weight: normal; color: var(--text-primary); font-size: 13px; line-height: 1.5; }

.auth-form .captcha-block { background: #fafafa; padding: 20px; border-radius: var(--radius-sm); margin: 20px 0; border: 1px dashed var(--border); display: flex; flex-direction: column; align-items: center; gap: 16px; }

.auth-form .captcha-img { mix-blend-mode: darken; }

.auth-form .captcha-input { max-width: 150px; margin: 0 auto; }

div[class="menu"] .mini { display: block; padding: 6px 0; }

div[class="menu"] > div { margin-bottom: 10px; }

div[class="menu"] > div:last-child { margin-bottom: 0; }

div[class="menu"] .touchlink { display: inline-block; margin-right: 16px; }

.breadcrumb-fm { display: flex; align-items: center; gap: 5px; background: #f8f9fa; padding: 12px 15px; border-radius: 8px; flex-wrap: wrap; box-shadow: 0 1px 3px rgba(0,0,0,0.03); border: 1px solid #e9ecef; }

.breadcrumb-fm a { text-decoration: none; color: #0d6efd; font-weight: 500; }

.breadcrumb-fm span { color: #6c757d; }

.fm-toast { background: #333; color: #fff; padding: 12px 20px; border-radius: 6px; margin-top: 10px; opacity: 0; transition: opacity 0.3s; font-weight: 500; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.fm-toast.show { opacity: 1; }

.fm-toast.error { background: #dc3545; }

.fm-toast.success { background: #198754; }

.red {color: red;}

.fm-btn { padding: 8px 16px; border-radius: 6px; font-weight: 600; cursor: pointer; border: 1px solid transparent; transition: 0.2s; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }

.fm-btn-primary { background: #3b82f6; color: #fff; }

.fm-btn-primary:hover { background: #2563eb; }

.fm-btn-light { background: #f3f4f6; border-color: #e5e7eb; color: #374151; }

.fm-btn-light:hover { background: #e5e7eb; }

.upload-btn-wrapper { position: relative; overflow: hidden; display: inline-block; }

.upload-btn-wrapper input[type=file] { font-size: 100px; position: absolute; left: 0; top: 0; opacity: 0; cursor: pointer; }

.fm-list-group { list-style: none; padding: 0; margin: 0; border: 1px solid #e9ecef; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.02); }

.fm-list-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; min-height: 46px; border-bottom: 1px solid #f3f4f6; transition: background-color 0.15s ease-in-out; }

.fm-list-item:last-child { border-bottom: none; }

.fm-list-item:hover { background-color: #f9fafb; }

.fm-list-item.selected { background-color: #eff6ff; }

.fm-item-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }

.fm-item-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.fm-checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: #3b82f6; margin: 0; border: 1px solid #d1d5db; border-radius: 4px; flex-shrink: 0; }

.fm-file-name { text-decoration: none; color: #3b82f6; font-weight: 500; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }

.fm-file-name:hover { text-decoration: underline; }

@media (hover: hover) {
    .fm-file-name { flex: 0 0 var(--fm-name-w, auto); }
}

.fm-file-size { color: #9ca3af; font-size: 12px; white-space: nowrap; flex-shrink: 0; }

.fm-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: #fff; border: 1px solid #e5e7eb; border-radius: 6px; color: #4b5563; text-decoration: none; transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

.fm-btn-icon:hover { background: #f3f4f6; color: #111827; border-color: #d1d5db; }

.fm-quick-actions { display: none; align-items: center; gap: 4px; flex-shrink: 0; }

.fm-list-item:hover .fm-quick-actions { display: inline-flex; }

.fm-quick-btn { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; padding: 0; border-radius: 6px; color: #6b7280; text-decoration: none; transition: background-color 0.15s, color 0.15s; }

.fm-quick-btn:hover { background: #e5e7eb; color: #111827; }

.fm-quick-btn-danger { color: #dc2626; }

.fm-quick-btn-danger:hover { background: #fee2e2; color: #b91c1c; }

@media (hover: none), (max-width: 600px) {
    .fm-quick-actions { gap: 8px; }
    .fm-file-name { flex: 1; min-width: 0; }
    .fm-file-size { display: none; }
}

.bottom-action-bar { position: fixed; bottom: -100px; left: 0; width: 100%; background: #fff; padding: 16px; box-shadow: 0 -4px 15px rgba(0,0,0,0.05); z-index: 1000; display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1); border-top: 1px solid #e5e7eb; }

.bottom-action-bar.show { bottom: 0; }

.bb_b { font-weight: bold; }

.bb_i { font-style: italic; }

.bb_u { text-decoration: underline; }

.bb_s { text-decoration: line-through; }

.bb_url { color: #0066cc; text-decoration: none; word-wrap: break-word; }

.bb_url:hover { text-decoration: underline; }

.bb_abbr { border-bottom: 1px dotted #666; cursor: help; text-decoration: none; }

.bb_img { max-width: 100%; max-height: 500px; object-fit: contain; display: inline-block; vertical-align: middle; border-radius: 4px; background-color: #f5f5f5; }

.bb_pre { background-color: #1e1e1e; color: #d4d4d4; padding: 12px; border-radius: 6px; max-width: 100%; max-height: 400px; overflow: auto; margin: 10px 0; box-shadow: inset 0 0 5px rgba(0,0,0,0.2); }

.bb_code { font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; font-size: 13px; white-space: pre; }

.bb_quote { background-color: #f9f9f9; border-left: 4px solid #ccc; padding: 10px 15px; margin: 10px 0; font-style: italic; max-height: 300px; overflow-y: auto; }

.bb_spoiler { margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; padding: 5px; }

.bb_summary { cursor: pointer; font-weight: bold; padding: 5px; user-select: none; }

.bb_spoiler_body { padding: 10px; border-top: 1px dashed #ddd; margin-top: 5px; }

.bb_img_wrapper { display: inline-block; vertical-align: middle; max-width: 100%; }

.bb_img_proxy_fail { display: inline-block; margin: 10px 0; max-width: 100%; }

.bb_img_proxy_fail .bb_spoiler { border: 1px solid #ffc107; background-color: #fff9e6; }

.bb_img_proxy_fail .bb_summary { font-size: 13px; }

svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.textarea-minimal { width: 100%; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px; font-family: inherit; resize: vertical; box-sizing: border-box; outline: none; }

.textarea-minimal:focus { border-color: #3b82f6; }

.btn-secondary { background: #94a3b8; }

.btn-secondary:hover { background: #64748b; }

input[type="checkbox"] { vertical-align: middle; }

.footer-controls{display:flex;align-items:center;justify-content:center;gap:12px;margin:16px 12px;}

.theme-form{margin:0!important;padding:0!important;background:transparent!important;box-shadow:none!important;border:none!important;display:block!important;}

.theme-form select{padding:8px 36px 8px 14px;border-radius:24px;border:1px solid var(--border,#e2e8f0);background-color:var(--surface,#fff);color:var(--text-primary,#111827);font-size:13px;cursor:pointer;outline:none;appearance:none;box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,0.05));font-weight:500;}

.theme-toggle:active{transform:scale(0.92);}

.theme-toggle svg{width:20px;height:20px;fill:currentColor;stroke:none;}

html.dark-mode-active .sun-icon{display:block;}

html.dark-mode-active .moon-icon{display:none;}
.theme-toggle { background: transparent; border: none; border-radius: 50%; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: inherit; box-shadow: var(--shadow-sm,0 1px 2px rgba(0,0,0,0.05)); transition: 0.2s ease; padding: 8px; }

.sun-icon, 
.moon-icon {
    width: 24px;
    height: 24px;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}
.sun-icon { display: none; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 18C8.68629 18 6 15.3137 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 15.3137 15.3137 18 12 18ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16ZM11 1H13V4H11V1ZM11 20H13V23H11V20ZM3.51472 4.92893L4.92893 3.51472L7.05025 5.63604L5.63604 7.05025L3.51472 4.92893ZM16.9497 18.364L18.364 16.9497L20.4853 19.0711L19.0711 20.4853L16.9497 18.364ZM19.0711 3.51472L20.4853 4.92893L18.364 7.05025L16.9497 5.63604L19.0711 3.51472ZM5.63604 16.9497L7.05025 18.364L4.92893 20.4853L3.51472 19.0711L5.63604 16.9497ZM23 11V13H20V11H23ZM4 11V13H1V11H4Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 18C8.68629 18 6 15.3137 6 12C6 8.68629 8.68629 6 12 6C15.3137 6 18 8.68629 18 12C18 15.3137 15.3137 18 12 18ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16ZM11 1H13V4H11V1ZM11 20H13V23H11V20ZM3.51472 4.92893L4.92893 3.51472L7.05025 5.63604L5.63604 7.05025L3.51472 4.92893ZM16.9497 18.364L18.364 16.9497L20.4853 19.0711L19.0711 20.4853L16.9497 18.364ZM19.0711 3.51472L20.4853 4.92893L18.364 7.05025L16.9497 5.63604L19.0711 3.51472ZM5.63604 16.9497L7.05025 18.364L4.92893 20.4853L3.51472 19.0711L5.63604 16.9497ZM23 11V13H20V11H23ZM4 11V13H1V11H4Z'/%3E%3C/svg%3E"); }
.moon-icon { display: block; -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 7C10 10.866 13.134 14 17 14C18.9584 14 20.7302 13.2005 22 11.9056C21.2655 17.5855 16.4259 22 10.5 22C4.70101 22 0 17.299 0 11.5C0 5.5741 4.41446 0.734533 10.0944 0C8.79947 1.26982 8 3.04163 8 5C8 5.68114 8.09346 6.34032 8.26732 6.96696C8.80556 6.35338 9.38722 5.79251 10 5.29363V7Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 7C10 10.866 13.134 14 17 14C18.9584 14 20.7302 13.2005 22 11.9056C21.2655 17.5855 16.4259 22 10.5 22C4.70101 22 0 17.299 0 11.5C0 5.5741 4.41446 0.734533 10.0944 0C8.79947 1.26982 8 3.04163 8 5C8 5.68114 8.09346 6.34032 8.26732 6.96696C8.80556 6.35338 9.38722 5.79251 10 5.29363V7Z'/%3E%3C/svg%3E"); }

html[data-theme="_dark_modern"] .sun-icon {
    display: block;
}

html[data-theme="_dark_modern"] .moon-icon {
    display: none;
}

.btm-table {
    display: table !important;
    width: 100%;
}

.btm-table a {
    display: inline;
    border: 0;
    padding: 0;
    background: transparent;
}

.btm-cell {
    display: table-cell;
    vertical-align: middle;
    width: 33.33%;
}

.btm-left {
    text-align: left;
}

.btm-center {
    text-align: center;
    white-space: nowrap;
}

.btm-right {
    text-align: right;
    white-space: nowrap;
}

.btm-link {
    display: inline;
    border: 0;
    padding: 0;
    background: transparent;
}
.messages-container { max-width: 800px; margin: 0 auto 20px auto; background: var(--surface); padding: 10px; border-radius: 16px; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05); border: 1px solid var(--border); display: flex; flex-direction: column; height: 75dvh; min-height: 500px; max-height: 850px; overflow: hidden; position: relative; }

.msg-list, .dialogs-list { background: var(--bg); flex: 1 1 auto; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: var(--bg) transparent; }
.msg-list { display: flex; flex-direction: column; gap: 12px; background: var(--surface); padding: 16px; }

.dialogs-list { padding: 0; }

.msg-list::-webkit-scrollbar, .dialogs-list::-webkit-scrollbar { width: 6px; }

.msg-list::-webkit-scrollbar-thumb, .dialogs-list::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.nav-links { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #e2e8f0; margin-bottom: 10px; font-size: 1rem; flex: 0 0 auto; align-items: center; background: var(--surface); color: var(--text-primary); font-weight: 600; position: sticky; top: 0; z-index: 10; }

.btn-back { display: flex; align-items: center; gap: 6px; color: #3b82f6; text-decoration: none; font-weight: 500; }

.btn-back svg { stroke: currentColor; width: 20px; height: 20px; }

.btn-back:hover { color: #2563eb; }

.chat-title-link { flex: 1; text-decoration: none; display: flex; align-items: center; justify-content: center; transform: translateX(-20px); gap: 10px; }

.chat-title-info { display: flex; flex-direction: column; align-items: flex-start; color: var(--text-primary); }

.chat-title-name { color: var(--text-primary); font-size: 1rem; font-weight: 600; line-height: 1.2; }

.chat-title-bot { color: #8b5cf6; font-size: 0.75rem; font-weight: 500; text-transform: lowercase; }

.chat-title-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e2e8f0; display: flex; align-items: center; justify-content: center; color: #94a3b8; }

.chat-title-avatar svg { width: 20px; height: 20px; }

.bot-tag { background: rgba(139,92,246,0.1); color: #8b5cf6; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle; display: inline-block; line-height: 1; }

.msg-form { flex: 0 0 auto; padding: 12px 16px; background: var(--surface); border-top: 1px solid #e2e8f0; position: sticky; bottom: 0; z-index: 10; }
.msg-item { padding: 8px 14px; border-radius: 14px; position: relative; max-width: 80%; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.msg-mine { background: var(--bg); border: 1px solid #bfdbfe; align-self: flex-end; width: 85%; border-bottom-right-radius: 4px; }
.msg-theirs { background: var(--surface); border: 1px solid #e2e8f0; align-self: flex-start; width: 85%; border-bottom-left-radius: 4px; }
.msg-body { font-size: 0.95rem; line-height: 1.45; color: var(--text-primary); word-break: break-word; word-wrap: break-word; background: transparent !important; }
.msg-footer { display: flex; justify-content: flex-end; align-items: center; gap: 6px; margin-top: 4px; font-size: 0.75rem; color: #64748b; background: transparent !important; }

.msg-actions { display: flex; gap: 4px; margin-left: auto; }
.btn-icon { background: none; border: none; padding: 0; cursor: pointer; color: #94a3b8; display: inline-flex; align-items: center; transition: 0.2s; }
.btn-icon:hover { color: #3b82f6; }
.btn-icon .icon-del:hover { color: #ef4444; stroke: #ef4444; }
.icon-status { width: 14px; height: 14px; }
.icon-read { color: #3b82f6; }
.icon-unread { color: #94a3b8; }
.dialog-item { display: flex; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid #f1f5f9; text-decoration: none; color: inherit; align-items: center; gap: 14px; transition: background 0.2s; }
.dialog-item:hover { background: var(--surface); }

.dialog-avatar { width: 48px; height: 48px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #94a3b8; }

.dialog-avatar svg { width: 24px; height: 24px; stroke-width: 1.5; }

.dialog-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

.dialog-top { display: flex; justify-content: space-between; align-items: center; }
.dialog-login { font-weight: 600; color: var(--text-primary); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; }

.dialog-time { font-size: 0.8rem; color: #94a3b8; white-space: nowrap; }

.dialog-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dialog-preview { color: #64748b; font-size: 0.9rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.badge-unread { background: #3b82f6; color: #fff; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; margin-left: 5px; flex-shrink: 0; }
.empty-state { text-align: center; color: #94a3b8; padding: 40px 20px; font-size: 0.95rem; background: transparent; border: 2px dashed var(--border); border-radius: var(--radius-sm); margin: 16px 0; flex: 1; display: flex; align-items: center; justify-content: center; }

.chat-input-wrapper { border: 1px solid #cbd5e1; border-radius: 20px; background: var(--surface); display: flex; flex-direction: column; transition: all 0.2s; }

.chat-input-wrapper:focus-within { background: var(--surface); border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

.chat-input-row { background: var(--bg); display: flex; align-items: flex-end; padding: 6px 8px 8px 14px; gap: 10px; }

.chat-textarea { flex: 1; border: none; outline: none; resize: none; background: transparent; padding: 6px 0; font-size: 0.95rem; line-height: 1.4; max-height: 150px; min-height: 24px; overflow-y: auto; color: var(--text-primary); font-family: inherit; }

.editing-textarea { border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px; width: 100%; box-sizing: border-box; }

.editing-textarea:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1); }

.btn-send { background: #3b82f6; color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.2s; flex-shrink: 0; padding: 0; }

.btn-send:hover { background: #2563eb; transform: scale(1.05); }

.btn-send:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; }

.btn-send svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; transform: translateX(-1px) translateY(1px); }
.btn-minimal { background: #3b82f6; color: #fff; border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer; font-size: 0.9rem; transition: background 0.2s; }
.btn-minimal:hover { background: #2563eb; }

.msg-attachment-img { max-width: 100%; max-height: 250px; border-radius: 8px; margin-top: 8px; display: block; object-fit: contain; }

.msg-attachment-file { display: inline-flex; align-items: center; padding: 8px 12px; background: rgba(0,0,0,0.05); border-radius: 8px; margin-top: 8px; text-decoration: none; color: inherit; font-size: 0.9rem; font-weight: 500; transition: background 0.2s; }

.msg-attachment-file:hover { background: rgba(0,0,0,0.1); }

.msg-attachment-file svg { fill: none; stroke: currentColor; stroke-width: 2; margin-right: 6px; }

.msg-deleted-file { margin-top: 8px; font-size: 0.85rem; color: #ef4444; font-style: italic; }
.navbar { font-weight: bold; background: var(--surface); color: var(--text-primary); border-bottom: 1px solid var(--border); padding: 15px; }
.card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 15px; box-shadow: var(--shadow-sm); }
.card-header { padding: 12px 15px; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text-primary); border-radius: var(--radius) var(--radius) 0 0; font-weight: bold; }

.card-body { padding: 15px; color: var(--text-primary); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 15px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 15px; margin-bottom: 15px; }

.stat-box { background: var(--surface); border: 1px solid var(--border); padding: 15px; border-radius: var(--radius); text-align: center; }

.stat-title { font-size: 0.9em; color: var(--text-secondary); margin-bottom: 5px; }

.stat-val.success { color: #10b981; }

.stat-val.warn { color: var(--accent); }

.table-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }

th { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-secondary); background: var(--bg); position: sticky; top: 0; }

tr:hover td { background: var(--bg); }

.badge { border-radius: var(--radius-sm); padding: 3px 8px; font-size: 0.85em; }

.badge-success { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.badge-secondary { background: var(--border); color: var(--text-primary); }

.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--accent-hover); }

code { background: var(--bg); color: #ec4899; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--border); word-break: break-all; }

details.acc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 15px; box-shadow: var(--shadow-sm); }

details.acc > summary { cursor: pointer; list-style: none; padding: 12px 15px; font-weight: bold; color: var(--text-primary); background: var(--surface); border-radius: var(--radius); user-select: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; }

details.acc > summary::-webkit-details-marker { display: none; }

details.acc > summary .acc-caret { color: var(--text-secondary); transition: transform .15s; flex-shrink: 0; }

details.acc[open] > summary { border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }

details.acc[open] > summary .acc-caret { transform: rotate(180deg); }
.fm-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #e9ecef; box-shadow: 0 1px 3px rgba(0,0,0,0.02); align-items: center; }

.fm-toolbar .fm-btn { display: inline-flex; align-items: center; gap: 6px; }

.fm-modal { z-index: 9999; display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); justify-content: center; align-items: center; }

.fm-modal.show { display: flex; }

.fm-modal-content { background: var(--surface) !important; padding: 20px; border-radius: 8px; width: 450px; max-width: 90%; box-shadow: 0 4px 15px rgba(0,0,0,0.2); font-family: sans-serif; }

.fm-tabs { display: flex; border-bottom: 1px solid #e5e7eb; margin-bottom: 15px; }

.fm-tab { flex: 1; padding: 10px; background: none; border: none; cursor: pointer; color: #4b5563; border-bottom: 2px solid transparent; text-align: center; font-size: 14px; }

.fm-tab.active { border-bottom: 2px solid #3b82f6; color: #3b82f6; font-weight: bold; }

.fm-tab-content { display: none; }

.fm-tab-content.active { display: block; }

.drop-area { border: 2px dashed #d1d5db; border-radius: 8px; padding: 40px 20px; text-align: center; color: #6b7280; transition: all 0.2s; cursor: pointer; font-size: 14px; }

.drop-area.dragover { background: #eff6ff; border-color: #3b82f6; color: #1d4ed8; }

.fm-input-url { width: 100%; padding: 10px; margin-bottom: 15px; border: 1px solid #d1d5db; border-radius: 4px; box-sizing: border-box; font-size: 14px; outline: none; }

.fm-input-url:focus { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }

#fm-main-container { transition: opacity 0.2s; }

.fm-svg-btn { background: transparent; border: none; color: #888888; padding: 4px; cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s ease; width: 28px; height: 28px; box-sizing: border-box; font-size: 16px; line-height: 1; flex-shrink: 0; }

.fm-svg-btn:hover { background: rgba(127, 127, 127, 0.2); color: inherit; }

.fm-modal-content .fm-btn[data-fm-action="close-modal"] { min-width: 32px; min-height: 32px; line-height: 1; font-size: 16px; }

.fm-editor-tabs { display: flex; background: #1e1e1e; border-bottom: 1px solid #333; }

.fm-editor-tab { padding: 8px 15px; background: #2d2d2d; color: #9cdcfe; cursor: pointer; border-right: 1px solid #1e1e1e; display: flex; align-items: center; gap: 8px; font-size: 13px; white-space: nowrap; user-select: none; }

.fm-editor-tab.active { background: #1e1e1e; color: #fff; border-top: 2px solid #3b82f6; }

.fm-editor-tab:hover:not(.active) { background: #333; }

.fm-tab-close { cursor: pointer; color: #888; border-radius: 50%; width: 16px; height: 16px; text-align: center; line-height: 16px; font-size: 12px; }

.fm-tab-close:hover { background: #444; color: #fff; }

.fm-ide-layout { display: flex; height: calc(100vh - 140px); min-height: 400px; border: 1px solid #333; border-radius: 8px; overflow: hidden; background: #1e1e1e; position: relative; }

.fm-ide-sidebar { width: 250px; border-right: 1px solid #333; display: flex; flex-direction: column; background: #181818; flex-shrink: 0; overflow: hidden; }

.fm-sidebar-backdrop { display: none; }

.fm-mobile-close { display: none !important; }

@media (min-width: 769px) { .fm-ide-sidebar { display: none; } .fm-ide-sidebar.show { display: flex; } }

.fm-resizer { width: 4px; cursor: col-resize; background: #181818; flex-shrink: 0; z-index: 10; transition: background 0.2s; display: none; }

.fm-resizer:hover, .fm-resizer.resizing { background: #3b82f6; }
@media (max-width: 768px) { .messages-container { height: calc(100dvh - 120px); min-height: auto; max-height: none; max-width: 100%; border-radius: 0; border-left: none; border-right: none; margin-bottom: 0; box-shadow: none; }; .grid-2 { grid-template-columns: 1fr; }; .fm-ide-sidebar { position: absolute; left: 0; top: 0; bottom: 0; z-index: 100; box-shadow: 2px 0 10px rgba(0,0,0,0.5); transform: translateX(-100%); transition: transform 0.25s ease; } .fm-ide-sidebar.show { transform: translateX(0); } .fm-sidebar-backdrop.show { display: block; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 99; backdrop-filter: blur(2px); } .fm-mobile-close { display: inline-flex !important; }; .fm-ide-layout { position: relative; } .fm-resizer { display: none !important; }; }

.fm-ide-sidebar-header { padding: 10px; color: #ccc; border-bottom: 1px solid #333; display: flex; justify-content: space-between; align-items: center; }

.fm-ide-tree { flex: 1; overflow-y: auto; overflow-x: auto; padding: 5px 0; }

.fm-tree-node { display: block; }

.fm-tree-item { padding: 4px 10px; color: #ccc; font-size: 13px; cursor: pointer; display: flex; align-items: center; user-select: none; white-space: nowrap; }

.fm-tree-item:hover { background: #2a2d2e; }

.fm-tree-item.active { background: #37373d; color: #fff; }

.fm-tree-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 6px; }

.fm-tree-icon svg { display: block; }
.fm-file-icon { font-size: 1.1em; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; margin-right: 6px; }

.fm-file-icon svg { display: block; }

.dir-icon svg { transition: transform 0.2s; }

.dir-node .fm-tree-children { display: none; }

.dir-node.open > .fm-tree-children { display: block; }

.dir-node.open > .fm-tree-item .dir-icon svg { transform: rotate(90deg); }

.dir-node.open > .fm-tree-item .dir-folder-closed { display: none !important; }

.dir-node.open > .fm-tree-item .dir-folder-open { display: inline-flex !important; }

.fm-ide-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.fm-editor-wrapper { flex: 1; position: relative; display: flex; flex-direction: column; }

.fm-ide-layout .CodeMirror { position: absolute !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; height: 100% !important; width: 100% !important; font-family: 'Courier New', Courier, monospace !important; font-size: 14px !important; z-index: 1 !important; text-align: left !important; line-height: 1.5 !important; }

.fm-ide-layout .CodeMirror-scroll { overflow-y: auto !important; overflow-x: auto !important; height: 100% !important; }

#editor { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; padding: 15px; font-family: 'Courier New', Courier, monospace; font-size: 14px; resize: none; box-sizing: border-box; background: #1e1e1e; color: #d4d4d4; outline: none; line-height: 1.5; }

#editor.fm-plain-editor { display: block !important; z-index: 1; tab-size: 4; }

.fm-ide-layout.fullscreen { position: fixed !important; top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: 100vw !important; height: 100vh !important; z-index: 9999 !important; border-radius: 0 !important; border: none !important; }
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 99999 !important; }

.fm-ide-layout ::-webkit-scrollbar, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar { width: 5px; height: 5px; }

.fm-ide-layout ::-webkit-scrollbar-track, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar-track, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar-track { background: transparent; }

.fm-ide-layout ::-webkit-scrollbar-thumb, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar-thumb, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }

.fm-ide-layout ::-webkit-scrollbar-thumb:hover, .fm-ide-layout .CodeMirror-vscrollbar::-webkit-scrollbar-thumb:hover, .fm-ide-layout .CodeMirror-hscrollbar::-webkit-scrollbar-thumb:hover { background: #666; }

@media (max-width: 480px) { .hide-mobile { display: none; } .fm-toolbar .fm-btn { padding: 6px 10px; } }

.fdns-zone-list { max-height: 240px; overflow-y: auto; -webkit-overflow-scrolling: touch; }

.fdns-zone-opt { padding: 7px 10px; cursor: pointer; border-bottom: 1px solid var(--border); font-size: 15px; -webkit-tap-highlight-color: transparent; }

.fdns-zone-opt:last-child { border-bottom: none; }

.fdns-zone-opt.fdns-zone-sel { background: var(--accent-bg); color: var(--text-primary); font-weight: bold; }

.fdns-zone-opt:hover { background: var(--accent-bg); }

.tls-badge { display:inline-block; padding:2px 8px; border-radius:10px; font-size:12px; font-weight:600; white-space:nowrap; }

.tls-ok { background:#e6f6e6; color:#1a7a1a; border:1px solid #bcdcbc; }

.tls-pending { background:#fff4d6; color:#8a6d00; border:1px solid #e6d48a; }

.tls-failed { background:#fbe6e6; color:#a01414; border:1px solid #e6b8b8; }

.tls-none { background:var(--accent-bg); color:var(--text-secondary); border:1px solid var(--border); }

.fdns-zone-sel { font-size:15px; }

.fdns-zone-sel[data-empty] { opacity:.55; font-style:italic; }

@media (max-width: 640px) { .fdns-zone-opt { padding: 10px 12px; font-size: 16px; } .fdns-zone-list { max-height: 200px; } }

.bb-panel { display: flex; gap: 2px; padding: 6px 8px; background: var(--bg); border-bottom: 1px solid #e2e8f0; overflow-x: auto; scrollbar-width: none; border-top-left-radius: 12px; border-top-right-radius: 12px; }

.bb-panel::-webkit-scrollbar { display: none; }

.bb-btn { background: transparent; border: none; border-radius: 4px; padding: 4px; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s ease; }

.bb-btn:hover { background: #e2e8f0; color: #3b82f6; }

.bb-btn svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }