Files
payachat/static/style.css
T
payanovin_admin 46ff71a260 ﷽
اولین کامیت پروژه پایاچت
2026-11-05 16:45:16 +03:30

1521 lines
31 KiB
CSS

/* ============================================================
SCRATCH CHAT — Stylesheet
ساختار: متغیرها → ریست → اسکرول‌بار → چیدمان → سایدبار
→ چت → پیام‌ها → کامپوزر → حالت خالی → موبایل
→ انیمیشن‌ها → احراز هویت
============================================================ */
/* ---------- 1. متغیرها ---------- */
:root {
/* رنگ پس‌زمینه */
--bg: #06090d;
--bg-2: #0b1118;
--bg-card: rgba(13, 19, 28, 0.88);
--bg-input: rgba(8, 18, 28, 0.82);
--bg-hover: rgba(0, 255, 255, 0.1);
/* رنگ متن */
--text: #eafaff;
--text-soft: #b9dff1;
--text-muted: #7ea3b8;
/* رنگ نئون */
--neon: #00ffff;
--neon-2: #00cfff;
--border: rgba(0, 255, 255, 0.18);
/* افکت نئون */
--glow: 0 0 18px rgba(0, 255, 255, 0.3);
--glow-strong: 0 0 32px rgba(0, 255, 255, 0.55);
/* اندازه‌ها */
--radius: 16px;
--radius-sm: 10px;
--radius-lg: 22px;
--radius-pill: 999px;
--sidebar-w: 320px;
/* انیمیشن */
--transition: all 0.22s ease;
}
/* ---------- 2. ریست ---------- */
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
height: 100%;
-webkit-text-size-adjust: 100%;
-webkit-tap-highlight-color: transparent;
}
body {
height: 100%;
font-family: 'Vazirmatn', system-ui, sans-serif;
font-size: 15px;
line-height: 1.55;
color: var(--text);
overflow: hidden;
overscroll-behavior: none;
-webkit-font-smoothing: antialiased;
background:
radial-gradient(ellipse at top, rgba(0, 207, 255, 0.08), transparent 55%),
radial-gradient(ellipse at bottom, rgba(0, 255, 255, 0.05), transparent 55%),
var(--bg);
}
/* ---------- 3. اسکرول‌بار ---------- */
* {
scrollbar-width: thin;
scrollbar-color: rgba(0, 255, 255, 0.25) transparent;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-thumb {
background: rgba(0, 255, 255, 0.2);
border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(0, 255, 255, 0.4);
}
/* ---------- 4. چیدمان کلی ---------- */
.app {
display: flex;
height: 100vh;
height: 100dvh; /* رفع باگ ارتفاع در موبایل */
overflow: hidden;
}
/* ---------- 5. سایدبار ---------- */
.sidebar {
width: var(--sidebar-w);
flex-shrink: 0;
display: flex;
flex-direction: column;
background: var(--bg-2);
border-left: 1px solid var(--border);
}
.sidebar-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
padding: 18px;
font-size: 1.05rem;
font-weight: 700;
border-bottom: 1px solid var(--border);
background: linear-gradient(180deg, rgba(0, 255, 255, 0.06), transparent);
}
.room-list {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 8px;
list-style: none;
}
/* آیتم لیست گفتگوها */
.room-item {
position: relative;
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
margin-bottom: 4px;
font-size: 0.95rem;
color: var(--text-soft);
text-decoration: none;
cursor: pointer;
border: 1px solid transparent;
border-radius: var(--radius-sm);
transition: var(--transition);
/* 👇 این دو خط جدید اضافه شده */
background: rgba(13, 19, 28, 0.4);
border: 1px solid rgba(0, 255, 255, 0.08); /* یک مرز نئونی خیلی محو و ملایم */
}
.room-item:hover {
color: var(--text);
background: var(--bg-hover);
border-color: rgba(0, 255, 255, 0.3);
box-shadow: 0 0 16px rgba(0, 255, 255, 0.15);
transform: translateX(-2px);
}
.room-item.active {
color: var(--neon);
background: var(--bg-hover);
border-color: rgba(0, 255, 255, 0.3);
box-shadow: inset 0 0 15px rgba(0, 255, 255, 0.08);
}
/* آواتار اتاق توی لیست */
.room-item-avatar {
width: 42px;
height: 42px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: 700;
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border-radius: 50%;
overflow: hidden;
user-select: none;
}
.room-item-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 50%;
display: block;
}
/* اطلاعات کنار آواتار */
.room-item-info {
display: flex;
flex-direction: column;
min-width: 0; /* برای اینکه متن طولانی با ... کوتاه بشه */
}
.room-item-name {
font-weight: 600;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.room-item-meta {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: 2px;
}
/* ---------- 6. پنل چت ---------- */
.chat {
flex: 1;
min-width: 0;
min-height: 0;
display: flex;
flex-direction: column;
background: var(--bg);
}
.chat-header {
position: relative;
z-index: 2;
display: flex;
align-items: center;
gap: 10px;
padding: 16px 18px;
font-weight: 700;
border-bottom: 1px solid var(--border);
background: var(--bg-2);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.chat-header .back {
display: none;
padding: 4px 10px;
font-size: 1.4rem;
line-height: 1;
color: var(--neon);
text-decoration: none;
border-radius: var(--radius-sm);
transition: var(--transition);
}
.chat-header .back:hover {
background: var(--bg-hover);
text-shadow: 0 0 12px var(--neon);
}
/* آواتار اتاق */
.chat-avatar {
width: 42px;
height: 42px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.05rem;
font-weight: 700;
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border-radius: 50%;
box-shadow: 0 0 14px rgba(0, 255, 255, 0.3);
user-select: none;
overflow: hidden; /* ← جدید */
}
.chat-avatar img {
width: 42px; /* ← به‌جای 100% */
height: 42px; /* ← به‌جای 100% */
object-fit: cover;
border-radius: 50%;
display: block; /* ← جلوگیری از baseline issue */
max-width: 100%;
max-height: 100%;
}
/* اطلاعات کنار آواتار */
.chat-header-info {
display: flex;
flex-direction: column;
gap: 1px;
min-width: 0;
}
.chat-header-title {
font-size: 0.98rem;
font-weight: 700;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.chat-header-meta {
font-size: 0.72rem;
font-weight: 500;
color: var(--text-muted);
}
/* ---------- 7. پیام‌ها ---------- */
.messages {
flex: 1;
min-height: 0;
display: flex;
flex-direction: column;
gap: 10px;
padding: 18px 16px;
overflow-y: auto;
/*scroll-behavior: smooth;*/
overflow-anchor: none;
}
/* پوشش هر پیام (آواتار + حباب) */
.msg-wrap {
display: flex;
align-items: flex-start;
gap: 8px;
max-width: min(72%, 560px);
align-self: flex-start;
animation: fadeIn 0.2s ease both;
}
/* پیام خودم — سمت راست، بدون آواتار */
.msg-wrap.me {
align-self: flex-end;
flex-direction: row-reverse;
}
/* حباب پیام */
.msg {
padding: 10px 14px;
line-height: 1.55;
color: var(--text);
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
word-wrap: break-word;
overflow-wrap: anywhere;
}
.msg.me {
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border-color: transparent;
box-shadow: var(--glow);
}
/* نویسنده (فقط توی گروه) */
.msg-author-link {
color: var(--neon);
text-decoration: none;
font-weight: 600;
margin-left: 4px;
}
/* آواتار کنار پیام (فقط توی گروه) */
.msg-avatar {
width: 32px;
height: 32px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.8rem;
font-weight: 700;
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border-radius: 50%;
overflow: hidden;
text-decoration: none;
margin-top: 6px;
}
.msg-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
/* ---------- 8. نوار ارسال ---------- */
.composer {
display: flex;
gap: 8px;
padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
border-top: 1px solid var(--border);
background: var(--bg-2);
box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}
.composer input {
flex: 1;
min-width: 0;
padding: 11px 16px;
font-family: inherit;
font-size: 0.95rem;
color: var(--text);
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-pill);
outline: none;
transition: var(--transition);
}
.composer input::placeholder {
color: var(--text-muted);
}
.composer input:focus {
background: rgba(8, 18, 28, 0.95);
border-color: var(--neon);
box-shadow: var(--glow);
}
.composer button {
padding: 11px 22px;
font-family: inherit;
font-size: 0.95rem;
font-weight: 700;
color: #001018;
white-space: nowrap;
cursor: pointer;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border: none;
border-radius: var(--radius-pill);
transition: var(--transition);
}
.composer button:hover {
box-shadow: var(--glow-strong);
transform: translateY(-1px);
}
/* ---------- 9. حالت خالی ---------- */
.empty-state {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
font-size: 0.95rem;
line-height: 1.7;
color: var(--text-muted);
text-align: center;
}
/* ---------- 10. ریسپانسیو — موبایل ---------- */
@media (max-width: 768px) {
.sidebar {
width: 100%;
border-left: none;
}
.chat {
display: none;
}
.chat.mobile-show {
display: flex;
}
.sidebar.mobile-hide {
display: none;
}
.chat-header .back {
display: inline-block;
}
.chat-header,
.sidebar-header {
padding-top: max(16px, env(safe-area-inset-top, 0px));
}
}
/* ---------- 11. انیمیشن‌ها ---------- */
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(6px);
}
to {
opacity: 1;
transform: none;
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
transition-duration: 0.01ms !important;
}
}
/* ---------- 12. فرم‌های احراز هویت ---------- */
.auth-page {
min-height: 100vh;
min-height: 100dvh;
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
background:
radial-gradient(circle at 30% 20%, rgba(0, 255, 255, 0.1), transparent 45%),
radial-gradient(circle at 70% 80%, rgba(0, 207, 255, 0.07), transparent 45%);
}
.auth-card {
width: 100%;
max-width: 420px;
padding: 30px 26px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius-lg);
box-shadow: var(--glow), 0 20px 60px rgba(0, 0, 0, 0.4);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
animation: fadeIn 0.3s ease both;
}
.auth-card h1 {
margin-bottom: 22px;
font-size: 1.4rem;
color: var(--text);
text-align: center;
letter-spacing: 0.3px;
text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}
.auth-card .field {
margin-bottom: 14px;
}
.auth-card label {
display: block;
margin-bottom: 6px;
font-size: 0.85rem;
font-weight: 600;
color: var(--text-soft);
}
.auth-card input {
width: 100%;
padding: 11px 14px;
font-family: inherit;
font-size: 0.95rem;
color: var(--text);
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
outline: none;
transition: var(--transition);
}
.auth-card input:focus {
border-color: var(--neon);
box-shadow: var(--glow);
}
.auth-card button {
width: 100%;
margin-top: 10px;
padding: 12px;
font-family: inherit;
font-size: 0.95rem;
font-weight: 700;
color: #001018;
cursor: pointer;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border: none;
border-radius: var(--radius-pill);
transition: var(--transition);
}
.auth-card button:hover {
box-shadow: var(--glow-strong);
transform: translateY(-1px);
}
.auth-card .error {
padding: 9px 12px;
margin-bottom: 14px;
font-size: 0.85rem;
color: #ff9ea8;
background: rgba(255, 95, 109, 0.12);
border: 1px solid rgba(255, 95, 109, 0.3);
border-radius: var(--radius-sm);
animation: fadeIn 0.2s ease both;
}
.auth-card .hint {
margin-top: 16px;
font-size: 0.85rem;
color: var(--text-muted);
text-align: center;
}
.auth-card .hint a {
font-weight: 600;
color: var(--neon);
text-decoration: none;
transition: var(--transition);
}
.auth-card .hint a:hover {
text-shadow: 0 0 12px rgba(0, 255, 255, 0.7);
}
/* ============================================================
صفحه‌ی تنظیمات
============================================================ */
.settings-layout {
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
background: var(--bg);
}
.settings-header {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 18px;
padding-top: max(14px, env(safe-area-inset-top, 0px));
background: var(--bg-2);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
}
.settings-back {
color: var(--neon);
text-decoration: none;
font-size: 1.4rem;
padding: 4px 10px;
border-radius: 8px;
transition: var(--transition);
}
.settings-back:hover {
background: var(--bg-hover);
}
.settings-header-title {
flex: 1;
font-weight: 700;
font-size: 1rem;
}
.settings-header-save {
padding: 8px 18px;
border: none;
border-radius: var(--radius-pill);
background: linear-gradient(135deg, var(--neon-2), var(--neon));
color: #001018;
font-family: inherit;
font-weight: 700;
font-size: 0.85rem;
cursor: pointer;
transition: var(--transition);
}
.settings-header-save:hover {
box-shadow: var(--glow-strong);
}
.settings-body {
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 24px 20px 40px;
}
.settings-toast {
max-width: 600px;
margin: 0 auto 16px;
padding: 10px 14px;
background: rgba(0, 255, 255, 0.1);
border: 1px solid rgba(0, 255, 255, 0.3);
border-radius: var(--radius-sm);
color: var(--neon);
text-align: center;
font-size: 0.85rem;
}
/* آواتار */
.settings-avatar-btn {
position: relative;
cursor: pointer;
display: inline-block;
}
.settings-avatar {
width: 100px;
height: 100px;
display: flex;
align-items: center;
justify-content: center;
font-size: 2.4rem;
font-weight: 700;
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border-radius: 50%;
overflow: hidden;
box-shadow: 0 0 24px rgba(0, 255, 255, 0.35);
user-select: none;
transition: var(--transition);
}
.settings-avatar-btn:hover .settings-avatar {
box-shadow: 0 0 32px rgba(0, 255, 255, 0.55);
}
.settings-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.settings-avatar-badge {
position: absolute;
bottom: 2px;
left: 2px;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-2);
border: 2px solid var(--neon);
border-radius: 50%;
font-size: 0.8rem;
}
/* گروه‌ها */
.settings-group {
max-width: 600px;
margin: 0 auto 16px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: var(--radius);
/* overflow: hidden; ← حذفش کن */
}
/* جبران: گوشه‌های گرد برای اولین و آخرین فرزند */
.settings-group > :first-child {
border-top-left-radius: var(--radius);
border-top-right-radius: var(--radius);
}
.settings-group > :last-child {
border-bottom-left-radius: var(--radius);
border-bottom-right-radius: var(--radius);
}
.settings-group-title {
padding: 8px 16px;
font-size: 0.7rem;
font-weight: 700;
color: var(--neon);
text-transform: uppercase;
letter-spacing: 0.5px;
background: rgba(0, 255, 255, 0.05);
border-bottom: 1px solid var(--border);
}
.settings-row {
padding: 12px 16px;
border-bottom: 1px solid rgba(0, 255, 255, 0.06);
}
.settings-row:last-child {
border-bottom: none;
}
.settings-row label {
display: block;
font-size: 0.7rem;
color: var(--text-muted);
margin-bottom: 4px;
}
.settings-row input,
.settings-row textarea {
width: 100%;
padding: 2px 0;
background: transparent;
border: none;
border-bottom: 1px solid transparent;
color: var(--text);
font-family: inherit;
font-size: 0.95rem;
outline: none;
resize: none;
transition: border-color 0.15s ease;
}
.settings-row input:focus,
.settings-row textarea:focus {
border-bottom-color: var(--neon);
}
/* بخش آواتار + دکمه‌ی حذف */
.settings-avatar-section {
position: relative;
display: flex;
justify-content: center;
padding-bottom: 28px;
}
/* دکمه‌ی حذف عکس */
.settings-delete-avatar {
position: absolute;
left: calc(50% + 72px);
top: 50%;
transform: translateY(-50%);
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 14px;
background: rgba(255, 95, 109, 0.06);
color: #ff9ea8;
font-size: 0.82rem;
border: 1px solid rgba(255, 95, 109, 0.3);
border-radius: var(--radius-pill);
cursor: pointer;
white-space: nowrap;
transition: var(--transition);
}
.settings-delete-avatar:hover {
background: rgba(255, 95, 109, 0.12);
border-color: rgba(255, 95, 109, 0.6);
}
/* موبایل — زیر آواتار */
@media (max-width: 640px) {
.settings-avatar-section {
flex-direction: column;
align-items: center;
}
.settings-delete-avatar {
position: static;
transform: none;
margin-top: 16px;
}
}
.settings-row-error {
font-size: 0.75rem;
color: #ff9ea8;
margin-top: 4px;
}
.settings-row-danger {
display: block;
color: #ff9ea8;
text-decoration: none;
font-weight: 600;
}
.settings-row-danger:hover {
background: rgba(255, 95, 109, 0.06);
}
@media (max-width: 768px) {
.settings-body {
padding: 18px 12px 30px;
}
.settings-avatar {
width: 85px;
height: 85px;
font-size: 2rem;
}
}
/* ============================================================
صفحه‌ی پروفایل
============================================================ */
/* کارت پروفایل — برای پروفایل کاربر، کانال، گروه */
.profile-card {
max-width: 600px;
margin: 0 auto 24px;
text-align: center;
padding: 30px 20px 24px;
}
/* آواتار بزرگ — قابل استفاده برای کاربر/اتاق */
.profile-avatar {
width: 120px;
height: 120px;
margin: 0 auto 18px;
display: flex;
align-items: center;
justify-content: center;
font-size: 3rem;
font-weight: 700;
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border-radius: 50%;
overflow: hidden;
box-shadow: 0 0 32px rgba(0, 255, 255, 0.4);
border: 3px solid rgba(0, 255, 255, 0.2);
user-select: none;
}
.profile-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
/* نام نمایشی */
.profile-name {
font-size: 1.5rem;
font-weight: 700;
color: var(--text);
margin-bottom: 4px;
}
/* نام کاربری — می‌شه برای هر جایی که @username نشون می‌دیم استفاده کرد */
.profile-username {
font-size: 0.9rem;
color: var(--neon);
font-weight: 600;
direction: ltr;
display: inline-block;
margin-bottom: 8px;
}
/* بیو */
.profile-bio {
font-size: 0.92rem;
color: var(--text-soft);
line-height: 1.7;
max-width: 400px;
margin: 10px auto 0;
padding: 12px 16px;
background: rgba(0, 255, 255, 0.04);
border: 1px solid rgba(0, 255, 255, 0.08);
border-radius: var(--radius);
}
/* دکمه‌ها — قابل استفاده در هر جایی که گروه دکمه داریم */
.profile-actions {
display: flex;
gap: 8px;
margin-top: 22px;
justify-content: center;
flex-wrap: wrap;
}
.profile-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 11px 22px;
font-family: inherit;
font-size: 0.9rem;
font-weight: 700;
text-decoration: none;
border-radius: var(--radius-pill);
cursor: pointer;
transition: var(--transition);
border: 1px solid transparent;
}
.profile-btn-primary {
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
box-shadow: var(--glow);
}
.profile-btn-primary:hover {
box-shadow: var(--glow-strong);
transform: translateY(-1px);
}
.profile-btn-secondary {
color: var(--neon);
background: transparent;
border-color: var(--border);
}
.profile-btn-secondary:hover {
background: var(--bg-hover);
border-color: rgba(0, 255, 255, 0.3);
}
/* مقدار فقط‌خواندنی — برای ردیف‌های تنظیمات که input نیستن */
.settings-value {
font-size: 0.95rem;
color: var(--text);
padding: 2px 0;
}
/* موبایل */
@media (max-width: 768px) {
.profile-avatar {
width: 100px;
height: 100px;
font-size: 2.4rem;
}
.profile-name {
font-size: 1.25rem;
}
.profile-card {
padding: 20px 16px;
}
}
/* placeholder برای چت خالی */
.chat-empty {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
color: var(--text-muted);
text-align: center;
padding: 24px;
}
.chat-empty-icon {
font-size: 3rem;
opacity: 0.6;
}
.chat-empty-text {
font-size: 0.95rem;
line-height: 1.7;
}
/* ============================================================
فرم‌های خاص: رادیو، چک‌باکس، آپلود فایل
============================================================ */
/* رادیو به‌صورت کارت انتخاب */
.settings-row .radio-group {
display: flex;
gap: 10px;
margin-top: 6px;
}
.settings-row .radio-group label {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px;
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius);
cursor: pointer;
font-size: 0.92rem;
color: var(--text-soft);
transition: var(--transition);
margin: 0;
}
.settings-row .radio-group label:hover {
border-color: rgba(0, 255, 255, 0.4);
background: rgba(0, 255, 255, 0.04);
}
.settings-row .radio-group label:has(input:checked) {
background: rgba(0, 255, 255, 0.12);
border-color: var(--neon);
color: var(--neon);
box-shadow: 0 0 16px rgba(0, 255, 255, 0.2);
font-weight: 700;
}
.settings-row .radio-group input[type="radio"] {
display: none;
}
/* چک‌باکس به‌صورت سوییچ */
.settings-row .toggle-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
cursor: pointer;
margin: 0;
}
.settings-row .toggle-row span {
font-size: 0.92rem;
color: var(--text);
}
.settings-row .toggle-switch {
position: relative;
width: 44px;
height: 24px;
flex-shrink: 0;
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-pill);
transition: var(--transition);
}
.settings-row .toggle-switch::after {
content: '';
position: absolute;
top: 2px;
right: 2px;
width: 18px;
height: 18px;
background: var(--text-muted);
border-radius: 50%;
transition: var(--transition);
}
.settings-row .toggle-row input[type="checkbox"] {
display: none;
}
.settings-row .toggle-row input:checked + .toggle-switch {
background: rgba(0, 255, 255, 0.15);
border-color: var(--neon);
}
.settings-row .toggle-row input:checked + .toggle-switch::after {
background: var(--neon);
right: calc(100% - 20px);
box-shadow: 0 0 10px var(--neon);
}
/* آپلود فایل — ناحیه کلیک‌شدنی */
.file-upload-area {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
padding: 24px 16px;
margin-top: 6px;
background: var(--bg-input);
border: 1.5px dashed var(--border);
border-radius: var(--radius);
cursor: pointer;
text-align: center;
transition: var(--transition);
}
.file-upload-area:hover {
border-color: var(--neon);
background: rgba(0, 255, 255, 0.04);
}
.file-upload-area.has-file {
border-style: solid;
border-color: var(--neon);
background: rgba(0, 255, 255, 0.06);
}
.file-upload-icon {
font-size: 1.8rem;
opacity: 0.7;
}
.file-upload-text {
font-size: 0.85rem;
color: var(--text-muted);
}
.file-upload-name {
font-size: 0.85rem;
color: var(--neon);
font-weight: 600;
direction: ltr;
}
.file-upload-area input[type="file"] {
display: none;
}
/* لینک مطلق که کل هدر رو می‌پوشونه */
.chat-header-link {
position: absolute;
inset: 0;
z-index: 1;
text-decoration: none;
}
/* دکمه‌ی بازگشت، بالای لینک */
.chat-header .back {
position: relative;
z-index: 2;
}
/* کد دعوت بزرگ */
.invite-code-big {
padding: 8px 16px;
background: rgba(0, 255, 255, 0.1);
border: 1px solid var(--neon);
border-radius: var(--radius-pill);
color: var(--neon);
font-family: 'Courier New', monospace;
font-size: 1.1rem;
font-weight: 700;
letter-spacing: 2px;
direction: ltr;
display: inline-block;
}
/* ============================================================
دکمه‌ی عضویت (پیش‌نمایش)
============================================================ */
.join-cta {
max-width: 380px;
margin: 8px auto 40px;
padding: 0 20px;
animation: fadeIn 0.4s ease both;
}
.join-cta form {
margin: 0;
}
.join-btn {
width: 100%;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 16px 24px;
font-family: inherit;
font-size: 1rem;
font-weight: 700;
letter-spacing: 0.3px;
color: #001018;
background: linear-gradient(135deg, var(--neon-2), var(--neon));
border: none;
border-radius: var(--radius-pill);
cursor: pointer;
box-shadow: var(--glow);
transition: var(--transition);
position: relative;
overflow: hidden;
}
.join-btn::before {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(135deg, transparent, rgba(255, 255, 255, 0.4), transparent);
transform: translateX(-100%);
transition: transform 0.6s ease;
}
.join-btn:hover::before {
transform: translateX(100%);
}
.join-btn:hover {
box-shadow: var(--glow-strong);
transform: translateY(-2px);
}
.join-btn:active {
transform: translateY(0);
}
/* موبایل */
@media (max-width: 768px) {
.join-cta {
margin-bottom: 32px;
}
.join-btn {
padding: 14px 20px;
font-size: 0.95rem;
}
}
/* ============================================================
منوی ۳ نقطه برای اعضا
============================================================ */
.member-row {
position: relative;
display: flex;
align-items: stretch;
}
/* ردیف بازشده، روی ردیف‌های بعدی */
.member-row:has(.member-menu[open]) {
z-index: 10;
}
.member-row .room-item {
flex: 1;
min-width: 0;
padding-left: 48px;
margin-bottom: 0 !important;
}
/* دکمه‌ی ⋯ — دقیقاً هم‌ارتفاع دکمه، وسط ردیف */
.member-menu {
position: absolute;
left: 8px;
top: 50%;
transform: translateY(-50%);
z-index: 20;
}
.member-menu summary {
list-style: none;
cursor: pointer;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
color: var(--text-muted);
font-size: 1.2rem;
line-height: 1;
transition: var(--transition);
user-select: none;
}
.member-menu summary::-webkit-details-marker { display: none; }
.member-menu summary:hover,
.member-menu[open] summary {
background: var(--bg-hover);
color: var(--neon);
}
/* منو — دقیقاً زیر دکمه */
.member-menu-list {
position: absolute;
top: calc(100% + 4px);
left: 0;
min-width: 190px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
z-index: 100;
overflow: hidden;
animation: fadeIn 0.15s ease both;
}
.member-menu:not([open]) .member-menu-list { display: none; }
.member-menu-list form { margin: 0; }
.member-menu-list button {
width: 100%;
padding: 11px 16px;
background: transparent;
border: none;
color: var(--text);
text-align: right;
cursor: pointer;
font-family: inherit;
font-size: 0.85rem;
transition: var(--transition);
white-space: nowrap;
}
.member-menu-list button:hover {
background: var(--bg-hover);
}
.member-menu-list button.danger { color: #ff9ea8; }
.member-menu-list button.danger:hover {
background: rgba(255, 95, 109, 0.1);
}
/* ورودی‌های editable توی اطلاعات اتاق */
.room-info-input {
width: 100%;
max-width: 360px;
margin: 8px auto 0;
display: block;
padding: 10px 14px;
background: var(--bg-input);
border: 1px solid var(--border);
border-radius: var(--radius-sm);
color: var(--text);
font-family: inherit;
outline: none;
text-align: center;
transition: var(--transition);
resize: none;
}
.room-info-input:focus {
border-color: var(--neon);
box-shadow: var(--glow);
}
.room-info-input-title {
font-size: 1.3rem;
font-weight: 700;
margin-bottom: 10px;
}
.room-info-input-bio {
font-size: 0.9rem;
line-height: 1.6;
min-height: 50px;
}
/* آواتار کلیک‌شدنی برای ویرایش */
.profile-avatar-label {
position: relative;
display: inline-block;
cursor: pointer;
margin: 0 auto 18px;
transition: var(--transition);
}
.profile-avatar-label:hover .profile-avatar {
box-shadow: 0 0 40px rgba(0, 255, 255, 0.6);
transform: scale(1.03);
}
.profile-avatar-label .settings-avatar-badge {
position: absolute;
bottom: 4px;
left: 4px;
width: 36px;
height: 36px;
display: flex;
align-items: center;
justify-content: center;
background: var(--bg-2);
border: 2px solid var(--neon);
border-radius: 50%;
font-size: 1rem;
box-shadow: var(--glow);
}
/* ساعت پیام */
.msg-time {
display: block;
margin-top: 4px;
font-size: 0.65rem;
color: var(--text-muted);
text-align: left;
direction: ltr;
opacity: 0.8;
}
.msg.me .msg-time {
text-align: right;
color: rgba(0, 16, 24, 0.65);
}
/* تیک آبی */
.verified-pro {
display: inline-flex;
align-items: center;
justify-content: center;
flex: 0 0 auto;
width: 1.1em;
height: 1.1em;
font-size: inherit;
vertical-align: middle;
margin: 0 0.05em;
transform: translateY(-0.24em);
filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
transition: transform 0.2s ease, filter 0.2s ease;
cursor: default;
}
.verified-pro svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.verified-blue { color: #3390ec; }
.verified-white { color: #ffffff; }
/* انیمیشن ورود پیام جدید */
@keyframes msgInMe {
from {
opacity: 0;
transform: translateY(20px) translateX(20px) scale(0.95);
}
to {
opacity: 1;
transform: translateY(0) translateX(0) scale(1);
}
}
.msg-new.me {
animation: msgInMe 0.25s ease-out;
}
.unread-bubble {
position: absolute;
left: 12px;
bottom: 12px;
background: #3390ec;
color: white;
font-size: 12px;
font-weight: 600;
min-width: 22px;
height: 22px;
padding: 0 6px;
border-radius: 11px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
font-family: system-ui, -apple-system, sans-serif;
}