@tailwind base; @tailwind components; @tailwind utilities; /* ===== 昔涟主题全局样式 ===== */ @layer base { * { margin: 0; padding: 0; box-sizing: border-box; } html, body, #root { height: 100%; overflow: hidden; } body { font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: #FFFAF5; } ::selection { background: rgba(244, 114, 182, 0.3); color: #9d174d; } /* 滚动条美化 */ ::-webkit-scrollbar { width: 6px; } ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: rgba(244, 114, 182, 0.3); border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { background: rgba(244, 114, 182, 0.5); } } /* ===== 动画 ===== */ @layer utilities { .animate-bounce { animation: bounce 0.8s ease-in-out infinite; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } } } /* ===== 流式渲染动画 ===== */ @keyframes fadeInUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } } @keyframes cursorBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } /* 流式消息容器:轻微淡入效果 */ .message-streaming { animation: fadeInUp 0.3s ease-out; } /* 独立的闪烁光标工具类,可用于显式 span 元素 */ .animate-streaming-cursor { display: inline; } .animate-streaming-cursor::after { content: '▊'; animation: cursorBlink 1s step-end infinite; color: #7c3aed; margin-left: 2px; } /* ===== 聊天背景 ===== */ .chat-background { position: relative; isolation: isolate; background-image: url('/images/Cyrene_ChatBackground/Vertical/2nd_Form/1.png'); background-size: cover; background-position: center; background-attachment: fixed; } /* 半透明遮罩:避免背景色彩过于鲜艳影响阅读 */ .chat-background::before { content: ''; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.5); pointer-events: none; z-index: -1; } /* 横屏时使用 Landscape 背景 */ @media (orientation: landscape) { .chat-background { background-image: url('/images/Cyrene_ChatBackground/Landscape/3rd_Form/1.png'); } } /* 深色模式 */ @media (prefers-color-scheme: dark) { body { background: #1a1a2e; } ::selection { background: rgba(244, 114, 182, 0.2); color: #fbcfe8; } .chat-background::before { background: rgba(0, 0, 0, 0.4); } } /* ===== 语音识别动画 ===== */ @keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); } 50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); } } .voice-btn-active { animation: voice-pulse 1.5s ease-in-out infinite; } /* 实时识别文本淡入效果 */ @keyframes interim-fade { from { opacity: 0.5; } to { opacity: 0.9; } } .interim-text { animation: interim-fade 0.3s ease-in-out; } /* ===== TTS 文字转语音动画 ===== */ @keyframes tts-wave { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.85; } } .tts-playing { animation: tts-wave 1s ease-in-out infinite; }