@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

:root {
  --text-color: #ffffff; 
  --subheading-color: rgba(255, 255, 255, 0.7); 
  --placeholder-color: rgba(255, 255, 255, 0.5); 
  --primary-color: #000000; 
  --secondary-color: rgba(0, 0, 0, 0.8);
  --secondary-hover-color: rgba(0, 0, 0, 0.6); 
  --scrollbar-color: rgba(255, 255, 255, 0.3); 
  --sidebar-width: 320px;
  --sidebar-collapsed-width: 0px;
}

body.light-theme {
  --text-color: #000000; 
  --subheading-color: rgba(0, 0, 0, 0.7); 
  --placeholder-color: rgba(0, 0, 0, 0.5); 
  --primary-color: #ffffff; 
  --secondary-color: rgba(255, 255, 255, 0.8); 
  --secondary-hover-color: rgba(255, 255, 255, 0.6);
  --scrollbar-color: rgba(0, 0, 0, 0.3); 
}

body {
  color: var(--text-color);
  background: var(--primary-color);
  transition: background 0.3s ease, color 0.3s ease;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ============================================
   AUTH OVERLAY STYLES - FULL BLACK GLASS EFFECT
============================================ */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000000;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 24px;
  padding: 40px 35px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #ffffff;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideUp 0.6s ease;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-title {
  font-size: 2rem;
  background: linear-gradient(135deg, #ffffff, #a0a0a0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.auth-subtitle {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  font-weight: 400;
}

.auth-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.02);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 10px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.95rem;
}

.auth-tab .material-symbols-rounded {
  font-size: 20px;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.auth-tab:hover:not(.active) {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.8);
}

.auth-form {
  display: block;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.form-group label .material-symbols-rounded {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.6);
}

