.gs-root {
    position: fixed; inset: 0; z-index: 2147483400;
    display: none; flex-direction: column;
    background: #030306; color: #f1f1f1;
    font-family: Vazirmatn, Tahoma, sans-serif; direction: rtl;
}
.gs-root.gs-open { display: flex; }

.gs-bg {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
    background:
        radial-gradient(circle at 15% 10%, rgba(170,0,20,0.35), transparent 45%),
        radial-gradient(circle at 85% 90%, rgba(120,0,60,0.30), transparent 50%),
        linear-gradient(180deg, #0a0206 0%, #040306 60%, #020204 100%);
    animation: gs-hue 14s ease-in-out infinite alternate;
}
@keyframes gs-hue { from { filter: hue-rotate(0deg); } to { filter: hue-rotate(-18deg); } }

.gs-particle {
    position: absolute; bottom: -20px; width: 3px; height: 3px; border-radius: 50%;
    background: rgba(255,70,70,0.85); box-shadow: 0 0 10px rgba(255,60,60,0.9);
    animation-name: gs-float; animation-timing-function: linear; animation-iteration-count: infinite;
}
@keyframes gs-float {
    0% { transform: translateY(0); opacity: 0; }
    10% { opacity: 1; }
    100% { transform: translateY(-110vh) translateX(24px); opacity: 0; }
}

.gs-scan {
    position: absolute; left: 0; right: 0; height: 120px; top: -120px;
    background: linear-gradient(180deg, transparent, rgba(255,60,60,0.06), transparent);
    animation: gs-scan 6s linear infinite;
}
@keyframes gs-scan { to { top: 110%; } }

.gs-top {
    position: relative; z-index: 3;
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px 12px;
    background: rgba(12,4,8,0.72);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,60,60,0.22);
    box-shadow: 0 6px 30px rgba(255,0,40,0.08);
}
.gs-title {
    flex: 1; text-align: center; font-size: 17px; font-weight: 800;
    letter-spacing: 2px; color: #ff8a80;
    text-shadow: 0 0 14px rgba(255,60,60,0.55);
}
.gs-close {
    width: 36px; height: 36px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(255,255,255,0.07); color: #eee; font-size: 15px;
}

.gs-online {
    display: flex; align-items: center; gap: 6px; cursor: pointer;
    background: rgba(60,255,140,0.08); border: 1px solid rgba(60,255,140,0.35);
    border-radius: 999px; padding: 6px 12px; color: #b9ffd6; font-family: inherit; font-size: 12px;
}
.gs-dot {
    width: 8px; height: 8px; border-radius: 50%; background: #3ee68e;
    box-shadow: 0 0 8px #3ee68e; animation: gs-blink 1.6s ease-in-out infinite;
}
@keyframes gs-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.gs-online-count { font-weight: 800; color: #6dffb0; }

.gs-online-panel {
    position: absolute; z-index: 10; top: 66px; left: 12px; min-width: 190px; max-height: 50vh; overflow-y: auto;
    background: rgba(10,8,12,0.96); border: 1px solid rgba(60,255,140,0.3); border-radius: 16px;
    padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,0.6);
    animation: gs-pop 0.2s ease-out;
}
@keyframes gs-pop { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
.gs-op-title { font-size: 12px; color: #9bffc4; font-weight: 800; padding: 4px 6px 8px; border-bottom: 1px solid rgba(255,255,255,0.07); margin-bottom: 6px; }
.gs-op-name { display: flex; align-items: center; gap: 8px; padding: 6px; font-size: 13px; }
.gs-op-dot { width: 7px; height: 7px; border-radius: 50%; background: #3ee68e; box-shadow: 0 0 6px #3ee68e; }
.gs-op-empty { font-size: 12px; color: rgba(255,255,255,0.45); padding: 6px; }

.gs-body {
    position: relative; z-index: 2; flex: 1; overflow-y: auto;
    padding: 16px 14px; display: flex; flex-direction: column; gap: 10px;
}
.gs-empty { margin: auto; color: rgba(255,255,255,0.4); font-size: 13px; }

.gs-row { display: flex; }
.gs-mine { justify-content: flex-start; }
.gs-other { justify-content: flex-end; }

.gs-bubble {
    max-width: 78%; border-radius: 18px; padding: 9px 12px 10px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.09);
    box-shadow: 0 6px 18px rgba(0,0,0,0.35);
    animation: gs-in 0.25s ease-out;
}
.gs-mine .gs-bubble {
    background: linear-gradient(135deg, rgba(180,0,30,0.30), rgba(90,0,20,0.28));
    border-color: rgba(255,80,80,0.35);
    border-bottom-left-radius: 6px;
}
.gs-other .gs-bubble { border-bottom-right-radius: 6px; }
@keyframes gs-in { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }

.gs-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; font-weight: 800; margin-bottom: 4px; }
.gs-time { color: rgba(255,255,255,0.35); font-weight: 400; direction: ltr; }
.gs-text { font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word; }
.gs-img {
    display: block; max-width: 240px; width: 100%; border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1); margin-top: 2px; background: rgba(0,0,0,0.3);
}

.gs-notice {
    margin: auto; text-align: center; max-width: 320px; display: flex; flex-direction: column; gap: 12px; align-items: center;
}
.gs-notice-icon { font-size: 40px; filter: drop-shadow(0 0 14px rgba(255,60,60,0.5)); }
.gs-notice-text { font-size: 14px; line-height: 1.9; color: rgba(255,255,255,0.75); }
.gs-btn {
    border: none; border-radius: 14px; padding: 12px 22px; cursor: pointer; font-family: inherit;
    font-size: 14px; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, #c0001f, #7a0012); box-shadow: 0 6px 20px rgba(255,0,40,0.3);
}

.gs-foot {
    position: relative; z-index: 3;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(10,4,8,0.8);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid rgba(255,60,60,0.2);
}
.gs-note { font-size: 12px; color: #9be89b; min-height: 16px; padding: 0 4px 6px; text-align: center; }
.gs-emoji-box {
    display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px;
    background: rgba(255,255,255,0.04); border-radius: 14px; padding: 8px; margin-bottom: 8px;
}
.gs-emo { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; border-radius: 8px; }
.gs-emo:active { transform: scale(1.3); }
.gs-inrow { display: flex; align-items: center; gap: 8px; }
.gs-tool {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.07); font-size: 18px; cursor: pointer; flex: 0 0 auto;
}
.gs-input {
    flex: 1; min-width: 0; height: 42px; box-sizing: border-box;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px; padding: 0 16px; color: #fff; font-size: 14px; font-family: inherit; outline: none;
}
.gs-input:focus { border-color: rgba(255,80,80,0.6); box-shadow: 0 0 0 3px rgba(255,60,60,0.12); }
.gs-send {
    height: 42px; border: none; border-radius: 999px; padding: 0 18px; cursor: pointer; flex: 0 0 auto;
    color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
    background: linear-gradient(135deg, #c0001f, #7a0012); box-shadow: 0 6px 18px rgba(255,0,40,0.35);
}
.gs-send:disabled { opacity: 0.5; }

