/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #000;
  color: #fff;
  height: 100vh;
  overflow: hidden;
}

.container {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}

/* Background Effects */
.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.gradient-orb {
  position: absolute;
  width: 800px;
  height: 800px;
  border-radius: 50%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  filter: blur(150px);
  opacity: 0.3;
  animation: float 8s ease-in-out infinite;
}

.pink {
  background: linear-gradient(45deg, rgba(70, 57, 255, 0.3), rgba(0, 239, 169, 0.3));
  animation-delay: -2s;
}

.purple {
  background: linear-gradient(-45deg, rgba(0, 239, 169, 0.3), rgba(70, 57, 255, 0.3));
  animation-delay: -4s;
}

.blue {
  background: linear-gradient(90deg, rgba(70, 57, 255, 0.3), rgba(0, 239, 169, 0.3));
  animation-delay: -6s;
}

/* Navigation */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(10px);
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Announcement Banner */
.announcement-banner {
  position: fixed;
  top: 74px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #00efa9;
  width: 100%;
  color: white;
  border-radius: 0px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 9;
  box-shadow: 0 2px 10px rgba(0, 239, 169, 0.3);
}

.announcement-banner:hover {
  background: rgba(0, 239, 169, 0.8);
  transform: translateX(-50%) translateY(-2px);
}

.announcement-banner i {
  font-size: 14px;
}

@media (max-width: 768px) {
  .announcement-banner {
    top: 74px;
    padding: 6px 12px;
    font-size: 0.9rem;
  }
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4639ff, #00efa9);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(70, 57, 255, 0.5);
}

.nav-logo {
  width: 70%;
  height: 70%;
  object-fit: cover;
}

.title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(to right, #4639ff, #00efa9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.05em;
}

.nav-links {
  display: flex;
  gap: 2rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-item {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 8px;
}

.nav-item:hover, .nav-item.active {
  color: #fff;
  background: rgba(70, 57, 255, 0.1);
}

.nav-item.active {
  background: linear-gradient(135deg, #4639ff, #00efa9);
}

.wallet-button {
  display: flex;
  align-items: center;
  gap: 8px;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.3s ease;
}

.wallet-button:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .wallet-button {
      margin-left: auto;
      white-space: nowrap;
      padding: 6px 12px;
  }
}

.wallet-button:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Chat Container */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  margin-top: 120px;
  margin-bottom: 60px;
}

/* Search Interface */
.search-interface {
  max-width: 800px;
  margin: 100px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-interface .main-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #4639ff, #00efa9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.search-interface .sub-title {
  font-size: 1.2rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2rem;
}

.search-interface textarea {
  height: 100px;
  font-size: 1.1rem;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  resize: vertical;
  outline: none;
  font-family: inherit;
  overflow-y: auto;
}

.search-interface button {
  height: 50px;
  font-size: 1.2rem;
  color: #fff;
    background: linear-gradient(135deg, #4639ff, #00efa9);
    border: none;
    border-radius: 8px;
}

/* Model Selection */
.model-selection {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 1rem 0;
}

.model-checkbox {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  padding: 0.8rem 1.2rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.model-checkbox img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  order: 2;
}

.model-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.model-checkbox span.checkmark {
  order: 3;
}

.model-checkbox:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Scrollbar Styles */
.messages,
textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(70, 57, 255, 0.5) rgba(255, 255, 255, 0.1);
}

.messages::-webkit-scrollbar,
textarea::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.messages::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(70, 57, 255, 0.6), rgba(0, 239, 169, 0.6));
  border-radius: 3px;
  transition: all 0.3s ease;
}

.messages::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(70, 57, 255, 0.8), rgba(0, 239, 169, 0.8));
}

.messages::-webkit-scrollbar-corner,
textarea::-webkit-scrollbar-corner {
  background: transparent;
}

/* Chat Messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 100px;
}

.message {
  display: flex;
  align-items: flex-start;
  max-width: 80%;
}

.message.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.bot {
  align-self: flex-start;
}

.avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
}

.avatar img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.message-content {
  background: linear-gradient(135deg, #4639ff, #00efa9);
  backdrop-filter: blur(10px);
  padding: 15px 30px;
  border-radius: 12px;
  color: white;
  line-height: 1.5;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.message.user .message-content {
  background: linear-gradient(135deg, rgba(70, 57, 255, 0.3), rgba(0, 239, 169, 0.3));
}

/* Chat Grid */
.chat-grid {
  display: grid;
  gap: 20px;
  padding: 20px;
  margin: 0 auto;
  max-width: 100%;
}

