cchat/static/css/index.css
2024-07-20 06:07:29 +02:00

471 lines
9.2 KiB
CSS

:root {
--primary-color: #ff71ce;
--primary-color-transparent: #ff71ce66;
--secondary-color: #01cdfe;
--secondary-color-transparent: #01cdfe66;
--red-color: #ff71ce;
--green-color: #05ffa1;
--silver-color: #b967ff;
}
@media (prefers-color-scheme: light) {
:root {
--primary-bg-color: #fffcf9;
--secondary-bg-color: #ffd1dc;
--tertiary-bg-color: #fbcff3;
--foreground-color: #2d0036;
--accent-color: #b967ff;
}
}
@media (prefers-color-scheme: dark) {
:root {
--primary-bg-color: #16001e;
--secondary-bg-color: #2d0036;
--tertiary-bg-color: #3d004d;
--foreground-color: #fffcf9;
--accent-color: #05ffa1;
}
}
main {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
place-items: center;
background: linear-gradient(
45deg,
var(--primary-bg-color),
var(--secondary-bg-color)
);
}
.home {
width: 100%;
height: 90%;
margin-bottom: 10rem;
}
.title {
font-size: 4rem;
margin: 1rem 0;
margin-top: 3rem;
color: var(--primary-color);
text-shadow: 2px 2px var(--secondary-color);
transition: all 0.9s ease;
}
.histories-container-container {
width: 100%;
max-height: 80%;
position: relative;
}
.histories-container {
overflow-y: auto;
overflow-x: hidden;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
gap: 1rem;
align-items: center;
margin: 0;
padding: 3rem 1rem;
}
.histories-start,
.histories-end {
height: 2rem;
width: 100%;
z-index: 999;
position: absolute;
}
.histories-start {
top: 0;
background: linear-gradient(
180deg,
var(--primary-bg-color) 0%,
transparent 100%
);
}
.histories-end {
bottom: 0;
background: linear-gradient(
0deg,
var(--primary-bg-color) 0%,
transparent 100%
);
}
.history {
padding: 1rem;
width: 100%;
max-width: 40rem;
background-color: var(--tertiary-bg-color);
border-radius: 10px;
border-left: 2px solid var(--primary-color);
cursor: pointer;
transform: translateX(calc(1px * var(--tx, 0)));
opacity: var(--opacity, 1);
transition: all 0.5s ease;
}
.history:hover {
background-color: var(--secondary-bg-color);
transform: scale(1.05);
}
.history-delete-button {
position: absolute;
top: 0;
right: 0;
padding: 0.5rem;
margin: 0;
outline: none;
border: none;
background-color: var(--secondary-color);
color: var(--foreground-color);
border-radius: 0 0 0 10px;
cursor: pointer;
transition: 0.2s;
}
.history-delete-button:hover {
background-color: var(--primary-color);
padding: 0.75rem;
}
.messages {
overflow-y: auto;
height: 100%;
width: 100%;
display: flex;
flex-direction: column;
gap: 1rem;
align-items: center;
padding-top: 1rem;
padding-bottom: 11rem;
font-size: 0.8rem;
}
.message {
width: 96%;
max-width: 80rem;
display: grid;
background-color: var(--secondary-bg-color);
padding: 0.5rem 1rem;
border-radius: 10px;
transition: all 0.3s ease;
}
.message-role-assistant {
border-bottom: 2px solid var(--primary-color);
border-left: 2px solid var(--primary-color);
box-shadow: -10px 10px 10px 2px var(--primary-color-transparent);
margin-right: auto;
margin-left: 2%;
}
.message-role-user {
border-bottom: 2px solid var(--secondary-color);
border-right: 2px solid var(--secondary-color);
box-shadow: 10px 10px 10px 2px var(--secondary-color-transparent);
margin-left: auto;
margin-right: 2%;
}
.message > pre {
white-space: pre-wrap;
}
.hljs {
width: 100%;
position: relative;
border-radius: 10px;
white-space: pre-wrap;
background-color: var(--tertiary-bg-color);
}
.clipboard-button {
position: absolute;
top: 0;
right: 0;
padding: 0.5rem;
margin: 0;
outline: none;
border: none;
background-color: var(--secondary-color);
color: var(--foreground-color);
border-radius: 0 0 0 10px;
cursor: pointer;
transition: 0.2s;
}
.clipboard-button:hover {
background-color: var(--primary-color);
padding: 0.75rem;
}
.input-container {
position: absolute;
bottom: 0;
background: linear-gradient(
0deg,
var(--primary-bg-color) 55%,
transparent 100%
);
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 999;
}
.input-performance {
margin-top: 4rem;
display: flex;
flex-direction: row;
gap: 1rem;
}
.input-performance-point {
display: flex;
flex-direction: row;
place-items: center;
gap: 0.5rem;
}
.input-performance-point > p {
height: 1rem;
line-height: normal;
}
.input {
width: 90%;
min-height: 3rem;
flex-shrink: 0;
display: flex;
flex-direction: row;
justify-content: center;
gap: 0.5rem;
align-items: flex-end;
margin-bottom: 2rem;
}
.input-form {
width: 100%;
padding: 1rem;
min-height: 3rem;
max-height: 8rem;
background-color: var(--tertiary-bg-color);
color: var(--foreground-color);
border-radius: 10px;
border: none;
resize: none;
outline: none;
transition: all 0.3s ease;
}
.input-form:focus {
box-shadow: 0 0 10px var(--accent-color);
}
.input-button {
height: 3rem;
width: 4rem;
background-color: var(--secondary-color);
color: var(--foreground-color);
border-radius: 10px;
padding: 0.5rem;
cursor: pointer;
transition: all 0.3s ease;
}
.input-button:hover {
background-color: var(--primary-color);
transform: scale(1.1);
}
.input-button:disabled {
background-color: var(--secondary-bg-color);
cursor: not-allowed;
}
p {
white-space: pre-wrap;
}
.megrim-regular {
font-family: "Megrim", system-ui;
font-weight: 400;
font-style: normal;
}
.monospace {
font-family: monospace;
}
.menu-container {
position: relative;
}
.menu-button {
height: 3rem;
width: 3rem;
background-color: var(--tertiary-bg-color);
color: var(--foreground-color);
border-radius: 10px;
padding: 0.5rem;
cursor: pointer;
transition: all 0.3s ease;
border: 2px solid var(--secondary-color);
display: flex;
justify-content: center;
align-items: center;
}
.menu-button:hover {
background-color: var(--secondary-bg-color);
border-color: var(--primary-color);
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(255, 113, 206, 0.3);
}
.menu-dropdown {
position: absolute;
bottom: 120%;
right: 0;
background-color: var(--tertiary-bg-color);
border-radius: 10px;
padding: 0.75rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
box-shadow: 0 8px 16px rgba(1, 205, 254, 0.2);
border: 2px solid var(--secondary-color);
min-width: 200px;
}
.menu-dropdown button {
background-color: var(--secondary-bg-color);
color: var(--foreground-color);
border: none;
border-radius: 5px;
padding: 1rem;
cursor: pointer;
transition: all 0.3s ease;
text-align: left;
font-size: 0.9rem;
position: relative;
overflow: hidden;
}
.menu-dropdown button::before {
content: "";
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(
90deg,
transparent,
rgba(255, 113, 206, 0.2),
transparent
);
transition: left 0.5s ease;
}
.menu-dropdown button:hover {
background-color: var(--tertiary-bg-color);
transform: translateX(5px);
box-shadow: -4px 4px 8px rgba(1, 205, 254, 0.2);
}
.menu-dropdown button:hover::before {
left: 100%;
}
.error-toast {
position: fixed;
bottom: 20px;
right: 20px;
background-color: var(--red-color);
color: var(--foreground-color);
padding: 1rem;
border-radius: 10px;
max-width: 300px;
box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
z-index: 1000;
cursor: pointer;
transition: all 0.3s ease;
}
.error-toast:hover {
transform: translateY(-5px);
box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}
@media (max-width: 640px) {
.error-toast {
left: 20px;
right: 20px;
max-width: none;
}
}
@keyframes shake {
0%,
100% {
transform: translateX(0);
}
10%,
30%,
50%,
70%,
90% {
transform: translateX(-5px);
}
20%,
40%,
60%,
80% {
transform: translateX(5px);
}
}
@keyframes vaporwaveGlow {
0%,
100% {
box-shadow:
0 0 5px var(--accent-color),
0 0 10px var(--primary-color),
0 0 15px var(--secondary-color);
}
50% {
box-shadow:
0 0 10px var(--accent-color),
0 0 20px var(--primary-color),
0 0 30px var(--secondary-color);
}
}
.input-form-generating {
animation: vaporwaveGlow 3s ease-in-out infinite;
transition: all 0.3s ease;
}
.input-form-generating:focus {
animation: none;
box-shadow:
0 0 15px var(--accent-color),
0 0 30px var(--primary-color),
0 0 45px var(--secondary-color);
}