@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Bungee+Inline&family=Kanit:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900&family=Mochiy+Pop+P+One&family=Oi&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Recursive:wght@300..1000&family=Rubik+Bubbles&display=swap');

:root {
  /* Font Families */
  --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-alt: 'Poppins', sans-serif;

  /* Colors */
  --color-bg: #121212;
  --color-text: #e0e0e0;
  --color-sidebar-bg: #333;
  --color-sidebar-text: #fff;
  --color-settings-panel-bg: #1e1e1e;
  --color-settings-panel-border: #333;
  --color-settings-panel-shadow: rgba(0, 0, 0, 0.7);
  --color-input-bg2: #2c2c2c;
  --color-option-hover: #444;
  --color-btn-bg: transparent;
  --color-btn-text: #fff;
  --color-btn-hover: #2C3930;
  --color-input-container-bg: #121212;
  --color-noise-overlay: url(https://github.com/misalagp/imgs/blob/main/noise.png?raw=true), radial-gradient(circle, transparent 0%, transparent 100%);
  --color-chat-border: #393839;

  /* Dimensions & Other */
  --sidebar-opened-width: 250px;
  --sidebar-closed-width: 0;
  --transition-speed: 0.3s;
}

::selection {
  background: rgba(20, 158, 144, 0.7); /* Dark blue color */
  color: #ffffff; /* White text color */
}



* {
  margin: 0;
  padding: 0;
  border: none;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgb(68, 68, 68) rgb(26, 26, 26);
  overflow-wrap: break-word;
  word-break: keep-all;
  font-family: var(--font-main);
  
}

svg {
  height: 24px;
  width: 24px;
}

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-main);
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "sidebar uppersec"
    "sidebar chatdata"
    "sidebar input";
  transition: grid-template-columns var(--transition-speed) ease;
}

.uppersec {
  grid-area: uppersec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1em;
}

.SHOWING {
  display: flex;
  align-items: center;
  justify-content: center;
}

.signin {
  height: 1.8em;
  width: 1.8em;
  border-radius: 50%;
}

.sidebar-btn {
  all: unset;
  cursor: pointer;
  display: flex;
  justify-self: start;
}

/* Button Styles */
.btn {
  padding: 0.5rem 1rem;
  background: var(--color-btn-bg);
  border: none;
  color: var(--color-btn-text);
  cursor: pointer;
  font-size: 1rem;
  transition: background-color var(--transition-speed) ease, transform var(--transition-speed) ease;
  margin-right: 1em;
}

.btn svg {
  transition: rotate var(--transition-speed) ease;
}

/*---------------------------------------- Settings Panel---------------------------------------- */
.settings-panel {
  font-family: var(--font-alt);
  position: fixed;
  top: 70px;
  right: 20px;
  width: 300px;
  background: var(--color-settings-panel-bg);
  border: 1px solid var(--color-settings-panel-border);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 2px 8px var(--color-settings-panel-shadow);
  z-index: 1000;
  display: none;
}

.settings-panel h5 {
  font-size: 1.25rem;
  color: var(--color-text);
  padding: 1em;
}

.form-group {
  margin-bottom: 0.75rem;
}

.form-group label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

.form-group input[type="number"],
.form-group input[type="text"] {
  width: 98%;
  padding: 0.5rem 0 0.5rem 0.5rem;
  border-radius: 0.25rem;
  border: 1px solid var(--color-settings-panel-border);
  background: var(--color-input-bg2);
  color: var(--color-text);
  font-size: 1rem;
}

.form-group input[type="checkbox"] {
  margin-right: 1rem;
}

/* Dropdown for Model Selector */
.dropdown {
  position: relative;
  border: 1px solid var(--color-settings-panel-border);
  border-radius: 0.25rem;
  background: var(--color-input-bg2);
  cursor: pointer;
  margin-top: 0.5rem;
}

.selected {
  padding: 0.5rem;
  font-size: 1rem;
  color: var(--color-text);
}

.options {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-input-bg2);
  border: 1px solid var(--color-settings-panel-border);
  border-top: none;
  border-radius: 0 0 0.25rem 0.25rem;
  display: none;
  max-height: 10rem;
  overflow-y: auto;
  z-index: 100;
}

.dropdown.open .options {
  display: block;
}

.options li {
  padding: 0.5rem;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--color-settings-panel-border);
  color: var(--color-text);
}

.options li:last-child {
  border-bottom: none;
}

.options li:hover {
  background: var(--color-option-hover);
}

#main {
  height: 100vh;
  width: 100vw;
}

.sidebar-opened {
  grid-area: sidebar;
  width: var(--sidebar-closed-width);
  background: var(--color-sidebar-bg);
  color: var(--color-sidebar-text);
  overflow: hidden;
  transition: width var(--transition-speed) ease;
  padding: 1rem 0;
}

.sidebar-opened.opened {
  width: var(--sidebar-opened-width);
}

.opened {
  left: 0;
}

.movingtext_ffc4g{
    border-right: .05em solid;
  animation: caret 1s steps(1) infinite;

}



@keyframes caret {
  50% {
    border-color: transparent;
  }
}
/* ----------------------------------- CHAT ------------------------------------ */

