Spaces:
Running
Running
| /* Apple-inspired Design System */ | |
| :root { | |
| --primary-color: #007AFF; | |
| --secondary-color: #5856D6; | |
| --background-color: #F2F2F7; | |
| --surface-color: #FFFFFF; | |
| --text-primary: #000000; | |
| --text-secondary: #8E8E93; | |
| --border-color: #C6C6C8; | |
| --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1); | |
| --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1); | |
| --shadow-heavy: 0 8px 24px rgba(0, 0, 0, 0.12); | |
| --radius-small: 8px; | |
| --radius-medium: 12px; | |
| --radius-large: 20px; | |
| --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1); | |
| --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1); | |
| } | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; | |
| background-color: var(--background-color); | |
| color: var(--text-primary); | |
| height: 100vh; | |
| overflow: hidden; | |
| } | |
| .app-container { | |
| display: flex; | |
| flex-direction: column; | |
| height: 100vh; | |
| max-width: 900px; | |
| margin: 0 auto; | |
| background-color: var(--surface-color); | |
| box-shadow: var(--shadow-heavy); | |
| } | |
| /* Header */ | |
| .header { | |
| background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); | |
| color: white; | |
| padding: 1rem 1.5rem; | |
| box-shadow: var(--shadow-medium); | |
| z-index: 100; | |
| } | |
| .header-content { | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| } | |
| .header-left { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.75rem; | |
| } | |
| .header-left i { | |
| font-size: 1.5rem; | |
| } | |
| .header h1 { | |
| font-size: 1.25rem; | |
| font-weight: 600; | |
| } | |
| .header-right { | |
| display: flex; | |
| align-items: center; | |
| gap: 1rem; | |
| } | |
| .anycoder-link { | |
| color: white; | |
| text-decoration: none; | |
| font-size: 0.875rem; | |
| opacity: 0.9; | |
| transition: opacity var(--transition-fast); | |
| } | |
| .anycoder-link:hover { | |
| opacity: 1; | |
| text-decoration: underline; | |
| } | |
| .model-status { | |
| display: flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| padding: 0.25rem 0.75rem; | |
| background: rgba(255, 255, 255, 0.2); | |
| border-radius: 20px; | |
| font-size: 0.875rem; | |
| } | |
| .status-dot { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: #FF3B30; | |
| } | |
| .status-dot.loading { | |
| background: #FF9500; | |
| animation: pulse 1.5s infinite; | |
| } | |
| .status-dot.ready { | |
| background: #34C759; | |
| } | |
| @keyframes pulse { | |
| 0%, 100% { opacity: 1; } | |
| 50% { opacity: 0.5; } | |
| } | |
| /* Chat Container */ | |
| .chat-container { | |
| flex: 1; | |
| overflow: hidden; | |
| display: flex; | |
| flex-direction: column; | |
| position: relative; | |
| } | |
| .chat-messages { | |
| flex: 1; | |
| overflow-y: auto; | |
| padding: 1.5rem; | |
| scroll-behavior: smooth; | |
| } | |
| .chat-messages::-webkit-scrollbar { | |
| width: 4px; | |
| } | |
| .chat-messages::-webkit-scrollbar-track { | |
| background: transparent; | |
| } | |
| .chat-messages::-webkit-scrollbar-thumb { | |
| background: var(--border-color); | |
| border-radius: 2px; | |
| } | |
| /* Messages */ | |
| .message { | |
| margin-bottom: 1.5rem; | |
| opacity: 0; | |
| transform: translateY(10px); | |
| transition: all var(--transition-smooth); | |
| } | |
| .message.system { | |
| text-align: center; | |
| } | |
| .message.system .message-content { | |
| display: inline-block; | |
| padding: 0.75rem 1.5rem; | |
| background: var(--background-color); | |
| border-radius: var(--radius-large); | |
| color: var(--text-secondary); | |
| font-size: 0.875rem; | |
| } | |
| .message.system i { | |
| margin-right: 0.5rem; | |
| color: var(--primary-color); | |
| } | |
| .message.user .message-content { | |
| display: flex; | |
| justify-content: flex-end; | |
| gap: 0.75rem; | |
| } | |
| .message.assistant .message-content { | |
| display: flex; | |
| gap: 0.75rem; | |
| } | |
| .avatar { | |
| width: 36px; | |
| height: 36px; | |
| border-radius: 50%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| flex-shrink: 0; | |
| font-size: 1rem; | |
| } | |
| .avatar.user { | |
| background: var(--primary-color); | |
| color: white; | |
| } | |
| .avatar:not(.user) { | |
| background: var(--background-color); | |
| color: var(--text-secondary); | |
| } | |
| .message-content-inner { | |
| max-width: 70%; | |
| } | |
| .message-role { | |
| font-size: 0.75rem; | |
| color: var(--text-secondary); | |
| margin-bottom: 0.25rem; | |
| font-weight: 500; | |
| } | |
| .message-text { | |
| padding: 0.75rem 1rem; | |
| background: var(--background-color); | |
| border-radius: var(--radius-medium); | |
| line-height: 1.5; | |
| word-wrap: break-word; | |
| } | |
| .message.user .message-text { | |
| background: var(--primary-color); | |
| color: white; | |
| } | |
| .message.error .message-text { | |
| background: #FF3B30; | |
| color: white; | |
| } | |
| /* Typing Indicator */ | |
| .typing-indicator { | |
| padding: 0 1.5rem 1.5rem; | |
| } | |
| .typing-dots { | |
| display: flex; | |
| gap: 0.25rem; | |
| padding: 0.75rem 1rem; | |
| } | |
| .typing-dots span { | |
| width: 8px; | |
| height: 8px; | |
| border-radius: 50%; | |
| background: var(--text-secondary); | |
| animation: typing 1.4s infinite; | |
| } | |
| .typing-dots span:nth-child(2) { | |
| animation-delay: 0.2s; | |
| } | |
| .typing-dots span:nth-child(3) { | |
| animation-delay: 0.4s; | |
| } | |
| @keyframes typing { | |
| 0%, 60%, 100% { | |
| transform: translateY(0); | |
| opacity: 0.5; | |
| } | |
| 30% { | |
| transform: translateY(-10px); | |
| opacity: 1; | |
| } | |
| } | |
| /* Input Container */ | |
| .input-container { | |
| background: var(--surface-color); | |
| border-top: 1px solid var(--border-color); | |
| padding: 1rem 1.5rem; | |
| } | |
| .input-wrapper { | |
| max-width: 100%; | |
| } | |
| .input-group { | |
| display: flex; | |
| gap: 0.75rem; | |
| align-items: flex-end; | |
| } | |
| #messageInput { | |
| flex: 1; | |
| padding: 0.75rem 1rem; | |
| border: 1px solid var(--border-color); | |
| border-radius: var(--radius-medium); | |
| font-size: 1rem; | |
| font-family: inherit; | |
| resize: none; | |
| outline: none; | |
| transition: all var(--transition-fast); | |
| background: var(--background-color); | |
| min-height: 44px; | |
| max-height: 120px; | |
| } | |
| #messageInput:focus { | |
| border-color: var(--primary-color); | |
| background: var(--surface-color); | |
| box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1); | |
| } | |
| .send-button { | |
| width: 44px; | |
| height: 44px; | |
| border-radius: 50%; | |
| border: none; | |
| background: var(--primary-color); | |
| color: white; | |
| cursor: pointer; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| transition: all var(--transition-fast); | |
| font-size: 1rem; | |
| } | |
| .send-button:hover:not(:disabled) { | |
| background: #0056CC; | |
| transform: scale(1.05); | |
| } | |
| .send-button:active:not(:disabled) { | |
| transform: scale(0.95); | |
| } | |
| .send-button:disabled { | |
| background: var(--border-color); | |
| cursor: not-allowed; | |
| opacity: 0.6; | |
| } | |
| .input-info { | |
| margin-top: 0.5rem; | |
| text-align: right; | |
| } | |
| #charCount { | |
| font-size: 0.75rem; | |
| color: var(--text-secondary); | |
| } | |
| /* Loading Overlay */ | |
| .loading-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| right: 0; | |
| bottom: 0; | |
| background: rgba(0, 0, 0, 0.8); | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: 1000; | |
| transition: opacity var(--transition-smooth); | |
| } | |
| .loading-content { | |
| background: var(--surface-color); | |
| padding: 2.5rem; | |
| border-radius: var(--radius-large); | |
| text-align: center; | |
| max-width: 400px; | |
| box-shadow: var(--shadow-heavy); | |
| } | |
| .loading-spinner { | |
| margin-bottom: 1.5rem; | |
| } | |
| .spinner { | |
| width: 50px; | |
| height: 50px; | |
| border: 3px solid var(--border-color); | |
| border-top-color: var(--primary-color); | |
| border-radius: 50%; | |
| animation: spin 1s linear infinite; | |
| margin: 0 auto; | |
| } | |
| @keyframes spin { | |
| to { transform: rotate(360deg); } | |
| } | |
| .loading-content h2 { | |
| font-size: 1.5rem; | |
| margin-bottom: 0.75rem; | |
| color: var(--text-primary); | |
| } | |
| .loading-content p { | |
| color: var(--text-secondary); | |
| margin-bottom: 1.5rem; | |
| line-height: 1.5; | |
| } | |
| .progress-bar { | |
| width: 100%; | |
| height: 6px; | |
| background: var(--background-color); | |
| border-radius: 3px; | |
| overflow: hidden; | |
| margin-bottom: 0.75rem; | |
| } | |
| .progress-fill { | |
| height: 100%; | |
| background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); | |
| border-radius: 3px; | |
| transition: width 0.3s ease; | |
| width: 0%; | |
| } | |
| .progress-text { | |
| font-size: 0.875rem; | |
| color: var(--text-secondary); | |
| font-weight: 500; | |
| } | |
| .error-content { | |
| padding: 1rem; | |
| } | |
| .error-content i { | |
| font-size: 3rem; | |
| color: #FF3B30; | |
| margin-bottom: 1rem; | |
| } | |
| .error-content h2 { | |
| color: #FF3B30; | |
| } | |
| .retry-button { | |
| margin-top: 1rem; | |
| padding: 0.75rem 1.5rem; | |
| background: var(--primary-color); | |
| color: white; | |
| border: none; | |
| border-radius: var(--radius-medium); | |
| cursor: pointer; | |
| font-size: 1rem; | |
| transition: all var(--transition-fast); | |
| display: inline-flex; | |
| align-items: center; | |
| gap: 0.5rem; | |
| } | |
| .retry-button:hover { | |
| background: #0056CC; | |
| } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| .app-container { | |
| height: 100vh; | |
| max-width: 100%; | |
| box-shadow: none; | |
| } | |
| .header { | |
| padding: 1rem; | |
| } | |
| .header-content { | |
| flex-direction: column; | |
| gap: 0.75rem; | |
| text-align: center; | |
| } | |
| .model-status { | |
| display: none; | |
| } | |
| .message-content-inner { | |
| max-width: 85%; | |
| } | |
| .chat-messages { | |
| padding: 1rem; | |
| } | |
| .input-container { | |
| padding: 0.75rem 1rem; | |
| } | |
| } | |
| /* Dark mode support */ | |
| @media (prefers-color-scheme: dark) { | |
| :root { | |
| --background-color: #000000; | |
| --surface-color: #1C1C1E; | |
| --text-primary: #FFFFFF; | |
| --text-secondary: #8E8E93; | |
| --border-color: #38383A; | |
| } | |
| .header { | |
| background: linear-gradient(135deg, #0056CC, #4444AA); | |
| } | |
| #messageInput { | |
| background: #2C2C2E; | |
| color: var(--text-primary); | |
| } | |
| #messageInput:focus { | |
| background: var(--surface-color); | |
| } | |
| .message-text { | |
| background: #2C2C2E; | |
| } | |
| .message.system .message-content { | |
| background: #2C2C2E; | |
| } | |
| } |