/* ==================== آرازون - نسخه پیشرفته کهکشانی ==================== */
/* طراحی مدرن، استاندارد، ریسپانسیو و روان */

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

:root {
    /* رنگ‌های اصلی */
    --accent-primary: #ff4d6d;
    --accent-secondary: #ff8c42;
    --accent-glow: rgba(255, 77, 109, 0.4);
    --text-light: #eef5ff;
    --text-muted: #8e9aaf;
    --border-glow: rgba(255, 77, 109, 0.3);
    
    /* گرادیانت‌ها */
    --bubble-sent: linear-gradient(135deg, #ff4d6d, #ff8c42);
    --bubble-received: rgba(25, 30, 55, 0.92);
    --input-bg: rgba(20, 25, 50, 0.85);
    --sidebar-bg: rgba(6, 8, 18, 0.97);
    --panel-bg: rgba(8, 12, 25, 0.95);
    
    /* اندازه‌های استاندارد */
    --transition-speed: 0.2s;
    --border-radius-sm: 12px;
    --border-radius-md: 18px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    --border-radius-xxl: 40px;
    --touch-target: 44px;
    
    /* تایپوگرافی */
    --font-base: 14px;
    --font-small: 12px;
    --font-xs: 11px;
    --font-large: 16px;
    --font-xl: 18px;
    
    /* ابعاد */
    --header-h: 54px;
    --input-h: 52px;
    --tab-bar-h: 46px;
}

body {
    font-family: -apple-system, 'Segoe UI', 'Poppins', 'Inter', system-ui, sans-serif;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: fixed;
    top: 0;
    left: 0;
    color: var(--text-light);
    background: #0a0c1a;
    font-size: var(--font-base);
    line-height: 1.45;
}

/* ==================== بک‌گراند پویا ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at 20% 50%, #ff4d6d15 0%, transparent 50%),
                radial-gradient(ellipse at 80% 20%, #ff8c4220 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: defaultGlow 8s ease-in-out infinite;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.2), transparent),
                      radial-gradient(1px 1px at 30% 40%, rgba(255,255,255,0.15), transparent),
                      radial-gradient(1px 1px at 70% 30%, rgba(255,255,255,0.15), transparent),
                      radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.1), transparent);
    background-size: 200px 200px;
    z-index: 0;
    pointer-events: none;
    animation: starFloat 20s linear infinite;
}

/* ==================== تم‌های کهکشانی ==================== */
body.theme-galaxy {
    background: #0a0515;
    --accent-primary: #c084fc;
    --accent-secondary: #a855f7;
    --bubble-sent: linear-gradient(135deg, #c084fc, #a855f7);
    --accent-glow: rgba(192, 132, 252, 0.4);
    --border-glow: rgba(192, 132, 252, 0.3);
}
body.theme-galaxy::before {
    background: radial-gradient(ellipse at 30% 30%, #c084fc20 0%, transparent 40%),
                radial-gradient(ellipse at 70% 60%, #a855f725 0%, transparent 40%);
}

body.theme-ocean {
    background: #02111a;
    --accent-primary: #2dd4bf;
    --accent-secondary: #14b8a6;
    --bubble-sent: linear-gradient(135deg, #2dd4bf, #14b8a6);
    --accent-glow: rgba(45, 212, 191, 0.4);
    --border-glow: rgba(45, 212, 191, 0.3);
}

body.theme-sunset {
    background: #1a0a05;
    --accent-primary: #fb923c;
    --accent-secondary: #f97316;
    --bubble-sent: linear-gradient(135deg, #fb923c, #f97316);
    --accent-glow: rgba(251, 146, 60, 0.4);
    --border-glow: rgba(251, 146, 60, 0.3);
}

body.theme-forest {
    background: #020d06;
    --accent-primary: #4ade80;
    --accent-secondary: #22c55e;
    --bubble-sent: linear-gradient(135deg, #4ade80, #22c55e);
    --accent-glow: rgba(74, 222, 128, 0.4);
    --border-glow: rgba(74, 222, 128, 0.3);
}

body.theme-midnight {
    background: #020212;
    --accent-primary: #818cf8;
    --accent-secondary: #6366f1;
    --bubble-sent: linear-gradient(135deg, #818cf8, #6366f1);
    --accent-glow: rgba(129, 140, 248, 0.4);
    --border-glow: rgba(129, 140, 248, 0.3);
}

/* ==================== انیمیشن‌های روان ==================== */
@keyframes defaultGlow {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}
@keyframes starFloat {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.9); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}
@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-6px); opacity: 1; }
}
@keyframes bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
@keyframes menuFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
@keyframes slideInLeft {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
@keyframes mirrorPulse {
    0%, 100% { border-right-color: var(--accent-primary); }
    50% { border-right-color: var(--accent-secondary); }
}
@keyframes explosiveShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}
@keyframes explosiveGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(255,77,109,0.5); }
    50% { box-shadow: 0 0 25px rgba(255,77,109,0.8); }
}

/* ==================== لایه اصلی ==================== */
.cosmic-dashboard {
    display: flex;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* ==================== دکمه همبرگر ==================== */
.hamburger-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    background: rgba(20, 25, 50, 0.95);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 200;
    border: 0.5px solid var(--border-glow);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-speed);
}

.hamburger-btn:active {
    transform: scale(0.94);
    background: rgba(255, 77, 109, 0.2);
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 20px;
}

.hamburger-icon span {
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 4px;
    transition: var(--transition-speed);
}

/* ==================== چت اصلی ==================== */
.chat-universe {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    position: relative;
    z-index: 1;
}

/* هدر */
.astro-header {
    background: rgba(8, 12, 25, 0.85);
    backdrop-filter: blur(18px);
    padding: 0 14px;
    border-bottom: 0.5px solid var(--border-glow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    min-height: var(--header-h);
}

.room-title {
    font-size: var(--font-large);
    font-weight: 600;
    background: linear-gradient(120deg, #fff, var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-align: center;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.3px;
}

/* نوار جستجو */
.search-bar {
    display: flex;
    background: var(--input-bg);
    border-radius: var(--border-radius-xxl);
    padding: 8px 14px;
    align-items: center;
    gap: 8px;
    border: 0.5px solid var(--border-glow);
    width: 140px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.search-bar:focus-within {
    border-color: var(--accent-primary);
    width: 160px;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    padding: 4px 0;
    outline: none;
    width: 100%;
    font-size: var(--font-small);
}

.search-bar input::placeholder {
    font-size: var(--font-xs);
    color: var(--text-muted);
}

.search-bar svg {
    width: 16px;
    height: 16px;
    stroke: var(--accent-secondary);
    fill: none;
    flex-shrink: 0;
}

/* ==================== پنل کنترل AI ==================== */
.ai-control-panel {
    display: flex;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 0.5px solid var(--border-glow);
    overflow-x: auto;
    flex-wrap: nowrap;
    align-items: center;
    scrollbar-width: none;
}

.ai-control-panel::-webkit-scrollbar {
    display: none;
}

.ai-mode-btn {
    padding: 6px 16px;
    border-radius: var(--border-radius-xxl);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 25, 55, 0.7);
    color: #ccc;
    cursor: pointer;
    font-size: var(--font-xs);
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 5px;
}

.ai-mode-btn:active {
    transform: scale(0.96);
}

.ai-mode-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-secondary);
    box-shadow: 0 0 12px var(--accent-glow);
}

.ai-status {
    margin-right: auto;
    font-size: var(--font-xs);
    color: var(--accent-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: var(--border-radius-xxl);
    white-space: nowrap;
}

.ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse 2s infinite;
}

/* ==================== تب‌ها ==================== */
.group-channel-bar {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-bottom: 0.5px solid var(--border-glow);
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
}

.group-channel-bar::-webkit-scrollbar {
    display: none;
}

.group-tab, .channel-tab {
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--border-radius-xxl);
    padding: 7px 18px;
    font-size: var(--font-small);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-speed);
    border: 0.5px solid transparent;
    flex-shrink: 0;
}

