/* ==========================================================================
   Fonts
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Gothic+A1&family=Jua&display=swap');
@import url('https://fonts.googleapis.com/css?family=Lato:400,700');
@import url('https://cdn.jsdelivr.net/gh/wanteddev/wanted-sans@v1.0.1/packages/wanted-sans/fonts/webfonts/variable/split/WantedSansVariable.min.css');

@font-face {
  font-family: 'Suit';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_suit@1.0/SUIT-Regular.woff2') format('woff2');
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Pretendard';
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/pretendard@1.0/Pretendard-Thin.woff2') format('woff2');
  font-weight: 100;
  font-display: swap;
}

/* ==========================================================================
   Variables
   ========================================================================== */

:root {
--bg: #ffffff;                 
--bg2: #f8f9fa;                
--bg3: #f1f3f5;                
--mode: #2563eb; 
      
--sf: #fdfdfd;                 
--sf2: #f3f4f6;                
--sf3: #e5e7eb;                
--sf4: #8a8a8a;              
--bd: rgba(0, 0, 0, 0.06);     
--bd2: rgba(0, 0, 0, 0.12);    
--bd3: rgba(0, 0, 0, 0.18);         
--bd4: #cbccd3; 
--tx: #1a1a2e;                 
--tx2: #4a4a6a;                
--tx3: #8a8aaf;                
--tx4: #0a0a14;          
--pur: #7c3aed;                                      
--blu: #2563eb;                                      
--grad: linear-gradient(135deg, #7c3aed, #2563eb); 
--hover: rgba(220, 220, 240, 0.4);                   
--nav: 68px;
--dsb: 240px;
--md: #fdfdfd;      
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  background: var(--bg);
  color: var(--tx);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.gt {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.d-flex {
  display: flex;
}

.w-100 {
  width: 100%;
}

.justify-content-center {
  justify-content: center;
}

.justify-content-end {
  justify-content: end;
}

.border-1px {
  border: 1px solid black;
}

.position_absolute_left {
  position: absolute;
  left: 12px;
}

.position_absolute_right {
  position: absolute;
  right: 12px;
}

.align-right {
  text-align: right;
}

.float-right {
  float: right;
}

.clearfix::after {
  visibility: hidden;
  display: block;
  font-size: 0;
  content: " ";
  clear: both;
  height: 0;
}

.pcContent {
  display: block;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

.container3 {
  display: flex;
  justify-content: center;
}

.card {
  display: flex;
  justify-content: center;
  padding-left: 30px;
  padding-right: 30px;
}

.card2 {
  flex-basis: 0;
  flex-grow: 1;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-right: 15px;
  padding-left: 15px;
}

.card-title {
  display: flex;
  justify-content: center;
  font-size: 18px;
  margin: 10px 0;
}

.mainTxt {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 80vh;
  margin-left: -4%;
  font-weight: 400;
}

.chatContainer {
  display: block;
  margin-left: 270px;
  margin-right: 40px;
}

/* ==========================================================================
   Cards (.gc)
   ========================================================================== */

.gc {
  width: 300px;
  height: 140px;
  padding: 6px 20px;
  margin: 10px;
  background: var(--sf2);
  border: 1px solid var(--bd);
  border-radius: 18px;
  transition: 0.3s;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

.gc:hover {
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-9px) !important;
  transition-delay: 0s !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.15);
}

.gc h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  padding: 0;
  margin: 12px 0;
  font-size: 14px;
}

.gc p {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 6px 0;
  line-height: 20px;
}

.gc_arrow {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gc-container {
  display: flex;
  justify-content: flex-end;
  position: relative;
  height: 0;
}

.gc-container small {
  font-size: 10px;
  font-family: bold;
  font-weight: bold;
  color: greenyellow;
  margin-top: -2px;
  margin-right: -12px;
}

.text-content {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-bottom: 20px;
}

.gc-content .font_adjuster {
    margin: 0;
}

/* ==========================================================================
   Input & Search
   ========================================================================== */

.group2 {
  width: 40%;
  padding: 14px 28px;
  border-radius: 28px;
  background-color: var(--bg3);
  position: fixed;
  bottom: 42px;
}

.input,
.bigInput {
  width: 100%;
  font-family: "Montserrat", sans-serif;
  resize: none;
  overflow: hidden;
  background-color: white;
  outline: none;
  color: var(--tx);
  cursor: text;
  z-index: 0;
}

.input {
  max-height: 30px;
}

.input::placeholder {
  color: var(--tx);
}

.input:active {
  transform: scale(1.02);
}

#query {
  outline: none;
  border: none;
  background-color: var(--bg3) !important;
  line-height: 30px;
}

#bigQuery {
  padding: 0;
  margin: 0;
  display: none;
  background-color: var(--bg3) !important;
  font-size: 14px;
}

.search-icon {
  width: 2rem;
  height: 2rem;
  padding: 7px;
  border-radius: 24px;
  fill: #ffffff !important;
  background-color: #3b82f6;
  color: white !important;
  cursor: pointer !important;
  z-index: 1;
}

.search-icon:active {
  transform: scale(1.06);
}

.queryContainer {
  display: flex;
  justify-content: space-between;
}

.search-select {
  width: 220px;
  padding: 10px 15px;
  font-size: 15px;
  font-family: sans-serif;
  color: #333;
  border: 1px solid #ccc;
  border-radius: 6px;
  cursor: pointer;
  outline: none;
}

.search-select:focus {
  border-color: #007bff;
}

.search-panel {
  margin-top: 15px;
  padding: 20px;
  border-radius: 6px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
}

#search-type-select {
  display: none;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

aside {
  width: 230px;
  height: 100vh;
  position: fixed;
  z-index: 6;
  display: block;
  opacity: 0;
  visibility: hidden;
  background-color: var(--bg2);
  transition: opacity 0.3s ease, visibility 0.3s ease;
  transition-duration: 0.3s;
}

aside.is-active {
   opacity: 1;
   visibility: visible;
   display: block;
   transition-duration: 0.3;
}

.asideEvent {
  margin-left: 0;
  transition: margin-left 0.3s ease;
}

.asideEvent.is-active {
  margin-left: -235px;
}

.inline-flex {
  display: flex;
  justify-content: end;
  gap: 6px;
  padding: 10px;
  border-radius: 12px;
}

.inline-flex2 {
  display: flex;
  justify-content: end;
  gap: 4px;
}

/* ==========================================================================
   Filter & History
   ========================================================================== */

.filter {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.192);
  border-radius: 6px;
  background-color: var(--tx2);
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.021);
  cursor: pointer;
  transition: all 0.3s;
}