.form-group input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #ffffff;
  outline: none;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.form-group input:focus {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05),
              inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-actions {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn {
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}

.btn .material-symbols-rounded {
  font-size: 20px;
}

.btn.primary {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  width: 100%;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.primary:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn.primary:active {
  transform: translateY(0);
}

.auth-note {
  margin-top: 15px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  line-height: 1.5;
}

.auth-feedback {
  margin-top: 20px;
  min-height: 20px;
  font-size: 13px;
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  font-weight: 500;
  backdrop-filter: blur(10px);
}

.auth-footer {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.auth-footer p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   CHAT HISTORY SIDEBAR STYLES - TOGGLE FUNCTIONALITY
============================================ */
.chat-history-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform: translateX(-100%);
}

/* Active state - sidebar visible */
.chat-history-sidebar.active {
  transform: translateX(0);
}

body.light-theme .chat-history-sidebar {
  background: rgba(255, 255, 255, 0.95);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

body.light-theme .sidebar-header {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.new-chat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  flex: 1;
  justify-content: flex-start;
  white-space: nowrap;
  overflow: hidden;
}

body.light-theme .new-chat-btn {
  background: rgba(0, 0, 0, 0.1);
  color: black;
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.new-chat-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

body.light-theme .new-chat-btn:hover {
  background: rgba(0, 0, 0, 0.15);
}

.close-sidebar-btn {
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  margin-left: 10px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-sidebar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

body.light-theme .close-sidebar-btn:hover {
  background: rgba(0, 0, 0, 0.1);
}

.sidebar-content {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-color) transparent;
  transition: all 0.3s ease;
}

.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color);
  border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-color);
}

.chat-sessions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-session-item {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

body.light-theme .chat-session-item {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-session-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

body.light-theme .chat-session-item:hover {
  background: rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 0, 0, 0.2);
}

.chat-session-item.active {
  background: rgba(29, 126, 253, 0.2);
  border-color: rgba(29, 126, 253, 0.5);
}

.chat-session-content {
  flex: 1;
  overflow: hidden;
}

.chat-session-title {
  font-size: 14px;
  color: var(--text-color);
  margin-bottom: 4px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.chat-session-date {
  font-size: 12px;
  color: var(--placeholder-color);
  transition: all 0.3s ease;
}

.delete-session-btn {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff3b30;
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  opacity: 0;
  transform: scale(0.8);
  margin-left: 8px;
  flex-shrink: 0;
}

.delete-session-btn .material-symbols-rounded {
  font-size: 18px;
}

.chat-session-item:hover .delete-session-btn {
  opacity: 1;
  transform: scale(1);
}

.delete-session-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  transform: scale(1.1);
}

.no-chats-message {
  text-align: center;
  color: var(--placeholder-color);
  font-size: 14px;
  padding: 40px 20px;
  line-height: 1.6;
  transition: all 0.3s ease;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Menu Toggle Button */
.menu-toggle-btn {
  position: fixed;
  left: 20px;
  top: 20px;
  background: var(--secondary-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.light-theme .menu-toggle-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.menu-toggle-btn:hover {
  background: var(--secondary-hover-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

body.light-theme .menu-toggle-btn:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Hide menu button when sidebar is active */
.chat-history-sidebar.active ~ .container .menu-toggle-btn {
  opacity: 0;
  pointer-events: none;
}

/* ============================================
   MAIN CONTAINER - NO MARGIN ADJUSTMENTS
============================================ */
.container {
  flex: 1;
  overflow-y: auto;
  padding: 32px 0 0;
  height: calc(100vh - 127px);
  scrollbar-color: var(--scrollbar-color) transparent;
  position: relative;
  z-index: 1;
  width: 100%;
  transition: all 0.3s ease;
}

.container :where(.app-header, .suggestions, .message, .prompt-wrapper) {
  position: relative;
  margin: 0 auto;
  width: 100%;
  padding: 0 20px;
  max-width: 990px;
}

.container .app-header {
  margin-top: 3vh;
  position: relative;
}

.app-header .heading {
  width: fit-content;
  font-size: 3rem;
  background: linear-gradient(to right, #1d7efd, #8f6fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 auto;
  text-align: center;
  transition: all 0.3s ease;
}

.app-header .sub-heading {
  font-size: 2.6rem;
  margin-top: -5px;
  color: var(--subheading-color);
  text-align: center;
  transition: all 0.3s ease;
}

.container .suggestions {
  width: 100%;
  list-style: none;
  display: flex;
  gap: 15px;
  margin-top: 9.5vh;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

body.chats-active .container :where(.app-header, .suggestions) {
  display: none;
}

.video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: opacity 0.5s ease;
}

.suggestions .suggestions-item {
  cursor: pointer;
  padding: 18px;
  width: 228px;
  flex-shrink: 0;
  display: flex;
  scroll-snap-align: center;
  flex-direction: column;
  align-items: flex-end;
  border-radius: 12px;
  justify-content: space-between;
  background: var(--secondary-color);
  transition: 0.3s ease;
}

.suggestions .suggestions-item:hover {
  background: var(--secondary-hover-color);
  transform: translateY(-2px);
}

.suggestions .suggestions-item .text {
  font-size: 1.1rem;
  color: var(--text-color);
}

.suggestions .suggestions-item .icon {
  width: 45px;
  height: 45px;
  display: flex;
  font-size: 1.4rem;
  margin-top: 35px;
  align-self: flex-end;
  align-items: center;
  border-radius: 50%;
  justify-content: center;
  color: #1d7efd;
  background: var(--primary-color);
}

.suggestions .suggestions-item:nth-child(2) .icon {
  color: #28a745;
}

.suggestions .suggestions-item:nth-child(3) .icon {
  color: #ffc107;
}

.suggestions .suggestions-item:nth-child(4) .icon {
  color: #6f42c1;
}

.container .chats-container {
  display: flex;
  gap: 20px;
  flex-direction: column;
  padding-bottom: 140px;
}

.chats-container .message {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.chats-container .message .avatar {
  width: 43px;
  height: 43px;
  flex-shrink: 0;
  align-self: flex-start;
  border-radius: 50%;
  padding: 6px;
  margin-right: -7px;
  background: var(--secondary-color);
  border: 1px solid var(--secondary-hover-color);
}

.chats-container .message.loading .avatar {
  animation: rotate 3s linear infinite;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.chats-container .message .message-text {
  padding: 3px 16px;
  word-wrap: break-word;
  white-space: pre-line;
  color: var(--text-color);
  line-height: 1.5;
}

.chats-container .message .message-text.error {
  color: #d62939;
}

.chats-container .bot-message {
  margin: 9px auto;
}

.chats-container .bot-message .message-text {
  padding: 12px 16px;
  max-width: 75%;
  background: var(--secondary-color);
  border-radius: 13px 13px 13px 3px;
  backdrop-filter: blur(5px);
}

.chats-container .user-message {
  flex-direction: column;
  align-items: flex-end;
}

.chats-container .user-message .message-text {
  padding: 12px 16px;
  max-width: 75%;
  background: var(--secondary-color);
  border-radius: 13px 13px 3px 13px;
  backdrop-filter: blur(5px);
}

.chats-container .user-message .img-attachment {
  margin-top: -7px;
  width: 50%;
  border-radius: 13px 3px 13px 13px;
  max-width: 400px;
}

.chats-container .user-message .file-attachment {
  display: flex;
  gap: 6px;
  align-items: center;
  padding: 10px;
  margin-top: -7px;
  border-radius: 13px 3px 13px 13px;
  background: var(--secondary-color);
  backdrop-filter: blur(5px);
  max-width: 300px;
}

.chats-container .user-message .file-attachment span {
  color: #1d7efd;
}

.container .prompt-container {
  position: fixed;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 16px 0;
  background: transparent;
  z-index: 2;
  transition: all 0.3s ease;
}

.prompt-container :where(.prompt-wrapper, .prompt-form, .prompt-actions) {
  display: flex;
  gap: 12px;
  height: 56px;
  align-items: center;
}

.prompt-container .prompt-form {
  height: 100%;
  width: 100%;
  border-radius: 130px;
  background: var(--secondary-color);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .prompt-container .prompt-form {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.prompt-form .prompt-input {
  width: 100%;
  height: 100%;
  background: none;
  outline: none;
  border: none;
  font-size: 1rem;
  color: var(--text-color);
  padding-left: 24px;
}

.prompt-form .prompt-input::placeholder {
  color: var(--placeholder-color);
}

.prompt-wrapper button {
  width: 56px;
  height: 100%;
  flex-shrink: 0;
  cursor: pointer;
  border-radius: 50%;
  font-size: 1.4rem;
  border: none;
  color: var(--text-color);
  background: var(--secondary-color);
  transition: 0.3s ease;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-theme .prompt-wrapper button {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.prompt-wrapper :is(button:hover, #cancel-file-btn, .file-icon) {
  background: var(--secondary-hover-color);
}

.prompt-form .prompt-actions {
  gap: 5px;
  margin-right: 7px;
}

.prompt-wrapper .prompt-form :where(.file-upload-wrapper, button, img) {
  position: relative;
  height: 45px;
  width: 45px;
}

.prompt-form .prompt-actions #send-prompt-btn {
  color: #fff;
  display: none;
  background: #1d7efd;
  border: none;
}

.prompt-form .prompt-input:valid~.prompt-actions #send-prompt-btn {
  display: block;
}

.prompt-form #send-prompt-btn:hover {
  background: #0264e3;
}

.prompt-form .file-upload-wrapper :where(button, img) {
  display: none;
  border-radius: 50%;
  object-fit: cover;
  position: absolute;
}

.prompt-form .file-upload-wrapper.active #add-file-btn {
  display: none;
}

.prompt-form .file-upload-wrapper #add-file-btn,
.prompt-form .file-upload-wrapper.active.img-attached img,
.prompt-form .file-upload-wrapper.active.file-attached .file-icon,
.prompt-form .file-upload-wrapper.active:hover #cancel-file-btn {
  display: block;
}

.prompt-form :is(#stop-response-btn:hover, #cancel-file-btn) {
  color: #d62939;
}

.prompt-wrapper .prompt-form .file-icon {
  color: #1d7efd;
}

.prompt-form #stop-response-btn,
body.bot-responding .prompt-form .file-upload-wrapper {
  display: none;
}

body.bot-responding .prompt-form #stop-response-btn {
  display: block;
}

.prompt-container .disclaimer-text {
  font-size: 0.9rem;
  text-align: center;
  padding: 16px 20px 0;
  color: var(--placeholder-color);
  background: transparent;
  backdrop-filter: blur(5px);
  line-height: 1.4;
}

/* ============================================
   DELETE BUTTON - SMART FUNCTIONALITY
============================================ */
#delete-chats-btn {
  background: var(--secondary-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

body.light-theme #delete-chats-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Delete button in main window (delete functionality) */
body:not(.chats-active) #delete-chats-btn {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
  color: #ff3b30;
}

body:not(.chats-active) #delete-chats-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  transform: translateY(-2px);
}

/* Delete button in conversation window (back button functionality) */
body.chats-active #delete-chats-btn {
  background: var(--secondary-color);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-color);
}

body.light-theme.chats-active #delete-chats-btn {
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.chats-active #delete-chats-btn:hover {
  background: var(--secondary-hover-color);
  transform: translateY(-2px);
}

/* Logout button styling */
#logout-btn {
  background: rgba(255, 59, 48, 0.1);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

#logout-btn:hover {
  background: rgba(255, 59, 48, 0.2);
  color: #ff3b30;
}

/* Network Status Indicator */
#network-status {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  z-index: 1000;
  transition: background-color 0.3s;
  border: 2px solid var(--primary-color);
}

/* Status Message Styles */
.status-message {
  position: fixed;
  top: 30px;
  right: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  z-index: 1000;
  max-width: 200px;
  animation: fadeOut 3s forwards;
}

@keyframes fadeOut {
  0% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE & TABLET
============================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 280px;
  }

  /* Menu toggle button positioning for mobile */
  .menu-toggle-btn {
    left: 15px;
    top: 15px;
    padding: 10px;
  }
  
  .app-header .heading {
    font-size: 2.2rem;
    text-align: center;
    margin: 0 auto;
  }
  
  .app-header .sub-heading {
    font-size: 1.8rem;
    text-align: center;
    margin: 0 auto;
  }

  .auth-card {
    padding: 30px 25px;
    margin: 20px;
  }

  .auth-title {
    font-size: 1.6rem;
  }
  
  .sidebar-header {
    padding: 15px;
  }
  
  .sidebar-content {
    padding: 15px;
  }

  .new-chat-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .container {
    padding: 20px 0 0;
  }
  
  .container .chats-container {
    gap: 15px;
    padding-bottom: 150px;
  }
  
  .chats-container .bot-message {
    margin: 4px auto;
  }
  
  .prompt-container :where(.prompt-wrapper, .prompt-form, .prompt-actions) {
    gap: 8px;
    height: 53px;
  }
  
  .prompt-container button {
    width: 53px;
  }
  
  .prompt-form :is(.file-upload-wrapper, button, img) {
    height: 42px;
    width: 42px;
  }
  
  .prompt-form .prompt-input {
    padding-left: 20px;
  }
  
  .prompt-form .file-upload-wrapper.active #cancel-file-btn {
    opacity: 0;
  }
  
  .prompt-wrapper.hide-controls :where(#theme-toggle-btn, #delete-chats-btn, #logout-btn) {
    display: none;
  }

  .chats-container .bot-message .message-text,
  .chats-container .user-message .message-text {
    max-width: 85%;
  }

  .chats-container .user-message .img-attachment {
    width: 80%;
  }
}