.group-tab:active, .channel-tab:active {
    transform: scale(0.96);
}

.group-tab.active, .channel-tab.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-secondary);
    box-shadow: 0 2px 12px var(--accent-glow);
}

/* ==================== نوار پیام‌ها ==================== */
.messages-orbit {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scroll-behavior: smooth;
}

/* اسکرول شخصی‌سازی شده */
.messages-orbit::-webkit-scrollbar {
    width: 4px;
}

.messages-orbit::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.messages-orbit::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 10px;
}

/* ==================== حباب پیام ==================== */
.message-bubble {
    max-width: 85%;
    animation: fadeIn 0.2s ease;
    position: relative;
}

.message-bubble.sent {
    align-self: flex-end;
}

.message-bubble.received {
    align-self: flex-start;
}

/* حباب انفجاری */
.message-bubble.explosive-message .bubble-content {
    border: 1.5px solid #ff4d6d;
    animation: explosiveGlow 1s infinite;
}

.bubble-content {
    padding: 10px 14px;
    border-radius: 20px 6px 20px 14px;
    font-size: var(--font-base);
    line-height: 1.45;
    background: var(--bubble-sent);
    color: white;
    word-break: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.12s ease;
}

.bubble-content:active {
    transform: scale(0.97);
}

.received .bubble-content {
    background: var(--bubble-received);
    border: 0.5px solid var(--border-glow);
    color: var(--text-light);
    border-radius: 6px 20px 14px 20px;
}