.filter svg {
  height: 16px;
  fill: var(--tx) !important;
  color: var(--tx);
  transition: all 0.3s;
}

.filter:hover {
  background-color: var(--pur);
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.11);
}

.filter:hover svg {
  fill: var(--bd3);
}

#filterMb {
  display: block;
  position: fixed;
  top: 15px;
  left: 15px;
  z-index: 5;
  background-color: var(--tx2);
}

#filterMb:hover {
  background-color: var(--pur);
}

.search-history-container {
  font-family: sans-serif;
  border-radius: 8px;
  overflow: hidden;
}

.history-menu summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  font-size: 14px;
  font-weight: bold;
  color: var(--tx3);
  list-style: none;
  cursor: pointer;
}

.history-menu summary::after {
  content: '❮';
  font-size: 14px;
  transition: transform 0.3s;
}

.history-menu summary:hover {
  color: var(--pur);
  transition-duration: 0.2s;
}

.history-menu[open] summary::after {
  transform: rotate(180deg);
}

.history-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.history-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 30px;
  padding: 3px 25px;
  margin: 3px;
  font-size: 14px;
  font-family: suit;
}

.history-list li span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.history-list li:hover {
  margin: 3px;
  background-color: var(--bd);
  border-radius: 25px;
  cursor: pointer;
}