@media (max-width: 480px) {
  :root {
    --sidebar-width: 100%;
  }

  .auth-card {
    padding: 25px 20px;
    margin: 15px;
  }

  .auth-title {
    font-size: 1.4rem;
  }

  .auth-tab {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .app-header .heading {
    font-size: 1.8rem;
  }

  .app-header .sub-heading {
    font-size: 1.4rem;
  }

  .suggestions .suggestions-item {
    width: 200px;
    padding: 15px;
  }

  .suggestions .suggestions-item .text {
    font-size: 1rem;
  }

  .chats-container .message .avatar {
    width: 38px;
    height: 38px;
  }

  .prompt-container {
    padding: 12px 0;
  }

  .menu-toggle-btn {
    left: 10px;
    top: 10px;
    padding: 8px;
  }
}

/* Scrollbar styling for webkit browsers */
.container::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.container::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.container::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb {
  background: var(--scrollbar-color);
  border-radius: 3px;
}

.container::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-color);
}

/* Hide scrollbar for suggestions on webkit */
.suggestions::-webkit-scrollbar {
  display: none;
}

/* ============================================
   ADDITIONAL ENHANCEMENTS
============================================ */

/* Smooth transitions for all interactive elements */
button, .chat-session-item, .suggestions-item {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced focus states for accessibility */
button:focus-visible,
.chat-session-item:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(29, 126, 253, 0.5);
  outline-offset: 2px;
}