/* پیام آراز */
.ai-message .bubble-content {
    background: linear-gradient(135deg, #1a1a3e, #0a0a2e) !important;
    border: 1px solid var(--accent-primary) !important;
    position: relative;
    padding-top: 24px;
}

.ai-message .bubble-content::before {
    content: '🤖';
    position: absolute;
    top: -12px;
    right: 12px;
    font-size: 14px;
    background: #0a0c1a;
    border-radius: 50%;
    padding: 3px;
    border: 0.5px solid var(--border-glow);
}

/* تایم پیام */
.message-time {
    font-size: var(--font-xs);
    margin-top: 4px;
    opacity: 0.55;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* نشانگر انفجاری */
.explosive-badge {
    font-size: var(--font-xs);
    background: rgba(255, 77, 109, 0.3);
    border-radius: 20px;
    padding: 2px 10px;
    margin-right: 8px;
    display: inline-block;
}

.explosive-timer-badge {
    font-size: var(--font-xs);
    background: rgba(255, 77, 109, 0.25);
    border-radius: 20px;
    padding: 2px 10px;
    display: inline-block;
    margin-top: 4px;
    color: #ff8c42;
}

/* ویرایش شده */
.edited-badge {
    font-size: var(--font-xs);
    opacity: 0.5;
    margin-right: 6px;
}

.message-seen {
    font-size: var(--font-xs);
    margin-left: 6px;
    opacity: 0.6;
}

.message-deleted {
    opacity: 0.5;
    font-style: italic;
}

/* ریپلای */
.reply-indicator {
    font-size: var(--font-xs);
    opacity: 0.7;
    margin-bottom: 5px;
    padding-right: 10px;
    border-right: 2px solid var(--accent-primary);
}

/* ==================== تصاویر پیام ==================== */
.message-image {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    border-radius: 14px;
    margin-top: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.1s ease;
}

.message-image:active {
    transform: scale(0.97);
}

/* ==================== ریاکشن‌ها ==================== */
.message-reactions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}

.reaction-badge {
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-xxl);
    padding: 3px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.1s ease;
    font-size: var(--font-small);
    border: 0.5px solid rgba(255, 255, 255, 0.1);
}

