* { margin: 0; padding: 0; box-sizing: border-box; } :root { --primary-color: #007AFF; --secondary-color: #5856D6; --background: #F5F5F7; --surface: #FFFFFF; --text-primary: #1D1D1F; --text-secondary: #86868B; --border-color: #D2D2D7; --shadow: 0 4px 20px rgba(0, 0, 0, 0.08); --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12); --radius: 18px; --radius-small: 12px; } body { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif; background: var(--background); color: var(--text-primary); line-height: 1.6; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .container { max-width: 900px; margin: 0 auto; padding: 20px; min-height: 100vh; display: flex; flex-direction: column; } /* Header */ .header { text-align: center; padding: 40px 20px 30px; display: flex; flex-direction: column; align-items: center; gap: 15px; } .header-content { display: flex; flex-direction: column; gap: 8px; } .title { font-size: 48px; font-weight: 700; letter-spacing: -0.5px; } .gradient-text { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; } .subtitle { font-size: 16px; color: var(--text-secondary); font-weight: 400; } .built-with { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; background: rgba(0, 122, 255, 0.1); color: var(--primary-color); text-decoration: none; border-radius: 20px; font-size: 14px; font-weight: 500; transition: all 0.3s ease; } .built-with:hover { background: rgba(0, 122, 255, 0.15); transform: translateY(-2px); } /* Model Status */ .model-status { background: var(--surface); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; box-shadow: var(--shadow); } .status-content { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .loader { width: 20px; height: 20px; border: 3px solid var(--border-color); border-top-color: var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } .model-status.ready .loader { display: none; } .model-status.ready .status-content::before { content: "✓"; width: 20px; height: 20px; background: #34C759; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; } #statusText { font-size: 14px; font-weight: 500; color: var(--text-primary); } .progress-bar { width: 100%; height: 4px; background: var(--border-color); border-radius: 2px; overflow: hidden; } .progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); width: 0%; transition: width 0.3s ease; } .model-status.ready .progress-bar { display: none; } /* Chat Container */ .chat-container { flex: 1; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; } .chat-messages { flex: 1; overflow-y: auto; padding: 30px; display: flex; flex-direction: column; gap: 20px; } .chat-messages::-webkit-scrollbar { width: 8px; } .chat-messages::-webkit-scrollbar-track { background: transparent; } .chat-messages::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; } .chat-messages::-webkit-scrollbar-thumb:hover { background: var(--text-secondary); } /* Welcome Message */ .welcome-message { text-align: center; padding: 60px 20px; color: var(--text-secondary); } .welcome-icon { font-size: 64px; margin-bottom: 20px; } .welcome-message h2 { font-size: 28px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; } .welcome-message p { font-size: 16px; max-width: 400px; margin: 0 auto; } /* Message Bubbles */ .message { display: flex; gap: 12px; animation: slideIn 0.3s ease; } @keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } } .message.user { flex-direction: row-reverse; } .message-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; } .message.user .message-avatar { background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)); } .message.assistant .message-avatar { background: var(--border-color); } .message-content { max-width: 70%; padding: 14px 18px; border-radius: var(--radius-small); font-size: 15px; line-height: 1.5; } .message.user .message-content { background: var(--primary-color); color: white; border-bottom-right-radius: 4px; } .message.assistant .message-content { background: var(--background); color: var(--text-primary); border-bottom-left-radius: 4px; } .message-content p { margin: 0 0 8px 0; } .message-content p:last-child { margin-bottom: 0; } .message-content code { background: rgba(0, 0, 0, 0.1); padding: 2px 6px; border-radius: 4px; font-family: 'SF Mono', Monaco, monospace; font-size: 13px; } .message.user .message-content code { background: rgba(255, 255, 255, 0.2); } .typing-indicator { display: flex; gap: 4px; padding: 14px 18px; } .typing-dot { width: 8px; height: 8px; background: var(--text-secondary); border-radius: 50%; animation: typing 1.4s infinite; } .typing-dot:nth-child(2) { animation-delay: 0.2s; } .typing-dot:nth-child(3) { animation-delay: 0.4s; } @keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.7; } 30% { transform: translateY(-10px); opacity: 1; } } /* Input Area */ .input-container { padding: 20px; border-top: 1px solid var(--border-color); background: var(--surface); } .input-wrapper { display: flex; gap: 12px; align-items: flex-end; } .user-input { flex: 1; padding: 14px 18px; border: 2px solid var(--border-color); border-radius: var(--radius-small); font-size: 15px; font-family: inherit; resize: none; max-height: 120px; transition: all 0.3s ease; background: var(--background); } .user-input:focus { outline: none; border-color: var(--primary-color); background: var(--surface); } .user-input:disabled { opacity: 0.5; cursor: not-allowed; } .send-button { width: 48px; height: 48px; border: none; border-radius: 50%; background: var(--primary-color); color: white; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; flex-shrink: 0; } .send-button:hover:not(:disabled) { background: var(--secondary-color); transform: scale(1.05); } .send-button:active:not(:disabled) { transform: scale(0.95); } .send-button:disabled { opacity: 0.5; cursor: not-allowed; } .input-hint { margin-top: 8px; font-size: 12px; color: var(--text-secondary); text-align: center; } /* Responsive */ @media (max-width: 768px) { .container { padding: 10px; } .header { padding: 20px 10px 15px; } .title { font-size: 36px; } .chat-messages { padding: 20px 15px; } .message-content { max-width: 85%; } .welcome-message { padding: 40px 15px; } .welcome-icon { font-size: 48px; } .welcome-message h2 { font-size: 24px; } }