.chat-grid[data-count="1"] {
  grid-template-columns: minmax(0, 800px);
  justify-content: center;
}

.chat-grid[data-count="2"] {
  grid-template-columns: repeat(2, minmax(0, 600px));
  max-width: 1240px;
}

.chat-grid[data-count="3"] {
  grid-template-columns: repeat(3, 1fr);
}

/* Chat Section */
.chat-section {
  background: rgba(20, 20, 20, 0.5);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
}

/* Tablet and Mobile Styles */
@media (max-width: 1200px) {
  .chat-grid {
    grid-template-columns: 1fr;
  }

  .chat-grid[data-count="1"],
  .chat-grid[data-count="2"],
  .chat-grid[data-count="3"] {
    grid-template-columns: 1fr;
  }

  .chat-section {
    height: calc(100vh - 260px);
    margin-bottom: 20px;
  }

  .chat-section.active {
    display: flex;
  }
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  .chat-section {
    display: flex;
    height: calc(100vh - 180px);
    /* margin: 60px 10px 70px; */
  }

  .chat-container {
    margin-top: 100px;
    margin-bottom: 70px;
    padding-bottom: 60px;
  }
 
  .messages {
    padding-bottom: 120px;
  }

  .input-container {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 10px 15px;
    background: rgba(10, 10, 10, 0.9);
  }
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(70, 57, 255, 0.1);
}

.header-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

/* Input Container */
.input-container {
  padding: 15px;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 10px;
  align-items: center;
}

.input-container textarea {
  flex: 1;
  height: 40px;
  min-height: 40px;
  max-height: 120px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  resize: none;
  outline: none;
  font-family: inherit;
  line-height: 24px;
  overflow-y: auto;
}

.input-controls {
  display: flex;
  align-items: center;
}

.input-controls .send-button {
  height: 40px;
  padding: 0 20px;
  white-space: nowrap;
  background: linear-gradient(135deg, #4639ff, #00efa9);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.input-controls .send-button:hover {
  opacity: 0.9;
}

/* Footer */
.footer {
  background: rgba(10, 10, 10, 0.7);
  backdrop-filter: blur(10px);
  padding: 1rem;
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9;
}
/* Model Tabs */
.model-tabs {
    display: none;
}

@media (max-width: 1200px) {
    .model-tabs {
        display: flex;
        justify-content: center;
        gap: 10px;
        padding: 15px;
        margin: 110px 15px 20px;
        background: rgba(20, 20, 20, 0.5);
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        position: relative;
        z-index: 5;
    }

    .model-tab {
        flex: 1;
        padding: 10px;
        text-align: center;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.05);
        color: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.1);
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
    }

    .model-tab.active {
        background: linear-gradient(135deg, #4639ff, #00efa9);
        color: white;
        border: none;
    }
}

@media (max-width: 768px) {
    .model-tabs {
        margin: 100px 10px 15px;
        padding: 10px;
    }

    .model-tab {
        padding: 8px;
        font-size: 0.9rem;
    }
}
/* Animations */
@keyframes float {
  0%, 100% {
      transform: translate(-50%, -50%) translateY(-30px) translateX(-20px);
  }
  25% {
      transform: translate(-50%, -50%) translateY(0px) translateX(20px);
  }
  50% {
      transform: translate(-50%, -50%) translateY(30px) translateX(-10px);
  }
  75% {
      transform: translate(-50%, -50%) translateY(0px) translateX(10px);
  }
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .nav-links {
      display: none;
  }

  .chat-container {
      margin-bottom: 0;
      padding-bottom: 80px;
  }

  .chat-grid{
    padding: 0 15px;
  }

  .footer {
      display: none;
  }

  .search-interface .main-title {
      font-size: 2rem;
  }

  .search-interface .sub-title {
      font-size: 1rem;
  }

  .model-selection {
      flex-direction: row;
      justify-content: center;
      gap: 1rem;
      flex-wrap: nowrap;
      padding: 0 10px;
  }

  .model-checkbox {
      width: auto;
      padding: 0.6rem;
      background: rgba(20, 20, 20, 0.5);
  }

  .model-checkbox img {
      width: 28px;
      height: 28px;
      margin: 0;
  }

  .model-checkbox span.checkmark,
  .model-checkbox span:not(.checkmark),
  .model-checkbox > span.checkmark + span {
      display: none !important;
      width: 0;
      height: 0;
      opacity: 0;
      visibility: hidden;
      position: absolute;
  }

  .input-container {
      position: relative;
      height: 150px;
      width: 94%;
      margin: 0 auto;
      padding: 12px;
  }

  .input-container textarea {
      height: 45%;
      min-height: 40px;
      max-height: 80px;
      overflow-y: auto;
  }

  .input-controls {
      position: absolute;
      bottom: 30px;
      left: 14px;
      right: 14px;
  }
}