/* Alert Message */
.Alert {
  font-family: var(--font-alt);
  color: #fff;
  font-size: 2.1rem;
  font-weight: bold;
  letter-spacing: 2px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  transition: all 2s ease;
}

.Alert .msg-alert-_ffg {
  font-size: 1.2em;
}
.msg-alert-_ffg {
  text-align: center;
}

.chatdata {
  grid-area: chatdata;
  background: transparent;
  overflow-y: auto;
}

.chat-container {
  position: relative;
  height: 100%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 0 14vw;
}

/* ---------------------LOWER PORTION OF INPUT AREA-------------------------------- */

/* Input Container */
.input-container {
  grid-area: input;
  padding: 1rem 0;
  background: var(--color-input-container-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  max-height: 20vh;
}

.input-btns button {
  all: unset;
  fill: white;
  flex-direction: row;
  cursor: pointer;
  display: flex;
  padding: 0.5em;
  background: #000;
  border: 2px solid rgb(65, 62, 62);
  border-radius: 4em;
  gap: 5px;
  margin-bottom: 0.5em;
  transition: background 0.2s ease;
}

.input-btns {
  position: absolute;
  align-items: center;
  display: flex;
  width: 100%;
  bottom: 0;
  gap: 0.5em;
}

.input-btns #sendBtn {
  margin-left: auto;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.inputmaker {
  position: relative;
  border-radius: 1em;
  width: 70%;
  align-items: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--color-noise-overlay);
  border: 1.7px solid var(--color-chat-border);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0turn;
  inherits: false;
}

.inputmaker {
  animation: 2s gradient-angle infinite linear;
  border: 2px solid transparent;
  background-image: linear-gradient(#584827, #2d230f),
    conic-gradient(
      from var(--gradient-angle),
      #584827 0%,
      #c7a03c 37%,
      #f9de90 30%,
      #c7a03c 33%,
      #584827 40%,
      #584827 50%,
      #c7a03c 77%,
      #f9de90 80%,
      #c7a03c 83%,
      #584827 90%
    );
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
}

@keyframes gradient-angle {
  to {
    --gradient-angle: 0.5turn;
  }
}

#userInput {
  all: unset;
  width: 95.5%;
  border-radius: 1em;
  border: none;
  outline: none;
  overflow-wrap: break-word;
  forced-color-adjust: none;
  color: var(--color-text);
  padding: 0.1em 1em 1em;
  scrollbar-width: thin;
  margin: 1em 0 3.5em 0;
  height: 1em;
  line-height: 1.5em;
  scrollbar-width: none;
  scroll-behavior: smooth;
}



.input-btns .uploadfile {
  border-radius: 50%;
  margin-left: 1em;
}

.input-btns #sendBtn {
  margin-right: 1em;
}

.input-btns span {
  display: none;
}


.input-btns .extra-feature.active {
  background: var(--color-btn-hover);
}

#filePreviewContainer{
  position: absolute;
  top: -80%;
  left:2%;
  height: 5em;
  border-radius: 5%;

}

/* ------------------------- MEDIA QUERIES ------------------------- */
@media screen and (min-width: 1100px) {
  .inputmaker {
    width: 60%;
  }

  .chat-container{
    padding: 0 20vw;
  }
}

@media screen and (max-width: 900px) {
  .inputmaker {
    width: 80%;
  }

  .Alert {
    font-size: 1.9rem;
  }

  #toggleSettings {
    margin: 0 -0.7em 0 0;
  }



  .sidebar-opened {
    width: 30%;
  }

  .input-btns svg {
    height: 1.2em;
    width: 1.2em;
  }

  .input-btns .extra-feature {
    padding: 0.5em;
  }

  .input-btns {
    gap: 0.3em;
  }

  .input-btns .uploadfile {
    margin-left: 0.8em;
  }
}

@media screen and (max-width: 750px) {
  .inputmaker {
    width: 90%;
  }

  .Alert {
    font-size: 1.4rem;
  }

  .sidebar-opened {
    width: 50%;
    position: absolute;
    height: 100vh;
    z-index: 999;
    background: red;
    width: 20%;
    left: -3000%;
    transition: left 0.2s ease-out;
  }

  .uppersec {
    position: absolute;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
  }

  .opened {
    left: 0;
  }

  .input-container {
    margin-bottom: 4em;
  }
}

@media screen and (max-width: 560px) {
  .inputmaker {
    width: 90%;
  }

  .Alert {
    font-size: 1rem;
  }

  .chat-container {
    padding: 0;
  }

  .extra-info div span {
    font-weight: 500;
    font-size: 0.5em;
    opacity: 0.7;
  }

  .extra-info .items-ffg button:nth-child(1) {
    margin: 0 0 0 7px;
  }

  .copy-turn-action {
    margin: 1em;
  }

  .sidebar-opened {
    width: 70%;
  }

  .message.assistant:last-child {
    margin-bottom: 1em;
  }

  .input-btns button span {
    display: none;
  }
}

@media screen and (max-width: 450px) {
  .message.assistant:last-child {
    margin-bottom: 6em;
  }
}


*{
  scroll-behavior: smooth;
}