.reaction-badge:active {
    transform: scale(0.92);
    background: var(--accent-primary);
}

/* ==================== منوهای شناور ==================== */
.telegram-menu {
    position: fixed;
    background: rgba(20, 20, 35, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 14px;
    padding: 8px 0;
    z-index: 100000;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    border: 0.5px solid rgba(255, 255, 255, 0.15);
    min-width: 170px;
    animation: menuFadeIn 0.12s ease;
}

/* نوار ریپلای */
#replyPreview {
    display: none;
    background: #1e1a3e;
    padding: 8px 14px;
    margin: 0 14px;
    border-radius: var(--border-radius-md);
    font-size: var(--font-small);
    border-right: 3px solid var(--accent-primary);
    animation: fadeIn 0.2s ease;
}

#cancelReplyBtn {
    background: none;
    border: none;
    color: #ff4d6d;
    cursor: pointer;
    font-size: 14px;
    padding: 0 8px;
}

/* ==================== نوار ورودی ==================== */
.input-cosmic {
    background: rgba(12, 16, 32, 0.96);
    backdrop-filter: blur(20px);
    padding: 8px 14px;
    border-top: 0.5px solid var(--border-glow);
    display: flex;
    gap: 10px;
    align-items: center;
    min-height: var(--input-h);
}

.glass-input-field {
    flex: 1;
    background: var(--input-bg);
    border-radius: var(--border-radius-xxl);
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 0.5px solid var(--border-glow);
}

.glass-input-field input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 0;
    color: white;
    outline: none;
    font-size: var(--font-base);
}

.glass-input-field input::placeholder {
    font-size: var(--font-small);
    color: var(--text-muted);
}

.action-icon-btn {
    background: transparent;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #b9c3f0;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.action-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.action-icon-btn:active {
    background: rgba(255, 77, 109, 0.2);
    transform: scale(0.93);
}

.send-rocket {
    background: linear-gradient(145deg, var(--accent-primary), var(--accent-secondary));
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 12px var(--accent-glow);
    transition: all 0.12s ease;
}

.send-rocket:active {
    transform: scale(0.92);
}

.send-rocket svg {
    width: 20px;
    height: 20px;
    fill: white;
    stroke: none;
}

/* ==================== دراور (منوی کناری) ==================== */
.glass-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: var(--sidebar-bg);
    backdrop-filter: blur(28px);
    z-index: 250;
    transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border-left: 0.5px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    padding: 20px 16px;
    gap: 12px;
    overflow-y: auto;
    box-shadow: -4px 0 30px rgba(0, 0, 0, 0.5);
}

.glass-drawer.open {
    right: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.drawer-logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.close-drawer {
    width: 36px;
    height: 36px;
    background: rgba(255, 77, 109, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    color: var(--accent-secondary);
    border: 0.5px solid var(--border-glow);
    transition: all 0.15s ease;
}

.close-drawer:active {
    transform: scale(0.92);
    background: rgba(255, 77, 109, 0.3);
}

.drawer-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--border-radius-xxl);
    background: rgba(20, 25, 55, 0.5);
    cursor: pointer;
    transition: all 0.15s ease;
    color: #ccd6f0;
    font-size: var(--font-base);
    font-weight: 500;
    border: 0.5px solid transparent;
}

.drawer-menu-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    flex-shrink: 0;
}

.drawer-menu-item:active {
    background: linear-gradient(95deg, rgba(255, 77, 109, 0.25), rgba(255, 139, 66, 0.15));
    color: var(--accent-secondary);
    border-color: var(--border-glow);
    transform: scale(0.97);
}

/* ==================== پیش‌نمایش پروفایل ==================== */
.profile-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 77, 109, 0.08);
    border-radius: var(--border-radius-xxl);
    padding: 8px;
    border: 0.5px solid var(--border-glow);
    margin-bottom: 8px;
}

