:root { --primary-color: #6366f1; --primary-hover: #4f46e5; --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); --chat-bg: #ffffff; --text-main: #1f2937; --text-secondary: #6b7280; --border: #e5e7eb; --door-width: 50%; --transition-speed: 1.1s; --surface: #ffffff; --surface-2: #f3f4f6; --surface-3: #fafafa; --page-surface: #eef2f6; --card-bg: rgba(255, 255, 255, 0.92); --login-card-bg: rgba(255, 255, 255, 0.95); --confirm-card-bg: rgba(255, 255, 255, 0.96); --emoji-panel-bg: rgba(255, 255, 255, 0.98); --btn-bg: #ffffff; --btn-border: #d1d5db; --input-border: #d1d5db; } :root[data-theme="dark"] { --bg-gradient: linear-gradient(135deg, #0b1220 0%, #141a2a 100%); --chat-bg: #0f1625; --text-main: #e5e7eb; --text-secondary: #9ca3af; --border: rgba(148, 163, 184, 0.18); --surface: #0f1625; --surface-2: #0b1220; --surface-3: #0b1220; --page-surface: #0b1220; --card-bg: rgba(15, 22, 37, 0.92); --login-card-bg: rgba(15, 22, 37, 0.95); --confirm-card-bg: rgba(15, 22, 37, 0.96); --emoji-panel-bg: rgba(15, 22, 37, 0.98); --btn-bg: rgba(15, 22, 37, 0.92); --btn-border: rgba(148, 163, 184, 0.28); --input-border: rgba(148, 163, 184, 0.28); } * { box-sizing: border-box; margin: 0; padding: 0; font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif; } .srOnly { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; } html, body { width: 100%; height: 100%; overflow: hidden; background: var(--bg-gradient); color: var(--text-main); } :root { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; } /* === Scene === */ .scene-container { position: relative; width: 100%; height: 100%; perspective: 1500px; overflow: hidden; } /* === Chat behind doors === */ .chat-room { position: absolute; inset: 0; display: flex; justify-content: center; align-items: center; z-index: 1; background: var(--page-surface); filter: blur(6px); transition: filter var(--transition-speed) ease; } .chat-room.active { filter: blur(0); } .chat-interface { width: 92%; max-width: 1100px; height: 88%; background: var(--chat-bg); border-radius: 20px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); position: relative; display: flex; flex-direction: column; overflow: hidden; opacity: 0; transform: scale(0.95); transition: opacity 1s ease 0.4s, transform 1s ease 0.4s; } .chat-room.active .chat-interface { opacity: 1; transform: scale(1); } /* === Topbar === */ .topbar { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .brand { font-weight: 800; color: var(--text-main); } .me { color: var(--text-secondary); font-size: 12px; } .topbarRight { display: flex; align-items: center; gap: 10px; } .menuBtn { display: inline-grid; } .menuDropdown { position: absolute; top: 58px; right: 12px; z-index: 60; width: min(360px, calc(100% - 24px)); } .menuDropdown[hidden] { display: none !important; } .menuDropdownCard { max-height: calc(88vh - 70px); overflow: auto; padding: 12px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22); } .menuDropdownHeader { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border); } .menuDropdownTitle { font-weight: 900; color: var(--text-main); } /* === Layout === */ .layout { flex: 1; display: flex; min-height: 0; } .sidebar { width: 280px; background: var(--surface-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 16px; gap: 12px; overflow: auto; } .fold { padding: 0; } .foldSummary { list-style: none; cursor: pointer; padding: 12px; font-size: 13px; font-weight: 800; color: var(--text-main); user-select: none; } .foldSummary::-webkit-details-marker { display: none; } .foldBody { padding: 0 12px 12px; } .fold[open] .foldSummary { border-bottom: 1px solid var(--border); } .chat { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--surface); } .card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 14px; padding: 12px; } .admin { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; } .adminHeader { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12px; color: var(--text-secondary); padding: 6px 2px; } .adminHeader > div { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .adminRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; } .adminRow > * { min-width: 0; } .adminRowName { font-weight: 800; color: var(--text-main); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .userNameAdmin { color: #e74c3c; } .userNameVerified { color: #8b5cf6; } .userNameMember { color: #3b82f6; } .adminRowName.userNameAdmin, .onlineName.userNameAdmin { color: #e74c3c; } .adminRowName.userNameVerified, .onlineName.userNameVerified { color: #8b5cf6; } .adminRowName.userNameMember, .onlineName.userNameMember { color: #3b82f6; } .adminRowActions { justify-self: end; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; } .iconBtn { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 10px; } .iconBtn svg { width: 18px; height: 18px; display: block; } .iconBtnDanger { border-color: rgba(231, 76, 60, 0.35); color: #e74c3c; } .iconBtnDanger:hover { background: rgba(231, 76, 60, 0.08); } .tag { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-3); font-size: 12px; color: var(--text-secondary); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .onlineList { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; } .onlineItem { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; } .onlineDot { width: 10px; height: 10px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.14); flex: 0 0 auto; } .onlineName { font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--text-main); } .onlineMeTag { margin-left: auto; flex: 0 0 auto; font-size: 12px; color: var(--text-secondary); } .adminRow .btn { padding: 8px 10px; border-radius: 10px; font-size: 12px; } .cardTitle { font-size: 13px; font-weight: 800; color: var(--text-main); margin-bottom: 10px; } .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .stack { display: flex; flex-direction: column; gap: 10px; } .hint { font-size: 12px; color: var(--text-secondary); } .hint.ok { color: #10b981; } .hint.bad { color: #e74c3c; } .link { font-size: 12px; color: var(--primary-color); text-decoration: none; } button.link { background: none; border: none; padding: 0; cursor: pointer; } .input { width: 100%; padding: 10px 12px; border: 1px solid var(--input-border); border-radius: 12px; outline: none; background: var(--surface); color: var(--text-main); } .input:focus { border-color: var(--primary-color); } .btn { padding: 10px 12px; border-radius: 12px; border: 1px solid var(--btn-border); background: var(--btn-bg); cursor: pointer; font-weight: 600; color: var(--text-main); } .btnPrimary { border-color: transparent; background: var(--primary-color); color: #fff; } .btnPrimary:hover { background: var(--primary-hover); } .btn:disabled { opacity: 0.6; cursor: not-allowed; } /* === Chat area === */ .chatHeader { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; } .chatTitle { font-size: 15px; font-weight: 800; color: var(--text-main); } .chatSubtitle { font-size: 12px; color: var(--text-secondary); margin-top: 4px; } .messages { flex: 1; padding: 16px 18px; overflow: auto; background: var(--surface-3); display: flex; flex-direction: column; gap: 14px; min-height: 0; } .msgRow { display: flex; align-items: flex-end; gap: 10px; max-width: 80%; } .msgRow.left { justify-content: flex-start; } .msgRow.right { justify-content: flex-end; align-self: flex-end; } .bubble { padding: 10px 16px; border-radius: 12px; font-size: 14px; line-height: 1.4; background: var(--surface); border: 1px solid var(--border); color: var(--text-main); word-wrap: break-word; } .bubble.me { background: var(--primary-color); border-color: transparent; color: #fff; } .meta { font-size: 11px; color: var(--text-secondary); margin-bottom: 6px; } .chatName { font-weight: 900; color: var(--text-main); } .chatMetaSep { color: var(--text-secondary); } .chatTime { color: var(--text-secondary); } .bubble.me .meta, .bubble.me .chatMetaSep, .bubble.me .chatTime { color: rgba(255, 255, 255, 0.78); } .bubble.me .chatName { color: rgba(255, 255, 255, 0.96); } .bubble img { width: 200px; height: 200px; max-width: 100%; border-radius: 12px; display: block; object-fit: cover; cursor: zoom-in; } .composer { padding: 16px 18px; border-top: 1px solid var(--border); background: var(--surface); position: relative; display: flex; flex-direction: column; gap: 10px; } .composerRow { display: flex; gap: 10px; align-items: center; } .msgInputWrap { flex: 1; min-width: 0; position: relative; } .inlineThumb { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 10px; object-fit: cover; border: 1px solid var(--border); background: var(--surface); } .msgInputWrap.hasThumb .input { padding-left: 54px; } .toolBtn { width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center; border-radius: 12px; } .toolBtn svg { width: 18px; height: 18px; display: block; } .toolBtn[disabled] { opacity: 0.55; cursor: not-allowed; } .composerAttach { display: flex; gap: 10px; align-items: center; } .attachChip { display: inline-flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; } .attachThumb { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); } .attachMeta { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .attachName { font-size: 12px; font-weight: 800; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; } .attachHint { font-size: 12px; color: var(--text-secondary); } .emojiPanel { position: absolute; left: 18px; bottom: 74px; z-index: 20; width: min(360px, calc(100% - 36px)); border: 1px solid var(--border); border-radius: 14px; background: var(--emoji-panel-bg); box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18); padding: 10px; } .emojiPanel[hidden] { display: none !important; } .emojiGrid { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; } .emojiBtn { width: 32px; height: 32px; border-radius: 10px; border: 1px solid transparent; background: transparent; cursor: pointer; display: inline-grid; place-items: center; font-size: 18px; line-height: 1; } .emojiBtn:hover { background: var(--surface-2); border-color: var(--border); } /* === Doors === */ .doors-container { position: absolute; inset: 0; z-index: 10; display: flex; pointer-events: none; } .door { width: var(--door-width); height: 100%; position: relative; transition: transform var(--transition-speed) cubic-bezier(0.645, 0.045, 0.355, 1); transform-style: preserve-3d; pointer-events: none; box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5); } .door.left { transform-origin: left; background: linear-gradient(90deg, #1a252f 0%, #34495e 100%); border-right: 2px solid #1a252f; } .door.right { transform-origin: right; background: linear-gradient(-90deg, #1a252f 0%, #34495e 100%); border-left: 2px solid #1a252f; } .doors-container.open .door.left { transform: rotateY(-110deg); } .doors-container.open .door.right { transform: rotateY(110deg); } .door::after { content: ""; position: absolute; top: 20px; bottom: 20px; left: 20px; right: 20px; border: 2px solid rgba(255, 255, 255, 0.1); pointer-events: none; } .door-handle { position: absolute; top: 50%; width: 12px; height: 60px; background: #f1c40f; border-radius: 6px; box-shadow: 0 0 10px rgba(241, 196, 15, 0.5); transform: translateY(-50%); } .door.left .door-handle { right: 30px; } .door.right .door-handle { left: 30px; } /* === Login card === */ .login-wrapper { position: absolute; inset: 0; z-index: 20; display: flex; justify-content: center; align-items: center; pointer-events: none; } .login-card { background: var(--login-card-bg); padding: 34px; border-radius: 16px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); width: min(360px, 92vw); text-align: center; pointer-events: auto; transition: all 0.8s ease; backdrop-filter: blur(10px); } .login-card h1 { margin-bottom: 8px; color: var(--text-main); font-size: 1.5rem; } .login-card p { color: var(--text-secondary); margin-bottom: 18px; font-size: 0.9rem; } .gateTabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; } .gatePanel { text-align: left; margin-top: 10px; } .gateModalCard { width: min(400px, 92vw) !important; } .gateModalHeader { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; } .input-group { margin-bottom: 14px; } .input-group label { display: block; margin-bottom: 8px; color: var(--text-main); font-size: 0.85rem; font-weight: 700; } .input-group input { width: 100%; padding: 12px; border: 2px solid var(--input-border); border-radius: 8px; font-size: 1rem; outline: none; transition: border-color 0.2s; background: var(--surface); color: var(--text-main); } .input-group input:focus { border-color: var(--primary-color); } .login-btn { width: 100%; padding: 12px; background: var(--primary-color); color: white; border: none; border-radius: 8px; font-size: 1rem; font-weight: 800; cursor: pointer; transition: background 0.2s, transform 0.1s; margin-top: 6px; } .login-btn:hover { background: var(--primary-hover); } .login-btn:active { transform: scale(0.98); } .error-msg { color: #e74c3c; font-size: 0.85rem; min-height: 1.1rem; margin: 6px 0 4px; opacity: 0; transition: opacity 0.25s; } .error-msg.show { opacity: 1; } .login-wrapper.fade-out .login-card { opacity: 0; transform: scale(0.96) translateY(-10px); } .imgViewer { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; padding: 20px; } .imgViewer[hidden] { display: none !important; } .imgViewerBackdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); } .imgViewerImg { position: relative; max-width: min(92vw, 980px); max-height: 88vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); background: var(--surface); } .imgViewerClose { position: absolute; top: 14px; right: 14px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(0, 0, 0, 0.35); color: #fff; cursor: pointer; backdrop-filter: blur(8px); } /* Toast */ .toast { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000; padding: 10px 14px; border-radius: 999px; background: rgba(17, 24, 39, 0.92); color: #fff; font-size: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25); max-width: min(92vw, 520px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .toast.ok { background: rgba(16, 185, 129, 0.95); } .toast.bad { background: rgba(231, 76, 60, 0.95); } /* Confirm */ .confirm { position: fixed; inset: 0; z-index: 1001; display: grid; place-items: center; padding: 18px; } .confirm[hidden] { display: none !important; } .confirm::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); } .confirmCard { position: relative; width: min(520px, 92vw); border-radius: 16px; background: var(--confirm-card-bg); border: 1px solid var(--border); padding: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35); } .confirmTitle { font-weight: 900; color: var(--text-main); margin-bottom: 8px; } .confirmMsg { color: var(--text-secondary); font-size: 13px; line-height: 1.4; margin-bottom: 12px; white-space: pre-wrap; } @media (max-width: 900px) { .layout { flex-direction: column; } .sidebar { display: none; } .msgRow { max-width: 90%; } } @media (max-width: 420px) { .adminHeader { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .adminRow { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .adminRowActions .btn { padding: 8px 8px; } }