.history-list li:last-child {
  border-bottom: none;
}

.history-list li button {
  display: none;
  min-width: 4px;
  padding: 0;
}

.history-list li button svg {
  color: var(--bd2) !important;
  fill: var(--bd2) !important;
}

.history-list button {
  background: none;
  border: none;
  font-size: 12px;
  cursor: pointer;
}

.deleteHistoryBtn {
  width: 26px;
  height: 26px;
  padding: 4px;
  margin-right: -16px;
  border-radius: 14px;
  opacity: 0;
  color: var(--tx4) !important;
  z-index: 1;
}

.deleteHistoryBtn:hover {
  background-color: var(--sf);
  color: var(--tx4) !important;
}

.deleteHistoryBtn * {
  pointer-events: none;
}

li:hover .deleteHistoryBtn {
  opacity: 1 !important;
  transition: opacity 0.1s ease;
}

.hoverEffect {
  width: 97%;
  padding: 5px 0;
  margin: 3px;
  border-radius: 25px;
  color: var(--tx);
  cursor: pointer;
}

.hoverEffect:hover {
  margin: 3px;
  background-color: var(--bd);
  border-radius: 25px;
  cursor: pointer;
}

/* ==========================================================================
   Chat
   ========================================================================== */

.chat .chat-history .message-data {
  margin-bottom: 15px;
}

.chat .chat-history .message {
  max-width: 700px;
  padding: 18px 20px !important;
  font-size: 16px;
  line-height: 26px;
  color: var(--tx);
  border-radius: 7px;
}

.chat .chat-history .message-totalMs {
  padding-left: 6px;
  font-size: 10px;
  color: #a8aab1;
}

.chat .chat-history .message::after {
  content: " ";
  position: absolute;
  bottom: 100%;
  left: 7%;
  width: 0;
  height: 0;
  margin-left: -10px;
  border: solid transparent;
  border-width: 10px;
  pointer-events: none;
}

.chat .chat-history .my-message {
  background: rgba(201, 207, 209, 0.3);
}

.chat .chat-history .my-message::after {
  border-bottom-color: rgba(201, 207, 209, 0.3);
}

.chat .chat-history .other-message {
  overflow-wrap: break-word;
  word-break: break-word;
  background: rgba(31, 132, 247, 0.15);
}

.my-message {
  position: relative;
  margin-bottom: 30px;
}

.my-message-content {
  white-space: pre-wrap;
  padding-bottom: 30px;
}

.other-message::after {
  border: none !important;
}

.chat-history li {
  list-style: none;
}

#messageAiChat {
  padding: 30px 8% 0;
}

#process {
  padding-top: 10px;
}

.online,
.me {
  margin-right: 3px;
  font-size: 10px;
}

.online {
  color: #86bb71;
}

.me {
  color: #94c2ed;
}

/* ==========================================================================
   Dropdown
   ========================================================================== */

.dropdown-container {
  display: flex;
  justify-content: center;
  position: relative;
  gap: 0;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  bottom: 100%;
  width: 100%;
  min-width: 250px;
  margin-bottom: 8px;
  padding: 8px;
  background-color: var(--md);
  border-radius: 20px;
  box-sizing: border-box;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--sf3);
}

.dropdown-button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 120px;
  max-height: 40px;
  padding: 1px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--tx4);
  background-color: rgba(0, 0, 0, 0);
  border: none;
  border-radius: 20px;
  cursor: pointer;
}

.dropdown-button:hover {
  background-color: rgba(0, 0, 0, 0);
}

.inferLabel {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--tx);
}

.check-icon {
  display: inline-block;
  width: 24px;
  margin-top: 2px;
  font-size: 14px;
  font-weight: bold;
  color: var(--tx2);
}