.avatar-preview {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #1f2542, #2a2f55);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid var(--accent-secondary);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.avatar-preview:active {
    transform: scale(0.94);
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info {
    flex: 1;
    min-width: 0;
}

.profile-info input {
    background: #0f122e;
    border: 0.5px solid var(--border-glow);
    border-radius: var(--border-radius-xxl);
    padding: 8px 12px;
    color: white;
    width: 100%;
    font-size: var(--font-small);
    outline: none;
}

.profile-id {
    font-size: var(--font-xs);
    color: var(--accent-secondary);
    margin-top: 6px;
    direction: ltr;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.edit-id-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 0.5px solid var(--border-glow);
    border-radius: 15px;
    padding: 3px 10px;
    font-size: var(--font-xs);
    cursor: pointer;
    color: var(--accent-secondary);
    transition: all 0.1s ease;
}

.edit-id-btn:active {
    transform: scale(0.94);
    background: var(--accent-primary);
    color: white;
}

.profile-status {
    font-size: var(--font-xs);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==================== پنل باغ ==================== */
.quantum-panel {
    position: fixed;
    right: -300px;
    top: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: rgba(3, 5, 15, 0.98);
    backdrop-filter: blur(28px);
    border-left: 0.5px solid var(--border-glow);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 300;
    padding: 20px 16px;
}

.quantum-panel.open-mobile {
    right: 0;
}

.garden-beautiful {
    padding: 24px;
    text-align: center;
    background: linear-gradient(145deg, rgba(255, 77, 109, 0.1), rgba(0, 0, 0, 0.2));
    border-radius: var(--border-radius-lg);
    margin: 0 0 16px 0;
}

.garden-plant-animation {
    font-size: 70px;
    transition: transform 0.2s ease;
    cursor: pointer;
    filter: drop-shadow(0 0 8px var(--accent-secondary));
}

.garden-plant-animation:active {
    transform: scale(1.08);
}

.garden-stats {
    margin-top: 14px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: var(--border-radius-xxl);
    padding: 12px;
    font-size: var(--font-small);
}

.flower-effect {
    animation: bounce 0.4s ease;
}

.close-panel-btn {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 77, 109, 0.25);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 35;
    border: 0.5px solid var(--border-glow);
    color: white;
    font-size: 18px;
    transition: all 0.15s ease;
}

.close-panel-btn:active {
    transform: scale(0.92);
    background: rgba(255, 77, 109, 0.5);
}

/* ==================== مودال تم ==================== */
.theme-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.theme-modal {
    background: #10142b;
    border-radius: var(--border-radius-lg);
    padding: 22px;
    text-align: center;
    max-width: 340px;
    width: 100%;
    border: 0.5px solid var(--border-glow);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    animation: menuFadeIn 0.2s ease;
}

.theme-modal h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 20px 0;
}

.theme-card {
    padding: 14px 10px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    font-size: var(--font-small);
    font-weight: 500;
    color: white;
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
}

.theme-card:active {
    transform: scale(0.96);
}

.theme-card.selected {
    border-color: var(--accent-secondary);
    background: rgba(255, 77, 109, 0.2);
    box-shadow: 0 0 14px var(--accent-glow);
}

/* ==================== مودال پروفایل ==================== */
.profile-modal-overlay {
    animation: fadeIn 0.2s ease;
}

.profile-modal {
    animation: menuFadeIn 0.2s ease;
}

/* ==================== مودال پیام انفجاری ==================== */
.explosive-setup-modal {
    animation: fadeIn 0.2s ease;
}

.explosive-setup-modal button {
    transition: all 0.12s ease;
}

.explosive-setup-modal button:active {
    transform: scale(0.96);
}

.explosive-time-btn {
    transition: all 0.12s ease;
}

.explosive-time-btn:active {
    transform: scale(0.94);
}

.explosive-received-modal {
    animation: fadeIn 0.3s ease;
}

.explosive-big-timer {
    font-family: monospace;
    letter-spacing: 2px;
}

