Scezui's picture
Refactor code for improved performance and readability
dfe58cd
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");
* {
outline: none;
box-sizing: border-box;
}
:root {
--body-font: "Poppins", sans-serif;
--theme-bg-color: rgb(255 255 255 / 31%);
--theme-color: #3c3a3a;
--inactive-color: #333333;
--button-inactive: #3c3a3a;
--search-bg: rgb(255 255 255 / 31%);
--dropdown-bg: #f7f7f7;
--overlay-bg: rgb(255 255 255 / 30%);
--dropdown-hover: rgb(236 236 236);
--border-color: rgb(255 255 255 / 35%);
--popup-bg: rgb(255 255 255);
--hover-menu-bg: rgba(255 255 255 / 35%);
--scrollbar-bg: rgb(255 253 253 / 57%);
--content-title-color: --theme-color;
}
html {
box-sizing: border-box;
-webkit-font-smoothing: antialiased;
}
body {
font-family: var(--body-font);
background-image: url('asset.mp4');
background-size: cover;
background-position: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
padding: 2em;
width: 100%;
height: 100vh;
}
@media screen and (max-width: 480px) {
body {
padding: 0.8em;
}
}
.video-bg {
position: fixed;
right: 0;
top: 0;
width: 100%;
height: 100%;
}
.video-bg video {
width: 100%;
height: 100%;
object-fit: cover;
}
img {
max-width: 100%;
}
.app {
background-color: var(--theme-bg-color);
max-width: 1250px;
max-height: 860px;
height: 90vh;
display: flex;
flex-direction: column;
overflow: hidden;
position: relative;
width: 100%;
border-radius: 14px;
backdrop-filter: blur(20px);
-webkit-backdrop-filter: blur(20px);
font-size: 15px;
font-weight: 500;
}
.header {
display: flex;
align-items: center;
flex-shrink: 0;
height: 58px;
width: 100%;
border-bottom: 1px solid var(--border-color);
padding: 0 30px;
white-space: nowrap;
}
@media screen and (max-width: 480px) {
.header {
padding: 0 16px;
}
}
.header-menu {
display: flex-;
align-items: center;
}
.header-menu a {
padding: 12px 30px;
text-decoration: none;
color: grey;
border-bottom: 2px solid transparent;
transition: 0.3s;
}
@media screen and (max-width: 620px) {
.header-menu a {
font-size: 12px;
padding: 10px 10px;
}
}
.header-menu a.is-active,
.header-menu a:hover {
color: var(--theme-color);
border-bottom: 2px solid var(--theme-color);
}
.menu-circle {
width: 15px;
height: 15px;
background-color: #f96057;
border-radius: 50%;
box-shadow: 24px 0 0 0 #f8ce52, 48px 0 0 0 #5fcf65;
margin-right: 70px;
flex-shrink: 0;
}
@media screen and (max-width: 945px) {
.menu-circle {
display: none;
}
}
.wide .header-menu {
display: none;
}
.wide .menu-circle {
margin-right: 0;
}
.wrapper {
display: flex;
flex-grow: 1;
overflow: hidden;
}
.main-header {
display: flex;
align-items: center;
border-bottom: 1px solid var(--border-color);
height: 58px;
flex-shrink: 0;
z-index: 1;
}
.main-header .header-menu {
margin-left: 150px;
}
@media screen and (max-width: 1055px) {
.main-header .header-menu {
margin: auto;
}
}
.main-header .header-menu a {
padding: px 24px;
}
@media screen and (max-width: 650px) {
.main-header .header-menu a {
padding: px 14px;
font-size: 14px;
}
}
@media screen and (max-width: 430px) {
.main-header .header-menu a {
padding: px 14px;
font-size: 10px;
}
}
.main-container {
display: flex;
flex-direction: column;
flex-grow: 1;
}
.menu-link-main {
opacity: 0;
text-decoration: none;
color: var(--theme-color);
padding: 0 30px;
}
@media screen and (max-width: 1055px) {
.menu-link-main {
display: none;
}
}
.content-wrapper {
display: flex;
flex-direction: column;
color: var(--theme-color);
padding: 20px 40px;
height: 100%;
width: 100%;
overflow: auto;
background-color: var(--theme-bg-color);
}
@media screen and (max-width: 510px) {
.content-wrapper {
padding: 20px;
}
}
.content-wrapper-header {
display: flex;
align-items: center;
width: 100%;
justify-content: space-between;
background-image: url("https://wallpaperaccess.com/full/3079628.jpg"), linear-gradient(to right top, #cf4af3, #e73bd7, #f631bc, #fd31a2, #ff3a8b, #ff4b78, #ff5e68, #ff705c, #ff8c51, #ffaa49, #ffc848, #ffe652);
border-radius: 14px;
padding: 20px 40px;
}
@media screen and (max-width: 415px) {
.content-wrapper-header {
padding: 20px;
}
}
.content-wrapper.overlay {
pointer-events: none;
transition: 1s;
background-color: var(--overlay-bg);
}
.overlay-app {
width: 100%;
height: 100%;
position: fixed;
left: 0;
top: 0;
pointer-events: all;
background-color: rgba(36, 39, 59, 0.8);
opacity: 0;
visibility: hidden;
transition: 0.3s;
}
.overlay-app.is-active {
visibility: visible;
opacity: 1;
}
.img-content {
font-weight: 500;
font-size: 17px;
display: flex;
align-items: center;
margin: 0;
}
.img-content img {
width: 45px;
margin-right: 14px;
}
.content-text {
font-weight: 400;
font-size: 12px;
margin-top: 16px;
line-height: 1.5em;
color: #ebecec;
display: -webkit-box;
-webkit-line-clamp: 7;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.content-wrapper-context {
max-width: 350px;
}
.content-button {
background-color: #3a6df0;
border: none;
padding: 8px 26px;
color: #fff;
border-radius: 20px;
margin-top: 16px;
cursor: pointer;
transition: 0.3s;
white-space: nowrap;
}
.content-wrapper-img {
width: 186px;
object-fit: cover;
margin-top: -25px;
object-position: center;
}
@media screen and (max-width: 570px) {
.content-wrapper-img {
width: 110px;
}
}
.content-section {
margin-top: 30px;
display: flex;
flex-direction: column;
}
.content-section-title {
color: var(--content-title-color);
margin-bottom: 14px;
}
.content-section ul {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
justify-content: space-around;
background-color: var(--content-bg);
padding-left: 0;
margin: 0;
border-radius: 14px;
border: 1px solid var(--theme-bg-color);
cursor: pointer;
}
.content-section ul li {
list-style: none;
padding: 10px 18px;
display: flex;
align-items: center;
font-size: 16px;
width: 100%;
height: 100%;
white-space: nowrap;
transition: 0.3s;
}
.content-section ul li:hover {
background-color: var(--theme-bg-color);
}
.content-section ul li:hover:first-child {
border-radius: 13px 13px 0 0;
}
.content-section ul li:hover:last-child {
border-radius: 0 0 13px 13px;
}
.content-section ul li+li {
border-top: 1px solid var(--border-color);
}
.content-section ul svg {
width: 28px;
border-radius: 6px;
margin-right: 16px;
flex-shrink: 0;
}
.content-button:not(.open):hover {
background: #1e59f1;
}
.menu {
width: 5px;
height: 5px;
background-color: var(--button-inactive);
border-radius: 50%;
box-shadow: 7px 0 0 0 var(--button-inactive), 14px 0 0 0 var(--button-inactive);
margin: 0 12px;
}
.button-wrapper {
display: flex;
align-items: center;
justify-content: flex-end;
width: 187px;
margin-left: auto;
}
@media screen and (max-width: 480px) {
.button-wrapper {
width: auto;
}
}
.content-button-wrapper .content-button.status-button.open.close {
width: auto;
}
.content-button-wrapper {
margin-top: auto;
margin-left: auto;
}
.content-button-wrapper .open {
margin-right: 8px;
}
th,
td {
padding: 8px;
text-align: center;
border-bottom: 1px solid #ddd;
}
th {
font-size: 15px;
font-weight: 400px;
}
td {
font-size: 12px;
}
.container {
display: flex;
justify-content: center;
align-items: center;
height: 90vh;
}
.left-container {
flex: 1;
padding-left: 100px;
color: var(--theme-color);
}
.left-container h1 {
font-size: 50px;
line-height: 45px;
}
.right-container {
flex: 1;
padding: 20px;
}
.header-text {
font-size: 24px;
font-weight: bold;
margin-bottom: 20px;
}
.image-container {
text-align: center;
}
.image-container img {
max-width: 100%;
height: 380px;
max-height: 100%;
}
@media only screen and (max-width: 920px) {
.left-container h1 {
font-size: 35px;
line-height: 40px;
}
}
@media only screen and (max-width: 812px) {
.left-container h1 {
font-size: 30px;
line-height: normal;
}
.container {
flex-direction: column;
}
.left-container {
padding: 50px;
}
.image-container img {
height: auto;
width: 100%;
display: none;
}
}
.footer {
background-color: #f2f2f200;
padding: 10px;
text-align: center;
}
.footer-text {
font-size: 10px;
margin-bottom: 3px;
color: var(--theme-color);
}
@media only screen and (max-width: 768px) {
.footer {
padding: 5px;
}
.footer-text {
font-size: 9px;
}
}
@media only screen and (max-width: 480px) {
.footer {
padding: 4px;
}
.footer-text {
font-size: 10px;
}
}
.glass-input {
background: rgba(255, 255, 255, 0.815);
border-radius: 7px;
padding: 10px;
backdrop-filter: blur(20px);
color: var(theme-color);
border: none;
width: 90%;
}
.glass-button {
background: linear-gradient(135deg, #857ffd, #7897ff);
border-radius: 10px;
padding: 8px 20px;
border: none;
cursor: pointer;
color: white;
text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
transition: background 0.3s ease;
}
.glass-button:hover {
background: linear-gradient(135deg, #6C63FF, #7897ff, rgb(134, 213, 183));
transform: scale(1.05);
}
select.form-select option {
background-color: #f5f5f5;
/* Change to your desired background color */
color: #000000;
}
.container1 {
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
align-items: center;
width: 100%;
height: 1280px;
background-color: transparent;
backdrop-filter: blur(10px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
scroll-behavior: smooth;
}
.text-generator {
width: 45%;
padding-left: 50px;
}
.text-generated {
width: 50%;
padding-top: 3em;
padding-left: 20px;
flex-direction: column;
}
.input-section {
margin-bottom: 20px;
}
.input-section label {
display: block;
font-weight: bold;
color: #333333;
}
.input-section input[type="range"] {
width: 10%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 5px;
font-size: 16px;
color: #333333;
background-color: #ffffff;
}
.generate-btn {
width: 100%;
padding: 10px;
margin-bottom: 20px;
border: none;
border-radius: 5px;
font-size: 16px;
color: #ffffff;
background-color: #4a90e2;
cursor: pointer;
}
.generated-text {
width: 100%;
padding: 10px;
border: 1px solid #cccccc;
border-radius: 5px;
font-size: 16px;
color: #333333;
background-color: #ffffff;
}
.message-container {
display: flex;
align-items: flex-start;
margin-bottom: 10px;
}
.profile-image {
width: 50px;
height: 50px;
border-radius: 50%;
object-fit: cover;
margin-right: 10px;
}
.message-content {
background-color: #f1f0f0;
padding: 10px;
border-radius: 10px;
max-width: 800px;
width: 600px;
}
.message-name {
font-weight: bold;
margin-bottom: 5px;
margin-top: 5px;
}
.message-text {
margin: 0;
font-size: 12px;
}
.radio-input {
display: flex;
flex-direction: row;
font-size: 8px;
font-weight: 400;
margin-bottom: 25px;
}
.radio-input input[type="radio"] {
display: none;
}
.radio-input label {
display: flex;
align-items: center;
padding: 10px;
border: 1px solid #ccc;
background-color: #f4eded;
border-radius: 5px;
margin-right: 12px;
cursor: pointer;
position: relative;
transition: all 0.3s ease-in-out;
}
.radio-input label:before {
content: "";
display: block;
position: absolute;
top: 50%;
left: 0;
transform: translate(-50%, -50%);
width: 10px;
height: 10px;
border-radius: 50%;
background-color: #fff;
border: 2px solid #ccc;
transition: all 0.3s ease-in-out;
}
.radio-input input[type="radio"]:checked+label:before {
background-color: rgb(134, 213, 183);
top: 0;
}
.radio-input input[type="radio"]:checked+label {
background-color: #7897ff;
color: #fff;
animation: radio-translate 0.5s ease-in-out;
}
@keyframes radio-translate {
0% {
transform: translateX(0);
}
50% {
transform: translateY(-10px);
}
100% {
transform: translateX(0);
}
}
.loader {
border: 16px solid #f3f3f3;
border-top: 16px solid #6C63FF;
border-radius: 50%;
width: 120px;
height: 120px;
animation: spin 2s linear infinite;
margin: 0 auto;
display: none;
/* Initially hidden */
position: absolute;
top: 40%;
left: 45%;
transform: translate(-50%, -50%);
z-index: 5;
/* Adjust the z-index to bring the loader to the front */
}
.blur-background {
filter: blur(2px);
/* Apply blur effect */
pointer-events: none;
/* Disable pointer events on blurred elements */
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}