.item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.title {
  font-size: 15px;
  font-weight: 500;
  color: var(--tx4);
}

.description {
  font-size: 13px;
  color: #9e9e9e;
}

.divider {
  height: 1px;
  margin: 8px 16px;
  background-color: #333537;
}

.arrow-icon {
  font-size: 11px;
}

/* ==========================================================================
   Modal & Settings
   ========================================================================== */

.popup-backdrop {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0 auto;
    z-index: 9998;
    background-color: rgba(0,0,0,0.2);
}

.modal-container {
    display: none;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 9999;
  width: 35%;
  min-width: 450px;
  min-height: 380px;
  height: auto;
  padding: 24px;
  background-color: var(--md);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(85, 85, 85, 0.5);
  transform: translate(-50%, -50%);
}

.modal *,
.modal *::before,
.modal *::after {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--tx4);
  stroke: var(--tx4);
  fill: var(--tx4);
}

.modal-content {
  width: 100%;
  height: 100%;
}

.settings-title {
  margin-bottom: 8px;
  padding-bottom: 14px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid #2d2d2d;
}

.settings-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 54px;
}

.item-label {
  font-size: 15px;
  font-weight: 500;
}

.select-wrapper {
  position: relative;
}

.settings-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
}

.settings-select-btn .arrow {
  font-size: 11px;
  opacity: 0.8;
}

.select-options-box {
  display: none;
  position: absolute;
  top: 100%;
  right: -10px;
  width: 190px;
  margin: 4px 0 0;
  padding: 6px;
  list-style: none;
  background-color: var(--md);
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  z-index: 10000;
}

.select-options-box.show {
  display: block;
}

.option-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--tx4);
  border-radius: 10px;
  cursor: pointer;
}

.option-item:hover,
.option-item.active {
  background-color: var(--sf3);
  color: var(--tx4);
}

.option-item.active {
  font-weight: 500;
}

.checkmark {
  font-size: 13px;
}

#closeModalBtn {
  position: absolute;
  top: 5px;
  right: 22px;
  font-size: 30px;
  cursor: pointer;
}

#closeModalBtn:hover {
  color: rgb(255, 143, 15);
}

/* ==========================================================================
   Tabs
   ========================================================================== */

.tab-container {
  border-radius: 8px;
  overflow: hidden;
}

input[type="radio"] {
  display: none;
}

.tab-menu {
  display: flex;
  border-bottom: 2px solid var(--bg);
}

.tab-menu label {
  flex: 1;
  padding: 15px 0;
  font-weight: 600;
  text-align: center;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-menu label:hover {
  color: var(--tx2);
  background: var(--bg2);
}

.tab-content {
  display: none;
  max-height: 80vh;
  margin-top: 10px;
  padding: 15px;
  line-height: 1.6;
  overflow-y: scroll;
}

.tab-content::-webkit-scrollbar {
  width: 8px;
}

.tab-content::-webkit-scrollbar-track {
  background: rgb(231, 235, 236);
  border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb {
  background: rgba(10, 37, 48, 0.3);

  border-radius: 4px;
}

.tab-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

#tab1:checked ~ .tab-menu label[for="tab1"],
#tab2:checked ~ .tab-menu label[for="tab2"],
#tab3:checked ~ .tab-menu label[for="tab3"] {
  margin-bottom: -2px;
  color: var(--tx);
  border-bottom: 2px solid #0071e3;
}

#tab1:checked ~ .tab-content-1,
#tab2:checked ~ .tab-content-2,
#tab3:checked ~ .tab-content-3 {
  display: block;
  animation: fadeIn 0.8s ease forwards;
}

/* ==========================================================================
   Theme Toggle
   ========================================================================== */

#theme-btn {
  position: absolute;
  bottom: 10px;
  left: 10px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  padding: 5px;
  border-radius: 50%;
  background-color: var(--mode);
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s ease-in-out;
}

