Spaces:
Sleeping
Sleeping
| body { | |
| font-family: 'Roboto', sans-serif; | |
| background: #121212; | |
| color: #ffffff; | |
| margin: 0; | |
| display: flex; | |
| justify-content: center; | |
| align-items: center; | |
| min-height: 100vh; | |
| padding: 0 16px; | |
| } | |
| .chat-container { | |
| background: #1f1f1f; | |
| border-radius: 12px; | |
| box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3); | |
| padding: 20px; | |
| max-width: 700px; | |
| width: 100%; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| h2 { | |
| text-align: center; | |
| color: #bb86fc; | |
| margin-bottom: 20px; | |
| font-weight: 500; | |
| } | |
| .chat-box { | |
| flex-grow: 1; | |
| max-height: 420px; | |
| overflow-y: auto; | |
| padding: 12px; | |
| border: 1px solid #2d2d2d; | |
| border-radius: 8px; | |
| background: #2a2a2a; | |
| margin-bottom: 16px; | |
| display: flex; | |
| flex-direction: column; | |
| } | |
| .message { | |
| display: block; /* ensures full-width layout */ | |
| width: fit-content; | |
| max-width: 85%; | |
| margin-bottom: 12px; | |
| padding: 10px 14px; | |
| border-radius: 16px; | |
| line-height: 1.5; | |
| word-wrap: break-word; | |
| } | |
| .message.user { | |
| align-self: flex-end; | |
| margin-left: auto; | |
| background: #333c4d; | |
| color: #e3f2fd; | |
| border-bottom-right-radius: 0; | |
| } | |
| .message.assistant { | |
| align-self: flex-start; | |
| margin-right: auto; | |
| background: #383838; | |
| border-bottom-left-radius: 0; | |
| } | |
| .text-content { | |
| white-space: pre-wrap; | |
| } | |
| .input-area { | |
| display: flex; | |
| gap: 10px; | |
| } | |
| textarea { | |
| flex-grow: 1; | |
| padding: 10px 12px; | |
| resize: none; | |
| border-radius: 6px; | |
| background: #2a2a2a; | |
| color: #fff; | |
| border: 1px solid #444; | |
| font-size: 14px; | |
| } | |
| button { | |
| background: #6200ee; | |
| color: white; | |
| border: none; | |
| border-radius: 6px; | |
| padding: 10px 16px; | |
| font-size: 14px; | |
| font-weight: 500; | |
| cursor: pointer; | |
| transition: background 0.3s; | |
| } | |
| button:hover { | |
| background: #3700b3; | |
| } | |
| .typing-indicator { | |
| display: flex; | |
| gap: 6px; | |
| margin: 6px 0 12px; | |
| } | |
| .dot { | |
| width: 8px; | |
| height: 8px; | |
| background-color: #bb86fc; | |
| border-radius: 50%; | |
| animation: blink 1.4s infinite both; | |
| } | |
| .dot:nth-child(2) { | |
| animation-delay: 0.2s; | |
| } | |
| .dot:nth-child(3) { | |
| animation-delay: 0.4s; | |
| } | |
| @keyframes blink { | |
| 0%, 80%, 100% { opacity: 0.2; } | |
| 40% { opacity: 1; } | |
| } | |
| .code-block { | |
| position: relative; | |
| background: #1e1e1e; | |
| color: #eee; | |
| padding: 12px; | |
| border-radius: 8px; | |
| margin-top: 8px; | |
| } | |
| .copy-btn { | |
| position: absolute; | |
| top: 8px; | |
| right: 12px; | |
| background: #444; | |
| color: #fff; | |
| border: none; | |
| padding: 4px 8px; | |
| font-size: 12px; | |
| border-radius: 4px; | |
| cursor: pointer; | |
| } | |
| .copy-btn:hover { | |
| background: #666; | |
| } | |
| @media (max-width: 600px) { | |
| .chat-box { | |
| max-height: 60vh; | |
| } | |
| button { | |
| padding: 8px 14px; | |
| } | |
| } | |
| .timestamp { | |
| font-size: 11px; | |
| color: #aaa; | |
| margin-top: 4px; | |
| display: block; | |
| } | |
| .timestamp.user { | |
| text-align: right; | |
| } | |
| .timestamp.assistant { | |
| text-align: left; | |
| } | |
| .code-line { | |
| display: flex; | |
| } | |
| .line-number { | |
| width: 30px; | |
| color: #888; | |
| text-align: right; | |
| padding-right: 12px; | |
| user-select: none; | |
| } | |
| .line-content { | |
| flex-grow: 1; | |
| white-space: pre-wrap; | |
| } | |
| .code-block-wrapper { | |
| position: relative; | |
| background: #2d2d2d; | |
| border-radius: 8px; | |
| margin: 10px 0; | |
| padding-top: 1.5em; | |
| overflow: auto; | |
| } | |
| .language-label { | |
| position: absolute; | |
| top: 0; | |
| right: 10px; | |
| background: #444; | |
| color: #fff; | |
| padding: 2px 8px; | |
| font-size: 0.75em; | |
| border-bottom-left-radius: 4px; | |
| } | |
| .copy-btn { | |
| position: absolute; | |
| top: 0; | |
| left: 10px; | |
| background: transparent; | |
| color: white; | |
| border: none; | |
| font-size: 0.9em; | |
| cursor: pointer; | |
| } | |
| pre[class*="language-"] { | |
| white-space: pre-wrap ; | |
| word-break: break-word; | |
| overflow-x: auto; | |
| } | |
| .chat-image { | |
| max-width: 100%; | |
| height: auto; | |
| margin-top: 10px; | |
| border-radius: 6px; | |
| box-shadow: 0 2px 8px rgba(0,0,0,0.1); | |
| } | |