Spaces:
Sleeping
Sleeping
Update src/App.css
Browse files- src/App.css +135 -32
src/App.css
CHANGED
|
@@ -1,58 +1,161 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
-
|
|
|
|
|
|
|
| 3 |
text-align: center;
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
.
|
| 7 |
-
|
| 8 |
-
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
}
|
| 15 |
}
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
display: flex;
|
| 21 |
flex-direction: column;
|
| 22 |
-
align-items: center;
|
| 23 |
-
justify-content: center;
|
| 24 |
-
font-size: calc(10px + 2vmin);
|
| 25 |
-
color: white;
|
| 26 |
-
}
|
| 27 |
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
| 42 |
display: flex;
|
| 43 |
-
flex-direction: column;
|
| 44 |
-
justify-content: center; /* vertically center */
|
| 45 |
-
align-items: center; /* horizontally center */
|
| 46 |
-
height: 100%;
|
| 47 |
}
|
| 48 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
.input-row {
|
| 50 |
-
width: 60%;
|
| 51 |
display: flex;
|
|
|
|
| 52 |
justify-content: center;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
}
|
| 54 |
|
|
|
|
| 55 |
.input-row textarea {
|
| 56 |
-
width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Reset */
|
| 2 |
+
* {
|
| 3 |
+
box-sizing: border-box;
|
| 4 |
+
margin: 0;
|
| 5 |
+
padding: 0;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
body, html, #root {
|
| 9 |
+
height: 100%;
|
| 10 |
+
background: #0a0f1f;
|
| 11 |
+
font-family: system-ui, sans-serif;
|
| 12 |
+
color: #f0f0f0;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
/* App container */
|
| 16 |
+
.app-root {
|
| 17 |
+
display: flex;
|
| 18 |
+
flex-direction: column;
|
| 19 |
+
height: 100%;
|
| 20 |
+
}
|
| 21 |
|
| 22 |
+
/* Header */
|
| 23 |
+
.header {
|
| 24 |
+
padding: 1rem 1.5rem;
|
| 25 |
text-align: center;
|
| 26 |
+
border-bottom: 1px solid rgba(255,255,255,0.1);
|
| 27 |
}
|
| 28 |
|
| 29 |
+
.header h1 {
|
| 30 |
+
font-size: 1.6rem;
|
| 31 |
+
font-weight: 600;
|
| 32 |
}
|
| 33 |
|
| 34 |
+
.strict-toggle {
|
| 35 |
+
margin-top: 0.5rem;
|
| 36 |
+
font-size: 0.9rem;
|
|
|
|
| 37 |
}
|
| 38 |
|
| 39 |
+
/* ---- MAIN CHAT AREA ---- */
|
| 40 |
+
.main {
|
| 41 |
+
flex: 1;
|
| 42 |
display: flex;
|
| 43 |
flex-direction: column;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
/* ⭐ THIS CENTERS THE TEXT BOX IN THE SCREEN ⭐ */
|
| 46 |
+
justify-content: center; /* vertical centering */
|
| 47 |
+
align-items: center; /* horizontal centering */
|
| 48 |
+
|
| 49 |
+
padding: 2rem 1rem;
|
| 50 |
}
|
| 51 |
|
| 52 |
+
/* Messages window */
|
| 53 |
+
.messages {
|
| 54 |
+
width: 100%;
|
| 55 |
+
max-width: 700px;
|
| 56 |
+
height: 50vh;
|
| 57 |
+
|
| 58 |
+
background: rgba(255,255,255,0.05);
|
| 59 |
+
border: 1px solid rgba(255,255,255,0.1);
|
| 60 |
+
|
| 61 |
+
padding: 1rem;
|
| 62 |
+
overflow-y: auto;
|
| 63 |
+
|
| 64 |
+
border-radius: 10px;
|
| 65 |
+
margin-bottom: 1.5rem; /* pushes textbox down */
|
| 66 |
}
|
| 67 |
|
| 68 |
+
/* Each message */
|
| 69 |
+
.message {
|
| 70 |
+
margin-bottom: 1rem;
|
| 71 |
display: flex;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
}
|
| 73 |
|
| 74 |
+
.message.user {
|
| 75 |
+
justify-content: flex-end;
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.bubble {
|
| 79 |
+
padding: 0.75rem 1rem;
|
| 80 |
+
border-radius: 8px;
|
| 81 |
+
max-width: 75%;
|
| 82 |
+
line-height: 1.4;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.message.user .bubble {
|
| 86 |
+
background: #2563eb;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.message.assistant .bubble {
|
| 90 |
+
background: rgba(255,255,255,0.15);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
/* Debug panel */
|
| 94 |
+
.debug {
|
| 95 |
+
margin-top: 0.25rem;
|
| 96 |
+
font-size: 0.8rem;
|
| 97 |
+
opacity: 0.9;
|
| 98 |
+
}
|
| 99 |
+
|
| 100 |
+
.debug summary {
|
| 101 |
+
cursor: pointer;
|
| 102 |
+
color: #9ca3af;
|
| 103 |
+
}
|
| 104 |
+
|
| 105 |
+
/* ---- INPUT AREA ---- */
|
| 106 |
.input-row {
|
|
|
|
| 107 |
display: flex;
|
| 108 |
+
flex-direction: row;
|
| 109 |
justify-content: center;
|
| 110 |
+
align-items: center;
|
| 111 |
+
|
| 112 |
+
width: 100%;
|
| 113 |
+
max-width: 700px;
|
| 114 |
+
gap: 0.75rem;
|
| 115 |
}
|
| 116 |
|
| 117 |
+
/* ⭐ THIS MAKES THE TEXTBOX CENTERED AND NICE ⭐ */
|
| 118 |
.input-row textarea {
|
| 119 |
+
width: 70%;
|
| 120 |
+
border-radius: 10px;
|
| 121 |
+
border: 1px solid rgba(255,255,255,0.3);
|
| 122 |
+
background: rgba(255,255,255,0.1);
|
| 123 |
+
color: white;
|
| 124 |
+
padding: 0.75rem;
|
| 125 |
+
font-size: 1rem;
|
| 126 |
+
resize: vertical;
|
| 127 |
+
min-height: 60px;
|
| 128 |
+
}
|
| 129 |
+
|
| 130 |
+
.input-row textarea:focus {
|
| 131 |
+
outline: 2px solid #2563eb;
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
/* Send button */
|
| 135 |
+
.input-row button {
|
| 136 |
+
padding: 0.75rem 1.25rem;
|
| 137 |
+
background: #22c55e;
|
| 138 |
+
color: black;
|
| 139 |
+
font-weight: 600;
|
| 140 |
+
border-radius: 8px;
|
| 141 |
+
border: none;
|
| 142 |
+
cursor: pointer;
|
| 143 |
+
font-size: 1rem;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.input-row button:disabled {
|
| 147 |
+
opacity: 0.5;
|
| 148 |
+
cursor: not-allowed;
|
| 149 |
}
|
| 150 |
|
| 151 |
+
/* Error box */
|
| 152 |
+
.error {
|
| 153 |
+
margin-top: 1rem;
|
| 154 |
+
padding: 0.75rem;
|
| 155 |
+
background: rgba(255,0,0,0.2);
|
| 156 |
+
border: 1px solid rgba(255,0,0,0.4);
|
| 157 |
+
border-radius: 8px;
|
| 158 |
+
text-align: center;
|
| 159 |
+
width: 100%;
|
| 160 |
+
max-width: 700px;
|
| 161 |
+
}
|