/* Loading state for chat sessions */
.chat-sessions-list.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Empty state styling */
.no-chats-message {
  animation: fadeIn 0.5s ease;
}

/* Pulse animation for active chat indicator */
.chat-session-item.active::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 50%;
  background: #1d7efd;
  border-radius: 2px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Sidebar backdrop blur effect */
.chat-history-sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: -1;
}

/* Gradient overlay for better readability */
.video-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.3) 0%,
    transparent 20%,
    transparent 80%,
    rgba(0, 0, 0, 0.3) 100%
  );
  pointer-events: none;
}

body.light-theme .video-container::after {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.3) 0%,
    transparent 20%,
    transparent 80%,
    rgba(255, 255, 255, 0.3) 100%
  );
}

/* Enhanced button hover effects */
.prompt-wrapper button:active {
  transform: scale(0.95);
}

.menu-toggle-btn:active {
  transform: translateY(-2px) scale(0.95);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Selection styling */
::selection {
  background: rgba(29, 126, 253, 0.3);
  color: var(--text-color);
}

::-moz-selection {
  background: rgba(29, 126, 253, 0.3);
  color: var(--text-color);
}

/* Improved contrast for light theme */
body.light-theme .auth-card {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1),
              inset 0 1px 0 rgba(0, 0, 0, 0.05);
}

body.light-theme .auth-card::before {
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

body.light-theme .auth-title {
  background: linear-gradient(135deg, #000000, #606060);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.light-theme .auth-tab.active {
  background: rgba(0, 0, 0, 0.1);
  color: #000000;
}

body.light-theme .btn.primary {
  background: rgba(0, 0, 0, 0.1);
  color: #000000;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-theme .btn.primary:hover {
  background: rgba(0, 0, 0, 0.15);
}

/* Tooltip styles for buttons */
.prompt-wrapper button[title],
.menu-toggle-btn[title] {
  position: relative;
}

/* Mobile-specific adjustments */
@media (hover: none) and (pointer: coarse) {
  .chat-session-item .delete-session-btn {
    opacity: 1;
    transform: scale(1);
  }
  
  .prompt-wrapper button:active {
    transform: scale(0.92);
  }
}

/* Prevent text selection on buttons */
button, .chat-session-item, .suggestions-item {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow text selection in messages */
.message-text {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
