| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466 |
- /* ==================== 全局样式重置 ==================== */
- * {
- box-sizing: border-box;
- margin: 0;
- padding: 0;
- }
- body {
- font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
- margin: 0;
- padding: 0;
- overflow: hidden;
- height: 100vh;
- width: 100vw;
- }
- /* ==================== 背景容器 ==================== */
- .background-container {
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- height: 100vh;
- background-image: url('../images/1.png');
- background-size: cover;
- background-position: center;
- background-repeat: no-repeat;
- transition: background-image 0.5s ease-in-out;
- z-index: -2;
- }
- .background-overlay {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background: rgba(0, 0, 0, 0.3);
- z-index: -1;
- }
- /* ==================== 主容器 ==================== */
- .container {
- position: relative;
- width: 100vw;
- height: 100vh;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: flex-end;
- /* 从底部开始排列 */
- padding: 20px;
- padding-bottom: 0;
- /* 移除底部padding,让模型可以延伸到页面底部 */
- }
- /* ==================== 模型加载区 ==================== */
- .model-container {
- position: absolute;
- top: 50%;
- left: 50%;
- width: 300px;
- height: 200px;
- transform: translate(-50%, -50%);
- user-select: none;
- }
- .model-loading {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- display: none;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- z-index: 999;
- transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
- background-image: linear-gradient(transparent 50%, rgba(88, 101, 242, 0.05) 50%);
- background-size: 100% 4px;
- animation: scan 1.26s linear infinite;
- }
- .loading-char-float {
- font-size: 22px;
- letter-spacing: 3px;
- position: relative;
- }
- .loading-char-float .main-char {
- color: #f0f8ff;
- text-shadow: 0 0 5px #5865f2, 0 0 10px rgba(88, 101, 242, 0.8);
- display: inline-block;
- }
- .loading-char-float .main-char span {
- animation: char-float 1.26s ease-in-out infinite;
- display: inline-block;
- }
- .loading-char-float .shadow-char {
- position: absolute;
- top: 3px;
- left: 0;
- color: rgba(88, 101, 242, 0.3);
- pointer-events: none;
- animation: shadow-float 1.26s ease-in-out infinite;
- }
- .loading-char-float .main-char span:nth-child(1) {
- animation-delay: 0s;
- }
- .loading-char-float .main-char span:nth-child(2) {
- animation-delay: 0.11s;
- }
- .loading-char-float .main-char span:nth-child(3) {
- animation-delay: 0.22s;
- }
- .loading-char-float .main-char span:nth-child(4) {
- animation-delay: 0.33s;
- }
- .loading-char-float .main-char span:nth-child(5) {
- animation-delay: 0.44s;
- }
- .loading-char-float .main-char span:nth-child(6) {
- animation-delay: 0.55s;
- }
- @keyframes scan {
- 0% {
- background-position: 0 0;
- }
- 100% {
- background-position: 0 100px;
- }
- }
- @keyframes char-float {
- 0%,
- 100% {
- transform: translateY(0);
- opacity: 1;
- text-shadow: 0 0 5px #5865f2, 0 0 10px rgba(88, 101, 242, 0.8);
- }
- 50% {
- transform: translateY(-5px);
- opacity: 0.9;
- text-shadow: 0 0 10px #5865f2, 0 0 20px rgba(88, 101, 242, 0.8);
- }
- }
- @keyframes shadow-float {
- 0%,
- 100% {
- transform: translateY(3px);
- opacity: 0.3;
- }
- 50% {
- transform: translateY(8px);
- opacity: 0.15;
- }
- }
- /* ==================== Live2D显示区域 ==================== */
- #live2d-stage {
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- height: 100vh;
- display: block;
- z-index: 100;
- pointer-events: auto;
- }
- .status-indicator {
- position: absolute;
- top: 20px;
- left: 50%;
- transform: translateX(-50%);
- display: flex;
- align-items: center;
- gap: 8px;
- background: rgba(0, 0, 0, 0.4);
- backdrop-filter: blur(10px);
- padding: 8px 16px;
- border-radius: 20px;
- border: 1px solid rgba(255, 255, 255, 0.1);
- color: white;
- font-size: 14px;
- font-weight: 500;
- z-index: 10;
- }
- .status-dot {
- width: 8px;
- height: 8px;
- border-radius: 50%;
- animation: pulse 2s infinite;
- }
- .status-disconnected {
- background-color: #f44336;
- }
- .status-connecting {
- background-color: #ff9800;
- }
- .status-connected {
- background-color: #4caf50;
- }
- @keyframes pulse {
- 0%,
- 100% {
- opacity: 1;
- }
- 50% {
- opacity: 0.5;
- }
- }
- /* ==================== 聊天消息流(弹幕样式) ==================== */
- .chat-container {
- position: absolute;
- bottom: 150px;
- right: 20px;
- z-index: 100;
- }
- .chat-stream {
- width: 300px;
- max-height: 200px;
- overflow-y: auto;
- overflow-x: hidden;
- display: flex;
- flex-direction: column;
- gap: 8px;
- pointer-events: none;
- margin-bottom: 10px;
- }
- .chat-ipt {
- width: 100%;
- display: none;
- justify-content: center;
- margin-top: 10px;
- }
- .chat-ipt input {
- width: 100%;
- padding: 12px 16px;
- border: none;
- border-radius: 24px;
- background: rgba(35, 39, 42, 0.85);
- backdrop-filter: blur(10px);
- color: white;
- font-size: 14px;
- border: 1px solid rgba(255, 255, 255, 0.1);
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
- transition: all 0.3s ease;
- }
- .chat-ipt input::placeholder {
- color: rgba(255, 255, 255, 0.5);
- }
- .chat-ipt input:focus {
- outline: none;
- border-color: rgba(88, 101, 242, 0.6);
- box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
- background: rgba(45, 49, 52, 0.9);
- }
- .chat-message {
- animation: slideInRight 0.3s ease-out;
- pointer-events: auto;
- }
- .chat-message.ai .message-bubble {
- background: transparent;
- color: white;
- align-self: flex-end;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
- }
- .chat-message.user .message-bubble {
- background: rgba(88, 101, 242, 0.7);
- color: white;
- align-self: flex-start;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
- backdrop-filter: blur(5px);
- border: 1px solid rgba(255, 255, 255, 0.2);
- }
- .chat-message.system .message-bubble {
- background: transparent;
- color: #b9bbbe;
- align-self: center;
- text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
- }
- .message-bubble {
- padding: 8px 12px;
- border-radius: 18px;
- font-size: 14px;
- max-width: 250px;
- word-wrap: break-word;
- backdrop-filter: blur(10px);
- border: 1px solid rgba(255, 255, 255, 0.1);
- animation: fadeIn 0.3s ease-out;
- }
- @keyframes slideInRight {
- from {
- transform: translateX(100%);
- opacity: 0;
- }
- to {
- transform: translateX(0);
- opacity: 1;
- }
- }
- @keyframes fadeIn {
- from {
- opacity: 0;
- transform: translateY(10px);
- }
- to {
- opacity: 1;
- transform: translateY(0);
- }
- }
- @keyframes fadeOut {
- from {
- opacity: 1;
- }
- to {
- opacity: 0;
- }
- }
- /* ==================== 底部控制栏 ==================== */
- .control-bar {
- position: fixed;
- bottom: 20px;
- left: 50%;
- transform: translateX(-50%);
- display: flex;
- gap: 16px;
- background: rgba(35, 39, 42, 0.9);
- backdrop-filter: blur(20px);
- padding: 12px 24px;
- border-radius: 28px;
- border: 1px solid rgba(255, 255, 255, 0.1);
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
- z-index: 1000;
- /* 确保控制栏在最上层 */
- }
- .control-btn {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- width: 60px;
- height: 60px;
- border: none;
- border-radius: 50%;
- background: rgba(79, 84, 92, 0.8);
- color: white;
- cursor: pointer;
- transition: all 0.2s ease;
- position: relative;
- }
- .control-btn:hover {
- background: rgba(114, 137, 218, 0.8);
- transform: translateY(-2px);
- }
- .control-btn:active {
- transform: translateY(0);
- }
- .control-btn:disabled {
- background: rgba(79, 84, 92, 0.4);
- color: rgba(255, 255, 255, 0.4);
- cursor: not-allowed;
- transform: none;
- }
- .control-btn:disabled:hover {
- background: rgba(79, 84, 92, 0.4);
- transform: none;
- }
- .btn-icon {
- width: 24px;
- height: 24px;
- margin-bottom: 4px;
- }
- .btn-text {
- font-size: 12px;
- font-weight: 500;
- }
- /* 拨号按钮特殊样式 */
- .dial-btn.dial-active {
- background: rgba(237, 66, 69, 0.9);
- }
- .dial-btn.dial-active:hover {
- background: rgba(237, 66, 69, 1);
- }
- /* 录音按钮特殊样式 */
- .control-btn.recording {
- background: rgba(237, 66, 69, 0.9);
- animation: pulse 1.5s infinite;
- }
- .control-btn.recording:hover {
- background: rgba(237, 66, 69, 1);
- }
- /* 摄像头按钮特殊样式 */
- #cameraBtn.camera-active {
- background: rgba(237, 66, 69, 0.9);
- }
- #cameraBtn.camera-active:hover {
- background: rgba(237, 66, 69, 1);
- }
- /* 录音按钮脉冲动画 */
- @keyframes pulse {
- 0% {
- box-shadow: 0 0 0 0 rgba(237, 66, 69, 0.7);
- }
- 70% {
- box-shadow: 0 0 0 10px rgba(237, 66, 69, 0);
- }
- 100% {
- box-shadow: 0 0 0 0 rgba(237, 66, 69, 0);
- }
- }
- /* ==================== 弹窗样式 ==================== */
- .modal {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- height: 100vh;
- background: rgba(0, 0, 0, 0.7);
- backdrop-filter: blur(5px);
- z-index: 2000;
- align-items: center;
- justify-content: center;
- }
- .modal-content {
- background: #36393f;
- border-radius: 12px;
- width: 90%;
- max-width: 500px;
- max-height: 80vh;
- overflow: hidden;
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
- animation: modalSlideIn 0.3s ease-out;
- }
- .settings-modal {
- max-width: 700px;
- max-height: 85vh;
- }
- @keyframes modalSlideIn {
- from {
- opacity: 0;
- transform: scale(0.9) translateY(-20px);
- }
- to {
- opacity: 1;
- transform: scale(1) translateY(0);
- }
- }
- .modal-header {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 20px 24px;
- border-bottom: 1px solid #40444b;
- background: #2f3136;
- }
- .modal-header h2 {
- color: white;
- font-size: 20px;
- font-weight: 600;
- margin: 0;
- }
- .close-btn {
- background: none;
- border: none;
- color: #b9bbbe;
- font-size: 24px;
- cursor: pointer;
- width: 32px;
- height: 32px;
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 4px;
- transition: background-color 0.2s;
- }
- .close-btn:hover {
- background: #40444b;
- color: white;
- }
- .modal-body {
- padding: 24px;
- max-height: calc(80vh - 80px);
- overflow-y: auto;
- }
- /* ==================== 输入组样式 ==================== */
- .input-group {
- margin-bottom: 20px;
- }
- .input-group label {
- display: block;
- margin-bottom: 8px;
- color: #b9bbbe;
- font-size: 14px;
- font-weight: 500;
- }
- .input-group input,
- .input-group textarea {
- width: 100%;
- padding: 12px;
- border: 1px solid #40444b;
- border-radius: 6px;
- background: #40444b;
- color: white;
- font-size: 14px;
- transition: border-color 0.2s;
- }
- .input-group input:focus,
- .input-group textarea:focus {
- outline: none;
- border-color: #5865f2;
- }
- .input-group textarea {
- resize: vertical;
- min-height: 80px;
- font-family: inherit;
- }
- /* ==================== 按钮样式 ==================== */
- .modal-actions {
- display: flex;
- gap: 12px;
- justify-content: flex-end;
- margin-top: 24px;
- }
- /* ==================== 文件协议警告样式 ==================== */
- #fileProtocolWarning {
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- width: 95%;
- max-width: 800px;
- background: linear-gradient(135deg, rgba(76, 175, 80, 0.95), rgba(56, 142, 60, 0.95));
- border: 3px solid #4caf50;
- border-radius: 16px;
- padding: 32px;
- z-index: 10000;
- box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
- backdrop-filter: blur(15px);
- color: white;
- font-family: inherit;
- animation: fadeInUp 0.5s ease-out;
- }
- #fileProtocolWarning h2 {
- color: #e8f5e8;
- margin-bottom: 20px;
- font-size: 28px;
- font-weight: 700;
- text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
- }
- #fileProtocolWarning p {
- margin-bottom: 16px;
- line-height: 1.6;
- font-size: 16px;
- color: #e8f5e8;
- }
- #fileProtocolWarning ol {
- margin: 16px 0;
- padding-left: 24px;
- font-size: 16px;
- }
- #fileProtocolWarning pre {
- background: rgba(255, 255, 255, 0.15);
- padding: 12px 16px;
- border-radius: 8px;
- margin: 12px 0;
- font-family: 'Courier New', monospace;
- font-size: 14px;
- overflow-x: auto;
- border: 1px solid rgba(255, 255, 255, 0.2);
- }
- #fileProtocolWarning strong {
- color: #c8e6c9;
- font-weight: 600;
- }
- /* 背景模糊遮罩 */
- .file-protocol-overlay {
- position: fixed;
- top: 0;
- left: 0;
- width: 100vw;
- height: 100vh;
- background: rgba(0, 0, 0, 0.6);
- backdrop-filter: blur(10px);
- z-index: 9999;
- animation: fadeIn 0.3s ease-out;
- }
- /* 动画效果 */
- @keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
- }
- @keyframes fadeInUp {
- from {
- opacity: 0;
- transform: translate(-50%, -40%);
- }
- to {
- opacity: 1;
- transform: translate(-50%, -50%);
- }
- }
- /* ==================== 连接信息样式 ==================== */
- .connection-info {
- margin-top: 20px;
- padding: 16px;
- background: rgba(88, 101, 242, 0.1);
- border: 1px solid rgba(88, 101, 242, 0.3);
- border-radius: 8px;
- text-align: center;
- }
- .connection-info p {
- color: #b9bbbe;
- font-size: 14px;
- line-height: 1.4;
- margin: 0;
- }
- .btn-primary {
- background: #5865f2;
- color: white;
- border: none;
- padding: 10px 20px;
- border-radius: 6px;
- cursor: pointer;
- font-size: 14px;
- font-weight: 500;
- transition: background-color 0.2s;
- }
- .btn-primary:hover {
- background: #4752c4;
- }
- .btn-secondary {
- background: #4f545c;
- color: white;
- border: none;
- padding: 10px 20px;
- border-radius: 6px;
- cursor: pointer;
- font-size: 14px;
- font-weight: 500;
- transition: background-color 0.2s;
- }
- .btn-secondary:hover {
- background: #5d6269;
- }
- /* ==================== 设置标签页样式 ==================== */
- .settings-tabs {
- display: flex;
- border-bottom: 1px solid #40444b;
- margin-bottom: 20px;
- }
- .tab-btn {
- background: none;
- border: none;
- color: #b9bbbe;
- padding: 12px 24px;
- cursor: pointer;
- font-size: 14px;
- font-weight: 500;
- border-bottom: 2px solid transparent;
- transition: all 0.2s;
- }
- .tab-btn.active {
- color: white;
- border-bottom-color: #5865f2;
- }
- .tab-btn:hover:not(.active) {
- color: white;
- background: #40444b;
- }
- .tab-content {
- display: none;
- }
- .tab-content.active {
- display: block;
- }
- /* ==================== 配置面板样式 ==================== */
- .config-panel {
- background: #2f3136;
- border-radius: 8px;
- padding: 20px;
- }
- .config-row {
- display: flex;
- gap: 16px;
- margin-bottom: 16px;
- }
- .config-item {
- flex: 1;
- }
- .config-item label {
- display: block;
- margin-bottom: 6px;
- color: #b9bbbe;
- font-size: 12px;
- font-weight: 500;
- }
- .config-item input {
- width: 100%;
- padding: 8px 12px;
- border: 1px solid #40444b;
- border-radius: 4px;
- background: #40444b;
- color: white;
- font-size: 14px;
- }
- .model-select {
- width: 100%;
- padding: 10px 40px 10px 14px;
- border: 1px solid #40444b;
- border-radius: 8px;
- background: #40444b;
- color: #ffffff;
- font-size: 14px;
- font-weight: 500;
- cursor: pointer;
- appearance: none;
- -webkit-appearance: none;
- -moz-appearance: none;
- background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
- background-repeat: no-repeat;
- background-position: right 12px center;
- background-size: 16px 16px;
- }
- .model-select:hover {
- border-color: #5865f2;
- }
- .model-select:focus {
- outline: none;
- border-color: #5865f2;
- }
- .model-select option {
- background: #2f3136;
- color: #ffffff;
- padding: 12px;
- font-size: 14px;
- }
- .background-btn {
- width: 100%;
- padding: 10px 14px;
- border: 1px solid #40444b;
- border-radius: 8px;
- background: #40444b;
- color: #ffffff;
- font-size: 14px;
- font-weight: 500;
- cursor: pointer;
- display: flex;
- align-items: center;
- justify-content: center;
- gap: 8px;
- transition: all 0.3s ease;
- }
- .background-btn:hover {
- background: #4f545c;
- }
- .background-btn:active {
- background: #40444b;
- }
- .background-btn .btn-icon {
- width: 20px;
- height: 20px;
- fill: #ffffff;
- }
- /* ==================== MCP工具样式 ==================== */
- .mcp-tools-container {
- background: #2f3136;
- border-radius: 8px;
- padding: 0;
- overflow: hidden;
- }
- .mcp-tools-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 16px 20px;
- background: #36393f;
- border-bottom: 1px solid #40444b;
- }
- .mcp-tools-header h3 {
- margin: 0;
- color: #ffffff;
- font-size: 16px;
- font-weight: 600;
- }
- .mcp-tools-panel {
- padding: 20px;
- }
- .mcp-tools-list {
- min-height: 200px;
- max-height: 300px;
- overflow-y: auto;
- margin-bottom: 16px;
- }
- /* MCP工具卡片样式 */
- .mcp-tool-card {
- background: #36393f;
- border: 1px solid #40444b;
- border-radius: 8px;
- padding: 16px;
- margin-bottom: 12px;
- transition: background-color 0.2s;
- }
- .mcp-tool-card:hover {
- background: #40444b;
- }
- .mcp-tool-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
- }
- .mcp-tool-name {
- font-weight: 600;
- color: white;
- font-size: 14px;
- }
- .mcp-tool-actions {
- display: flex;
- gap: 8px;
- }
- .mcp-edit-btn {
- padding: 4px 10px;
- border: none;
- border-radius: 4px;
- background-color: #2196f3;
- color: white;
- cursor: pointer;
- font-size: 12px;
- transition: background-color 0.2s;
- }
- .mcp-edit-btn:hover {
- background-color: #1976d2;
- }
- .mcp-delete-btn {
- padding: 4px 10px;
- border: none;
- border-radius: 4px;
- background-color: #f44336;
- color: white;
- cursor: pointer;
- font-size: 12px;
- transition: background-color 0.2s;
- }
- .mcp-delete-btn:hover {
- background-color: #d32f2f;
- }
- .mcp-tool-description {
- color: #b9bbbe;
- font-size: 13px;
- line-height: 1.4;
- margin-bottom: 12px;
- }
- .mcp-tool-info {
- background: #2f3136;
- border-radius: 4px;
- padding: 8px;
- }
- .mcp-tool-info-row {
- display: flex;
- justify-content: space-between;
- margin-bottom: 4px;
- }
- .mcp-tool-info-label {
- color: #b9bbbe;
- font-size: 12px;
- }
- .mcp-tool-info-value {
- color: white;
- font-size: 12px;
- font-weight: 500;
- }
- .mcp-actions {
- text-align: center;
- }
- .properties-container {
- background: #2f3136;
- border: 1px solid #40444b;
- border-radius: 6px;
- padding: 16px;
- margin-bottom: 12px;
- }
- .properties-container #addMcpPropertyBtn {
- display: block;
- margin: 0 auto;
- }
- .properties-container #addMcpPropertyBtn:hover {
- background: #4752c4;
- }
- .mcp-checkbox-label {
- display: flex;
- align-items: center;
- gap: 8px;
- margin-top: 8px;
- color: #b9bbbe;
- font-size: 13px;
- cursor: pointer;
- justify-content: flex-start;
- }
- .mcp-checkbox-label input[type="checkbox"] {
- width: 16px;
- height: 16px;
- cursor: pointer;
- }
- .mcp-property-name {
- color: white;
- font-size: 14px;
- font-weight: 500;
- }
- .mcp-property-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
- }
- .mcp-properties-list {
- display: flex;
- flex-wrap: wrap;
- gap: 12px;
- min-height: 60px;
- padding: 8px;
- }
- .input-group-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 8px;
- }
- .input-group-header label {
- margin-bottom: 0;
- }
- .input-group-header .properties-btn-primary {
- margin: 0;
- }
- .mcp-empty-state {
- text-align: center;
- padding: 20px;
- color: #999;
- font-size: 14px;
- width: 100%;
- display: none;
- }
- .properties-btn-primary {
- background: #2196f3;
- color: white;
- border: none;
- padding: 6px 12px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 12px;
- font-weight: 500;
- transition: background-color 0.2s;
- display: block;
- margin: 0 auto;
- }
- .properties-btn-primary:hover {
- background: #2196f3;
- }
- .mcp-property-card {
- background: #36393f;
- border: 1px solid #40444b;
- border-radius: 8px;
- padding: 12px;
- width: 100%;
- cursor: pointer;
- transition: all 0.2s ease;
- }
- .mcp-property-card:hover {
- background: #40444b;
- border-color: #5865f2;
- }
- .mcp-property-card:active {
- transform: none;
- }
- .mcp-property-row-label {
- display: flex;
- align-items: flex-start;
- margin-bottom: 6px;
- gap: 8px;
- }
- .mcp-property-label {
- color: #b9bbbe;
- font-size: 13px;
- width: 60px;
- flex-shrink: 0;
- text-align: left;
- }
- .mcp-property-value {
- color: white;
- font-size: 13px;
- flex: 1;
- word-break: break-all;
- }
- .mcp-property-required-badge {
- color: #f44336;
- font-size: 12px;
- }
- .mcp-property-row-action {
- display: flex;
- justify-content: flex-end;
- margin-top: 6px;
- padding-top: 6px;
- border-top: 1px solid #40444b;
- }
- .mcp-property-delete-btn {
- background: #f44336;
- color: white;
- border: none;
- padding: 4px 12px;
- border-radius: 4px;
- cursor: pointer;
- font-size: 11px;
- transition: background-color 0.2s;
- }
- .mcp-property-delete-btn:hover {
- background: #d32f2f;
- }
- .mcp-property-card-optional {
- background: #4f545c;
- color: #b9bbbe;
- font-size: 11px;
- padding: 2px 8px;
- border-radius: 4px;
- }
- .property-modal {
- max-width: 450px;
- }
- /* ==================== 音频可视化器样式 ==================== */
- .audio-visualizer {
- position: fixed;
- bottom: 100px;
- left: 20px;
- width: 200px;
- height: 60px;
- background: rgba(0, 0, 0, 0.3);
- backdrop-filter: blur(10px);
- border-radius: 10px;
- border: 1px solid rgba(255, 255, 255, 0.1);
- z-index: 999;
- }
- /* 滚动条样式 */
- .chat-stream::-webkit-scrollbar,
- .modal-body::-webkit-scrollbar,
- .mcp-tools-list::-webkit-scrollbar {
- width: 6px;
- }
- .chat-stream::-webkit-scrollbar-track,
- .modal-body::-webkit-scrollbar-track,
- .mcp-tools-list::-webkit-scrollbar-track {
- background: #2f3136;
- border-radius: 3px;
- }
- .chat-stream::-webkit-scrollbar-thumb,
- .modal-body::-webkit-scrollbar-thumb,
- .mcp-tools-list::-webkit-scrollbar-thumb {
- background: #40444b;
- border-radius: 3px;
- }
- .chat-stream::-webkit-scrollbar-thumb:hover,
- .modal-body::-webkit-scrollbar-thumb:hover,
- .mcp-tools-list::-webkit-scrollbar-thumb:hover {
- background: #4f545c;
- }
- /* ==================== 摄像头显示区域样式 ==================== */
- .camera-container {
- position: fixed;
- top: 20px;
- left: 20px;
- width: 180px;
- height: 240px;
- background: rgba(0, 0, 0, 0.5);
- backdrop-filter: blur(10px);
- border-radius: 8px;
- border: 1px solid rgba(255, 255, 255, 0.2);
- z-index: 1000;
- display: none;
- overflow: hidden;
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
- cursor: move;
- }
- .camera-container.active {
- display: block;
- }
- .camera-container.dragging {
- cursor: grabbing;
- box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
- border-color: rgba(88, 101, 242, 0.5);
- }
- @keyframes flipWithPosition {
- 0% {
- transform: var(--original-transform) rotateY(0deg);
- }
- 100% {
- transform: var(--original-transform) rotateY(180deg);
- }
- }
- .camera-container.flip {
- animation: flipWithPosition 0.5s ease-in-out 1 forwards;
- }
- #cameraVideo {
- width: 100%;
- height: 100%;
- object-fit: cover;
- background: #1a1a1a;
- pointer-events: none;
- transform: scaleX(-1);
- }
- .camera-switch-mask {
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
- .camera-switch-container {
- position: absolute;
- bottom: 10px;
- right: 10px;
- }
- .camera-switch {
- display: none;
- height: 20px;
- color: #fff;
- }
- .camera-switch .btn-icon {
- margin-bottom: 0;
- }
- .camera-switch.active {
- display: block;
- }
- /* ==================== 响应式设计 ==================== */
- @media (max-width: 768px) {
- .container {
- padding: 10px;
- }
- .live2d-section {
- height: 60vh;
- margin-bottom: 10px;
- }
- .live2d-canvas {
- max-width: 300px;
- max-height: 450px;
- }
- .control-bar {
- bottom: 10px;
- padding: 8px 16px;
- gap: 12px;
- }
- .control-btn {
- width: 50px;
- height: 50px;
- }
- .btn-icon {
- width: 20px;
- height: 20px;
- }
- .btn-text {
- font-size: 10px;
- }
- .chat-container {
- width: 230px;
- right: 10px;
- bottom: 105px;
- }
- .message-bubble {
- max-width: 200px;
- font-size: 12px;
- }
- .modal-content {
- width: 95%;
- margin: 10px;
- }
- .config-row {
- flex-direction: column;
- gap: 12px;
- }
- .audio-visualizer {
- width: 150px;
- height: 50px;
- left: 10px;
- bottom: 80px;
- }
- .chat-ipt input {
- font-size: 12px;
- }
- .camera-container {
- width: 130px;
- height: 180px;
- }
- .status-indicator {
- font-size: 12px;
- }
- }
- @media (max-width: 480px) {
- .live2d-section {
- height: 50vh;
- }
- .live2d-canvas {
- max-width: 250px;
- max-height: 350px;
- }
- .control-bar {
- gap: 8px;
- padding: 6px 12px;
- }
- .control-btn {
- width: 45px;
- height: 45px;
- }
- .btn-text {
- display: none;
- }
- .chat-stream {
- width: 200px;
- max-height: 150px;
- }
- .audio-visualizer {
- width: 120px;
- height: 40px;
- left: 5px;
- bottom: 70px;
- }
- }
- /* 竖屏优化 */
- @media (max-height: 700px) {
- .live2d-section {
- height: 55vh;
- }
- .live2d-canvas {
- max-height: 400px;
- }
- .chat-stream {
- bottom: 70px;
- max-height: 150px;
- }
- .audio-visualizer {
- bottom: 70px;
- }
- }
- /* 横屏优化 */
- @media (min-width: 1024px) and (min-height: 600px) {
- .live2d-section {
- height: 75vh;
- }
- .live2d-canvas {
- max-width: 500px;
- max-height: 650px;
- }
- .chat-stream {
- width: 350px;
- max-height: 250px;
- }
- .audio-visualizer {
- width: 250px;
- height: 80px;
- }
- }
|