/* ==================== تایپینگ ایندیکیتور ==================== */
.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 10px 16px;
    align-self: flex-start;
    background: rgba(25, 30, 55, 0.9);
    border-radius: var(--border-radius-xxl);
    backdrop-filter: blur(4px);
    margin: 4px 0;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-secondary);
    animation: typingBounce 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* ==================== نوار ریاکشن سریع ==================== */
.quick-replies-bar {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.4);
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 0.5px solid var(--border-glow);
}

.quick-replies-bar::-webkit-scrollbar {
    display: none;
}

.quick-reply-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 0.5px solid var(--border-glow);
    border-radius: var(--border-radius-xxl);
    padding: 6px 16px;
    font-size: var(--font-base);
    color: white;
    cursor: pointer;
    transition: all 0.1s ease;
    white-space: nowrap;
}

.quick-reply-btn:active {
    transform: scale(0.94);
    background: var(--accent-primary) !important;
}

/* ==================== دکمه آینه ==================== */
#mirrorModeBtn {
    transition: all 0.2s ease;
}

#mirrorModeBtn.active {
    background: var(--accent-primary) !important;
    color: white !important;
    box-shadow: 0 0 10px var(--accent-glow);
    transform: scale(0.95);
}

.mirror-active .glass-input-field input {
    border-right: 2px solid var(--accent-primary);
    animation: mirrorPulse 1s ease infinite;
}

/* ==================== کهکشان فانتزی ==================== */
#fantasyGalaxyBtn {
    justify-content: space-between;
}

.submenu-arrow {
    font-size: 11px;
    transition: transform 0.2s ease;
}

.submenu-arrow.open {
    transform: rotate(90deg);
}

#fantasySubmenu {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: rgba(10, 12, 26, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-md);
    padding: 10px 12px;
    margin: 6px 10px 0 10px;
    border: 0.5px solid var(--border-glow);
}

#fantasySubmenu.show {
    display: flex;
}

.fantasy-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--border-radius-xxl);
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.12s ease;
    font-size: var(--font-small);
}

.fantasy-item:active {
    background: var(--accent-primary);
    transform: scale(0.97);
}

.fantasy-badge {
    font-size: var(--font-xs);
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 12px;
    border-radius: var(--border-radius-xxl);
    color: #aaa;
    transition: all 0.15s ease;
}

.fantasy-badge.active {
    background: var(--accent-primary);
    color: white;
    box-shadow: 0 0 8px var(--accent-glow);
}

/* ==================== آواتار کنار پیام ==================== */
.message-avatar, .message-avatar-placeholder {
    transition: transform 0.1s ease;
}

.message-avatar:active, .message-avatar-placeholder:active {
    transform: scale(0.94);
}

.message-sender-name {
    transition: opacity 0.1s ease;
}

.message-sender-name:active {
    opacity: 0.6;
}

/* لینک‌ها */
.bubble-content a {
    word-break: break-all;
    color: var(--accent-secondary);
    text-decoration: underline;
}

.bubble-content a:active {
    opacity: 0.7;
}

/* ==================== ریسپانسیو دسکتاپ ==================== */
@media (min-width: 768px) {
    .hamburger-btn {
        display: none;
    }
    
    .glass-drawer {
        position: relative;
        right: 0;
        width: 260px;
        border-right: 0.5px solid var(--border-glow);
        border-left: none;
    }
    
    .quantum-panel {
        position: relative;
        right: 0;
        width: 260px;
    }
    
    .close-panel-btn {
        display: none;
    }
    
    .message-bubble {
        max-width: 70%;
    }
    
    .astro-header {
        padding: 0 18px;
    }
    
    .search-bar {
        width: 180px;
    }
    
    .search-bar:focus-within {
        width: 220px;
    }
    
    .ai-control-panel {
        padding: 8px 18px;
    }
    
    .group-channel-bar {
        padding: 10px 18px;
    }
    
    .messages-orbit {
        padding: 18px;
    }
    
    .input-cosmic {
        padding: 10px 18px;
    }
}