#theme-btn:hover {
  transform: scale(1.1);
}

#theme-btn svg {
  display: block;
  width: 22px;
  height: 22px;
  animation: themeIconAppear 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.white-mode #theme-btn {
  background-color: rgba(0, 0, 0, 0.05);
}

body.white-mode #theme-btn:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Like Button
   ========================================================================== */

.like-btn {
  right: 18px;
  bottom: 0;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
}

.heart-icon {
  width: 50px;
  transition: fill 0.3s ease, stroke 0.3s ease;
}

.heart-icon path {
  fill: none;
  stroke: var(--tx);
  stroke-width: 2;
  transform-origin: center;
  transition: fill 0.3s, stroke 0.3s;
}

.like-btn.liked .heart-icon path {
  fill: #ff3e6c;
  stroke: #ff3e6c;
  animation: heart-pop 0.3s ease-in-out;
}

/* ==========================================================================
   Loader & SweetAlert
   ========================================================================== */

.loader {
  display: inline-block;
  width: 20%;
  height: 100px;
  margin: 0 auto 1em;
  padding: 1em;
  text-align: center;
  vertical-align: top;
}

.loaderIcon path,
.loaderIcon rect {
  fill: #FF6700;
}

.swal2-modal {
  border: 1px solid var(--bd);
}

.swal2-close {
  position: absolute;
  top: 3px;
  right: 4px;
  outline: none !important;
  box-shadow: none !important;
}

#swal2-html-container {
  line-height: 28px;
  padding-top:0px!important;
}

.left-align-modal {
  min-width: 750px;
}

.left-align-modal .swal2-title,
.left-align-modal .swal2-html-container {
  padding: 10px 20px;
  font-size: 1.4rem;
  text-align: left !important;
}

.left-align-modal .swal2-html-container {
  font-size: 1.2rem;
  line-height: 24px;
  color: var(--tx2);
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes themeIconAppear {
  0% {
    transform: scale(0.5) rotate(-30deg);
    opacity: 0;
  }
  100% {
    transform: scale(1) rotate(0);
    opacity: 1;
  }
}

@keyframes heart-pop {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 1068px) {
  .container3 {
    display: block !important;
  }

  .pcContent {
    display: none !important;
  }

  .gc {
    width: 94%;
  }

  .mainTxt {
    margin-left: 0;
  }

  .chatContainer {
    display: block;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .chat-history ul {
    padding: 0;
  }

  .group {
    width: 80%;
    min-width: 0;
    margin-left: 15%;
    padding-right: 10%;
  }

  .group2 {
    width: 80%;
  }

  .input {
    min-width: 100%;
    margin-left: 0;
    padding-right: 100px;
    color: var(--tx) !important;
  }

  input::placeholder {
    color: #ffffff;
    opacity: 0.1;
  }

  .search-icon {
    display: none;
  }

  aside {
    display: none;
  }

  .asideEvent,
  .asideEvent.is-active {
    margin-left: 0;
    transition: 0.3s ease;
  }

  .dropdown-container {
    position: absolute !important;
    right: -19px;
    margin-left: 0 !important;
  }

  .dropdown-button {
    position: absolute;
    top: 5px;
    right: 14px;
    max-width: 110px;
    font-weight: bold !important;
  }

  .left-align-modal {
    min-width: 0;
  }

  .swal2-container {
    max-width: 96vw;
    padding: auto;
  }

  #search-type-select {
    display: flex !important;
    justify-content: center;
    width: 100%;
  }
}

@media screen and (max-width: 900px) {
  .dropdown-container {
    margin-left: 0 !important;
  }
}

@media screen and (max-width: 768px) {
  .modal {
    width: 90%;
    min-width: auto;
  }

  .select-options-box {
    right: 0;
  }
}


.vote-actions {
    gap: 10px;
    margin-top: 15px;
    display: none;
    justify-content: start;
}