@media (max-width: 1200px) {
  .chat-grid {
      grid-template-columns: 1fr;
  }

  .chat-grid[data-count="1"],
  .chat-grid[data-count="2"],
  .chat-grid[data-count="3"] {
      grid-template-columns: 1fr;
  }

  .chat-section {
      display: none;
      height: calc(100vh - 260px);
      margin-bottom: 0px !important;
  }

  .chat-section.active {
      display: flex;
  }


  
  
  @media (max-width: 1200px) {
      .model-tabs {
          display: flex;
          justify-content: center;
          gap: 10px;
          padding: 15px;
          margin-bottom: 20px;
          background: rgba(20, 20, 20, 0.5);
          border-radius: 12px;
          border: 1px solid rgba(255, 255, 255, 0.1);
      }
  }
  
  /* Mobile Input Styles */
  @media (max-width: 768px) {
      .input-container {
          position: relative;
          height: auto;
          width: 94%;
          margin: 0 auto;
          padding: 12px;
          display: flex;
          flex-direction: row;
          align-items: center;
          gap: 10px;
      }
  
      .input-container textarea {
          height: 40px;
          min-height: 40px;
          padding: 8px 12px;
      }
  
      .input-controls {
          position: static;
          height: 40px;
      }
  
      .input-controls .send-button {
          height: 40px;
          padding: 0 20px;
          margin: 0;
      }
  }

  .model-tab {
      padding: 8px 16px;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.05);
      color: rgba(255, 255, 255, 0.7);
      border: 1px solid rgba(255, 255, 255, 0.1);
      cursor: pointer;
      transition: all 0.3s ease;
  }

  .model-tab.active {
      background: linear-gradient(135deg, #4639ff, #00efa9);
      color: white;
      border: none;
  }
}

/* Bottom Navigation */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(10px);
    padding: 1rem;
    justify-content: space-around;
    z-index: 10;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.bottom-nav .nav-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    min-width: 100px;
    justify-content: center;
}

.bottom-nav .nav-item i {
    font-size: 1.2rem;
}

.bottom-nav .nav-item span {
    font-size: 0.9rem;
}

.bottom-nav .nav-item.active {
    color: #fff;
    background: linear-gradient(135deg, #4639ff, #00efa9);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    .search-interface {
        margin: 100px auto;
        padding: 0 15px;
    }

    .search-interface textarea {
        height: 80px;
        min-height: 60px;
        max-height: 120px;
        overflow-y: auto;
    }

    .model-selection {
        padding: 0;
        margin: 0.5rem 0;
    }

    .chat-container {
        margin-top: 100px;
        margin-bottom: 70px;
    }

    .input-container {
        position: fixed;
        bottom: 70px;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 10px 15px;
        background: rgba(10, 10, 10, 0.9);
    }

    .input-container textarea {
        height: 40px;
    }

    .messages {
        padding-bottom: 120px;
    }
}

@media (max-width: 480px) {
    .search-interface .main-title {
        font-size: 1.8rem;
    }

    .search-interface .sub-title {
        font-size: 0.9rem;
    }

    .model-checkbox {
        padding: 0.5rem;
    }

    .model-checkbox img {
        width: 24px;
        height: 24px;
    }

    .bottom-nav .nav-item {
        min-width: auto;
        /* padding: 0.5rem; */
    }
}

.wallet-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.wallet-button i {
    font-size: 16px;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .wallet-button {
        margin-left: auto;
        white-space: nowrap;
        padding: 6px 12px;
    }

    .nav-links {
        margin-right: auto;
    }

    .top-nav {
        justify-content: space-between;
        padding: 1rem 2rem;
    }
}