@media (min-width: 1024px) {
    .message-bubble {
        max-width: 60%;
    }
    
    .glass-drawer {
        width: 280px;
    }
    
    .quantum-panel {
        width: 280px;
    }
}

/* ==================== موبایل ==================== */
@media (max-width: 767px) {
    .room-title {
        font-size: var(--font-base);
    }
    
    .search-bar {
        width: 110px;
    }
    
    .group-tab, .channel-tab {
        padding: 5px 14px;
        font-size: var(--font-xs);
    }
    
    .message-bubble {
        max-width: 90%;
    }
    
    .message-image {
        max-width: 160px;
        max-height: 160px;
    }
    
    .bubble-content {
        padding: 8px 12px;
        font-size: var(--font-small);
    }
}

/* ==================== پشتیبانی از نوار پایین موبایل ==================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .input-cosmic {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
    
    .glass-drawer {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
    
    .quantum-panel {
        padding-top: max(20px, env(safe-area-inset-top));
        padding-bottom: max(20px, env(safe-area-inset-bottom));
    }
}

/* ==================== کاهش حرکت ==================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}
/* اضافه کردن به انتهای فایل Style.css */

/* ==================== بخش دنیای من ==================== */
.my-world-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: rgba(8, 12, 25, 0.95);
    position: relative;
    z-index: 2;
}

.messages-tabs {
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.4);
    padding: 10px 14px;
    border-bottom: 0.5px solid var(--border-glow);
}

.msg-tab-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 0.5px solid transparent;
    border-radius: 30px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.msg-tab-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-secondary);
    box-shadow: 0 2px 10px var(--accent-glow);
    color: white;
}

.conversation-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.conversation-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 0.5px solid transparent;
}

.conversation-item:active {
    transform: scale(0.98);
    background: rgba(255, 77, 109, 0.15);
    border-color: var(--border-glow);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.conversation-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.conversation-last-msg {
    font-size: 11px;
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-time {
    font-size: 10px;
    opacity: 0.4;
    margin-left: 8px;
}

.conversation-unread {
    background: var(--accent-primary);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    min-width: 22px;
    text-align: center;
}

.saved-messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.saved-message-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 10px;
    border-right: 3px solid var(--accent-primary);
    cursor: pointer;
    transition: all 0.15s ease;
}

.saved-message-item:active {
    transform: scale(0.98);
    background: rgba(255, 77, 109, 0.1);
}

.saved-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
    opacity: 0.7;
}

.saved-message-sender {
    color: var(--accent-secondary);
}

.saved-message-text {
    font-size: 13px;
    margin-bottom: 6px;
    word-break: break-word;
}

.saved-message-room {
    font-size: 10px;
    opacity: 0.5;
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 10px;
    border-radius: 20px;
}

.delete-saved-btn {
    background: rgba(255, 77, 109, 0.2);
    border: none;
    border-radius: 20px;
    padding: 4px 12px;
    color: #ff4d6d;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.1s ease;
}

.delete-saved-btn:active {
    transform: scale(0.95);
    background: #ff4d6d;
    color: white;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    opacity: 0.5;
}

.back-to-chat-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 0.5px solid var(--border-glow);
    border-radius: 30px;
    padding: 8px 16px;
    margin: 10px 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 13px;
}

.back-to-chat-btn:active {
    transform: scale(0.97);
    background: var(--accent-primary);
}

/* دکمه ستاره برای ذخیره پیام */
.save-message-star {
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    margin-left: 6px;
    transition: all 0.1s ease;
}

.save-message-star:active {
    transform: scale(1.2);
}

/* انیمیشن برای ذخیره شدن */
@keyframes starSaved {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.star-saved {
    animation: starSaved 0.3s ease;
}

@media (max-width: 767px) {
    .msg-tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .conversation-item {
        padding: 10px;
    }
    
    .conversation-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .conversation-name {
        font-size: 13px;
    }
}