body {
  margin: 0;
  padding: 0;
  position: relative;
  min-height: 100vh;
  background: url("astro_background.jpg") no-repeat center center fixed;
  background-size: cover;
  color: white;
  font-family: "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.star {
  position: absolute;
  background: white;
  border-radius: 50%;
  opacity: 0;
  display: none;
  pointer-events: none;
  z-index: 0;
  animation: twinkle 5s infinite ease-in-out;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

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

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.astro-logo {
  height: 80px;
  width: auto;
}

nav {
  display: flex;
  gap: 0.6rem;
}

button.tab {
  background: #9333ea;
  color: white;
  border: none;
  padding: 6px 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

button.tab:hover {
  background: #a855f7;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

.auth-box,
.astro-box {
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #9333ea;
  padding: 2rem;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 12px;
}

.ultra-wide-box {
  width: 94%;
  max-width: 100%;
  height: 75vh;
}

/* ================================
   Messages page (WhatsApp-like UI)
   ================================ */
.chat-page-container {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 1rem;
  height: 100%;
}

.chat-left-pane {
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.chat-search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
}

.conversation-list,
.conversation-search-results {
  overflow-y: auto;
  padding: 0.5rem;
  flex: 1;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #a855f7 rgba(0, 0, 0, 0.1); /* Firefox */
}

.conversation-list::-webkit-scrollbar,
.conversation-search-results::-webkit-scrollbar { width: 6px; }
.conversation-list::-webkit-scrollbar-track,
.conversation-search-results::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 4px; }
.conversation-list::-webkit-scrollbar-thumb,
.conversation-search-results::-webkit-scrollbar-thumb { background: #a855f7; border-radius: 4px; }
.conversation-list::-webkit-scrollbar-thumb:hover,
.conversation-search-results::-webkit-scrollbar-thumb:hover { background: #9333ea; }

.conversation-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  border: 1px solid transparent;
}

.conversation-item:hover {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-1px);
}

.conversation-item.search {
  background: rgba(0, 0, 0, 0.35);
  border: 1px dashed rgba(168, 85, 247, 0.3);
}

.conversation-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.conversation-preview {
  color: #cfcfcf;
  font-size: 0.9rem;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.unread-dot {
  color: #22c55e;
  margin-left: 6px;
}

.chat-right-pane {
  display: grid;
  grid-template-rows: 56px 1fr 64px;
  background: rgba(0, 0, 0, 0.45);
  border: 2px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(168, 85, 247, 0.25);
  font-weight: 600;
}

.message-list {
  padding: 0.75rem;
  overflow-y: auto;
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #a855f7 rgba(0, 0, 0, 0.1); /* Firefox */
}

.message-list::-webkit-scrollbar { width: 6px; }
.message-list::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius:4px; }
.message-list::-webkit-scrollbar-thumb { background: #a855f7; border-radius:4px; }
.message-list::-webkit-scrollbar-thumb:hover { background: #9333ea; }

.message-composer {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 0.5rem;
  align-items: center;
  padding: 0.75rem;
  border-top: 1px solid rgba(168, 85, 247, 0.25);
}

#messageInput {
  padding: 0.8rem 1rem;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid #a855f7;
  border-radius: 10px;
  color: #fff;
  outline: none;
}

@media (max-width: 1024px) {
  .chat-page-container {
    grid-template-columns: 300px 1fr;
  }
}

@media (max-width: 780px) {
  .chat-page-container {
    grid-template-columns: 1fr;
    height: auto;
  }
  .chat-right-pane {
    margin-top: 0.75rem;
    min-height: 60vh;
  }
}

/* Dashboard Layout */
.dashboard-container {
  display: flex;
  max-width: 1550px;
  height: calc(100vh - 200px);
}

/* Sidebar Styles */
.sidebar {
  width: 280px;
  background: rgba(0, 0, 0, 0.4);
  border: 3px solid #9333ea;
  border-radius: 12px;
  padding: 1.5rem;
  height: fit-content;
  max-height: 100%;
  overflow-y: auto;
  flex-shrink: 0;

  /* Custom scrollbar styling */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #a855f7 rgba(0, 0, 0, 0.1); /* Firefox */
}

/* Sidebar scrollbar styling (Chrome, Safari, Edge) */
.sidebar::-webkit-scrollbar {
  width: 1px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* Profile Section */
.sidebar-profile {
  text-align: center;
  border-bottom: 1px solid rgba(147, 51, 234, 0.3);
}

.profile-picture {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: center;
}

.astro-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: transparent;
  position: relative;
  overflow: hidden;
}

.astro-avatar::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  z-index: -1;
  opacity: 0.3;
}

.profile-name {
  margin: 0 0 0.75rem 0;
  color: white;
  font-size: 1.8rem;
  font-weight: bold;
  letter-spacing: 0.5px;
}

.profile-description {
  margin: 0;
  color: #b8b8b8;
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 200px;
  margin: 0 auto;
}

/* Social Links */
.social-links {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  color: #a855f7;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.social-link:hover {
  color: #9333ea;
  transform: translateX(4px);
}

.social-icon {
  font-size: 1.2rem;
  min-width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.4rem 1rem;
  background: #a855f7;
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 0.9rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
}

.action-btn:hover {
  background: #9333ea;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4);
}

.action-icon {
  font-size: 1.2rem;
  min-width: 24px;
}

/* Main Chat Area */
.main-chat-area {
  flex: 1;
  min-width: 0;
}

/* ===========================================
   FRIENDS PAGE DEDICATED STYLES 
   =========================================== */

/* Friends Page Container */
.friends-page-container {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 10 !important;
}

.friends-new-container {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
  padding: 2rem !important;
  height: 60vh !important;
  min-height: 70vh !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Friends Search Bar */
.friends-search-bar {
  display: flex !important;
  gap: 0.75rem !important;
  align-items: center !important;
  margin-bottom: 0.5rem !important;
}

.friends-search-input {
  flex: 1 !important;
  padding: 1rem 1.25rem !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 2px solid #a855f7 !important;
  border-radius: 12px !important;
  color: white !important;
  font-size: 1rem !important;
  outline: none !important;
  transition: all 0.3s ease !important;
}

.friends-search-input::placeholder {
  color: #ccc !important;
  opacity: 1 !important;
}

.friends-search-input:focus {
  border-color: #9333ea !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2) !important;
  transform: translateY(-1px) !important;
}

.friends-search-btn {
  padding: 1rem 1.25rem !important;
  background: #a855f7 !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1.2rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  min-width: 50px !important;
  margin-bottom: 13px;
}

.friends-search-btn:hover {
  background: #9333ea !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4) !important;
}

/* Friends Navigation Tabs */
.friends-nav-tabs {
  display: flex !important;
  gap: 0.5rem !important;
  margin-bottom: 1.5rem !important;
  border-bottom: 2px solid rgba(168, 85, 247, 0.2) !important;
  padding-bottom: 1rem !important;
}

.friends-tab-btn {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  padding: 0.75rem 1.25rem !important;
  background: rgba(0, 0, 0, 0.3) !important;
  border: 2px solid rgba(168, 85, 247, 0.3) !important;
  border-radius: 10px !important;
  color: #ccc !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
}

.friends-tab-btn:hover {
  background: rgba(168, 85, 247, 0.1) !important;
  border-color: #a855f7 !important;
  color: white !important;
  transform: translateY(-1px) !important;
}

.friends-tab-btn.active {
  background: #a855f7 !important;
  border-color: #9333ea !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3) !important;
}

.tab-icon {
  font-size: 1.1rem !important;
}

.tab-text {
  font-weight: 600 !important;
}

/* Friends Content Area */
.friends-content-area {
  flex: 1 !important;
}

.friends-tab-content {
  display: none !important;
  animation: fadeIn 0.3s ease-in-out !important;
}

.friends-tab-content.active {
  display: block !important;
}

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

.friends-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
  max-height: 400px !important;
  overflow-y: auto !important;
  padding-right: 0.5rem !important;
}

/* Custom scrollbar for friends list */
.friends-list::-webkit-scrollbar {
  width: 6px !important;
}

.friends-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.3) !important;
  border-radius: 3px !important;
}

.friends-list::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #a855f7, #9333ea) !important;
  border-radius: 3px !important;
}

.friends-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9333ea, #7c3aed) !important;
}

/* Friend Item Card */
.friends-item-card {
  display: flex !important;
  align-items: center !important;
  gap: 1rem !important;
  padding: 1.25rem !important;
  background: rgba(0, 0, 0, 0.5) !important;
  border: 2px solid rgba(168, 85, 247, 0.3) !important;
  border-radius: 10px !important;
  transition: all 0.3s ease !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.friends-item-card:hover {
  border-color: #a855f7 !important;
  background: rgba(0, 0, 0, 0.7) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.2) !important;
}

.friends-user-avatar {
  width: 55px !important;
  height: 55px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  border: 2px solid #a855f7 !important;
}

.friends-user-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.friends-user-details {
  flex: 1 !important;
  min-width: 0 !important;
  display: block !important;
}

.friends-user-name {
  color: white !important;
  font-weight: bold !important;
  font-size: 1.1rem !important;
  margin-bottom: 0.4rem !important;
  display: block !important;
}

.friends-user-info {
  color: #ccc !important;
  font-size: 0.9rem !important;
  display: block !important;
}

.friends-user-status {
  color: #a855f7 !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  margin-top: 0.3rem !important;
  display: block !important;
}

.friends-action-buttons {
  display: flex !important;
  gap: 0.75rem !important;
  flex-shrink: 0 !important;
  align-items: center !important;
}

/* Friend Action Buttons */
.friends-action-btn {
  padding: 0.6rem 1.2rem !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  white-space: nowrap !important;
  display: inline-block !important;
  background: rgba(168, 85, 247, 0.18) !important;
  border: 1px solid rgba(168, 85, 247, 0.35) !important;
  color: #fff !important;
}

.friends-action-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

.friends-action-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.32) !important;
  transform: translateY(-1px) !important;
}

.friends-btn-accept {
  background: #10b981 !important;
  color: white !important;
}

.friends-btn-accept:hover:not(:disabled) {
  background: #059669 !important;
  transform: translateY(-1px) !important;
}

.friends-btn-reject {
  background: #ef4444 !important;
  color: white !important;
}

.friends-btn-reject:hover:not(:disabled) {
  background: #dc2626 !important;
  transform: translateY(-1px) !important;
}

.friends-btn-cancel {
  background: #f59e0b !important;
  color: white !important;
}

.friends-btn-cancel:hover:not(:disabled) {
  background: #d97706 !important;
  transform: translateY(-1px) !important;
}

.friends-btn-add {
  background: #a855f7 !important;
  color: white !important;
}

.friends-btn-add:hover:not(:disabled) {
  background: #9333ea !important;
  transform: translateY(-1px) !important;
}

.friends-btn-message {
  background: #3b82f6 !important;
  color: white !important;
}

.friends-btn-message:hover:not(:disabled) {
  background: #2563eb !important;
  transform: translateY(-1px) !important;
}

.friends-btn-remove {
  background: #6b7280 !important;
  color: white !important;
}

.friends-btn-remove:hover:not(:disabled) {
  background: #4b5563 !important;
  transform: translateY(-1px) !important;
}

/* State Messages */
.friends-empty-message {
  text-align: center !important;
  color: #ccc !important;
  padding: 3rem 1rem !important;
  font-style: italic !important;
  font-size: 1.1rem !important;
  display: block !important;
}

.friends-error-message {
  text-align: center !important;
  color: #ef4444 !important;
  padding: 3rem 1rem !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  display: block !important;
}

.friends-loading-message {
  text-align: center !important;
  color: #a855f7 !important;
  padding: 3rem 1rem !important;
  font-weight: 600 !important;
  font-size: 1.1rem !important;
  display: block !important;
}

/* Responsive Design for Friends Page */
@media (max-width: 768px) {
  .friends-new-container {
    padding: 1rem !important;
    gap: 1rem !important;
  }

  .friends-nav-tabs {
    flex-wrap: wrap !important;
    gap: 0.25rem !important;
  }

  .friends-tab-btn {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.85rem !important;
  }

  .tab-text {
    display: none !important;
  }

  .tab-icon {
    font-size: 1.2rem !important;
  }

  .friends-item-card {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1rem !important;
  }

  .friends-action-buttons {
    justify-content: center !important;
    flex-wrap: wrap !important;
  }

  .friends-action-btn {
    padding: 0.5rem 1rem !important;
    font-size: 0.85rem !important;
  }

  .friends-search-bar {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .friends-search-btn {
    width: 100% !important;
  }

  .friends-list {
    max-height: 300px !important;
  }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .dashboard-container {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    max-height: 300px;
  }

  .main-chat-area {
    width: 100%;
  }
}

@media (max-width: 768px) {
  .dashboard-container {
    gap: 1rem;
  }

  .sidebar {
    padding: 1rem;
  }

  .sidebar-menu {
    gap: 0.25rem;
  }

  .sidebar-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Profile Picture Styles */
#profilePictureContainer {
  margin-bottom: 1rem;
}

#profilePreview {
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3);
}

#profilePreview:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.5);
}

#profilePreview img {
  border-radius: 50%;
}

/* Date Input Styling */
input[type="date"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #a855f7;
  border-radius: 6px;
  padding: 0.75rem;
  color: white;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box;
}

input[type="date"]:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3);
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit {
  color: white;
}

/* Checkbox Styling */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #a855f7;
  cursor: pointer;
}

input[type="checkbox"]:focus {
  outline: 2px solid #a855f7;
  outline-offset: 2px;
}

.auth-box input,
.astro-box input,
.auth-box textarea,
.astro-box textarea {
  display: block;
  width: 100%;
  margin-bottom: 0.8rem;
  padding: 0.6rem;
  background: #1f1f2e;
  color: white;
  border: 1px solid #9333ea;
  border-radius: 6px;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-box textarea,
.astro-box textarea {
  min-height: 80px;
  resize: vertical;
}

.auth-box input:focus,
.astro-box input:focus,
.auth-box textarea:focus,
.astro-box textarea:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

/* General textarea styling to match theme */
textarea {
  background: #1f1f2e;
  color: white;
  border: 1px solid #9333ea;
  border-radius: 6px;
  font-family: inherit;
}

textarea:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.2);
}

textarea::placeholder {
  color: #999;
  opacity: 1;
}

.auth-login-btn,
.settings-save-btn {
  background: #9333ea;
  color: white;
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

.auth-login-btn:hover,
.settings-save-btn:hover {
  background: #a855f7;
}

.chat-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 2rem;
}

.chat-input {
  width: 100%;
  max-width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: #1f1f2e;
  color: white;
  border: 1px solid #9333ea;
  border-radius: 6px;
}

.chat-button-row {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

/* New chat input wrapper with dropdown and inline send button */
.chat-input-wrapper {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
  max-width: 100%;
}

.dropdown-container {
  position: relative;
  margin-right: 0.5rem;
  margin-bottom: 14px;
}

.dropdown-toggle {
  width: 40px;
  height: 40px;
  background: #a855f7;
  border: 1px solid #a855f7;
  border-radius: 6px;
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.dropdown-toggle:hover {
  background: #9333ea;
  border-color: #9333ea;
}

.dropdown-menu {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: #1f1f2e;
  border: 1px solid #9333ea;
  border-radius: 6px;
  min-width: 180px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
  margin-bottom: 0.5rem;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  width: 100%;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: white;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 0.9rem;
}

.dropdown-item:hover {
  background: rgba(168, 85, 247, 0.1);
}

.dropdown-item:first-child {
  border-radius: 6px 6px 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 6px 6px;
}

.chat-input {
  flex: 1;
  padding: 0.75rem 80px 0.75rem 1rem;
  font-size: 1rem;
  background: #1f1f2e;
  color: white;
  border: 1px solid #9333ea;
  border-radius: 6px;
}

.send-button-inline {
  position: absolute;
  right: 3px;
  top: 38%;
  transform: translateY(-50%);
  background: #a855f7;
  border: 1px solid #a855f7;
  border-radius: 4px;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-button-inline:hover {
  background: #9333ea;
  border-color: #9333ea;
}

/* Chat Messages Container */
.chat-messages-container {
  max-height: 57vh;
  min-height: 45vh;
  overflow-y: auto;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  border: 1px solid rgba(147, 51, 234, 0.3);

  /* Custom scrollbar styling */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #a855f7 rgba(0, 0, 0, 0.1); /* Firefox */
}

/* Webkit scrollbar styling (Chrome, Safari, Edge) */
.chat-messages-container::-webkit-scrollbar {
  width: 1px;
}

.chat-messages-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: #a855f7;
  border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
  background: #9333ea;
}

/* Chat Messages */
/* Legacy chat message styles above are not used by DM view */

/* DM message rows and bubbles */
.msg-row {
  display: flex;
  margin: 4px 0;
}
.msg-row.mine {
  justify-content: flex-end;
}
.msg-row.theirs {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 62%;
  padding: 8px 12px;
  border-radius: 14px;
  line-height: 1.32;
  background: #1f2937; /* gray-800 */
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.msg-bubble.mine {
  background: #3b82f6;
}
.msg-bubble.theirs {
  background: #2d2d2d;
}

.msg-content {
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg-meta {
  opacity: 0.75;
  font-size: 11px;
  margin-top: 4px;
  text-align: right;
}
.msg-meta .msg-time {
  margin-right: 6px;
  letter-spacing: 0.2px;
}
.msg-meta .msg-check {
  font-weight: 700;
  display: inline-block;
  transform: translateY(1px);
  letter-spacing: -3px; /* squeeze two ticks together */
  margin-left: 6px;
}
.msg-meta .msg-check.read {
  color: #34d399 !important;
} /* green ticks when read */

/* optional: tweak bubble corner for a subtle tail illusion */
.msg-row.mine .msg-bubble {
  border-bottom-right-radius: 4px;
}
.msg-row.theirs .msg-bubble {
  border-bottom-left-radius: 4px;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-weight: bold;
  font-size: 0.9rem;
}

.message-avatar {
  font-size: 1.2rem;
}

.message-name {
  color: #a855f7;
  font-size: 17px !important;
  padding-bottom: 9px !important;
}

.user-message .message-name {
  color: #9333ea;
}

.message-content {
  line-height: 1.5;
  word-wrap: break-word;
}

/* Markdown Styles */
.message-content h1,
.message-content h2,
.message-content h3,
.message-content h4,
.message-content h5,
.message-content h6 {
  margin: 1rem 0 0.5rem 0;
  color: #a855f7;
  font-weight: bold;
}

.message-content h1 {
  font-size: 1.5rem;
}
.message-content h2 {
  font-size: 1.3rem;
}
.message-content h3 {
  font-size: 1.1rem;
}

.message-content p {
  margin: 0.5rem 0;
}

.message-content ul,
.message-content ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.message-content li {
  margin: 0.25rem 0;
}

.message-content strong,
.message-content b {
  font-weight: bold;
  color: white;
}

.message-content em,
.message-content i {
  font-style: italic;
}

.message-content code {
  background: rgba(147, 51, 234, 0.2);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
}

.message-content pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.5rem 0;
  border: 1px solid rgba(147, 51, 234, 0.3);
}

.message-content pre code {
  background: none;
  padding: 0;
}

.message-content blockquote {
  border-left: 3px solid #a855f7;
  margin: 0.5rem 0;
  padding-left: 1rem;
  color: #ccc;
  font-style: italic;
}

.message-content a {
  color: #a855f7;
  text-decoration: underline;
}

.message-content a:hover {
  color: #9333ea;
}

.message-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.5rem 0;
}

.message-content th,
.message-content td {
  border: 1px solid rgba(147, 51, 234, 0.3);
  padding: 0.5rem;
  text-align: left;
}

.message-content th {
  background: rgba(147, 51, 234, 0.1);
  font-weight: bold;
}

/* Image styling in markdown content */
.message-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem 0;
  border: 1px solid rgba(147, 51, 234, 0.3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.message-content img:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
  cursor: pointer;
}

/* Ensure markdown content doesn't overflow */
.message-content {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* Style for numbered lists specifically */
.message-content ol {
  counter-reset: list-counter;
}

.message-content ol li {
  position: relative;
  padding-left: 0.5rem;
}

/* Style for bullet points */
.message-content ul li {
  position: relative;
  padding-left: 0.5rem;
}

/* Ensure proper spacing for markdown elements */
.message-content > *:first-child {
  margin-top: 0;
}

.message-content > *:last-child {
  margin-bottom: 0;
}

/* Typing Indicator */
.typing-indicator .message-content {
  display: flex;
  align-items: center;
}

.typing-dots {
  display: flex;
  gap: 0.3rem;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #a855f7;
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes typing {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.footer {
  text-align: center;
  font-size: 0.85rem;
  color: #aaa;
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer a {
  color: #a855f7;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 0.8rem;
}

.password-wrapper input {
  width: 100%;
  padding: 0.6rem;
  padding-right: 2.5rem;
  background: #1f1f2e;
  color: white;
  border: 1px solid #9333ea;
  border-radius: 6px;
  box-sizing: border-box;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: #ccc;
  cursor: pointer;
  user-select: none;
}

.message-pack {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.message-pack-btn {
  margin-top: 0.5rem;
  background: #a855f7;
  color: white;
  border: none;
  padding: 8px 16px;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

/* ✅ Force all fonts and text to pure white */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
span,
input,
button,
label {
  color: white !important;
  font-weight: normal !important;
}
.store-tier-container {
  max-width: 1100px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.store-tier {
  flex: 1;
  min-width: 250px;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #9333ea;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
}

.store-tier h3 {
  margin-bottom: 1rem;
}

.store-tier ul {
  list-style-type: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.store-tier ul li {
  margin-bottom: 0.5rem;
}

.store-tier-container {
  max-width: 1100px;
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  margin: 2rem auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: nowrap;
  align-items: stretch;
}

.store-tier {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid #9333ea;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  min-width: 280px;
}

.store-tier h3 {
  margin-bottom: 1rem;
}

.store-tier ul {
  list-style-type: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.store-tier ul li {
  margin-bottom: 0.5rem;
}

.store-tier button {
  margin-top: auto;
}
.content-section,
.auth-box,
.store-tier {
  color: white !important;
}

/* SweetAlert Custom Styling */
.swal-custom-popup {
  border: 2px solid #a855f7 !important;
  border-radius: 12px !important;
}

.swal-custom-title {
  color: #a855f7 !important;
  font-weight: bold !important;
}

.swal-custom-content {
  color: #ffffff !important;
}

/* Override SweetAlert default styles */
.swal2-popup {
  background: #1f1f2e !important;
  color: #ffffff !important;
}

.swal2-title {
  color: #a855f7 !important;
}

.swal2-content {
  color: #ffffff !important;
}

/* SweetAlert form controls */
.swal2-select,
.swal2-textarea,
#report-category,
#report-description {
  background: #1f1f2e !important;
  color: #ffffff !important;
  border: 1px solid #9333ea !important;
  border-radius: 8px !important;
}

.swal2-select option {
  background-color: #1f1f2e !important;
  color: #ffffff !important;
}

.swal2-confirm {
  background: #a855f7 !important;
  border: none !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  font-weight: bold !important;
}

.swal2-confirm:hover {
  background: #9333ea !important;
}

/* Profile Box with border */
.sidebar-profile-box {
  border: 2px solid #a855f7;
  border-radius: 16px;
  padding: 2rem 1.2rem 1.2rem 1.2rem;
  margin-bottom: 2rem;
  background: rgba(0, 0, 0, 0.25);
  box-shadow: 0 2px 12px 0 rgba(168, 85, 247, 0.08);
}

.profile-divider {
  width: 90%;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(168, 85, 247, 0.2) 0%,
    rgba(168, 85, 247, 0.5) 50%,
    rgba(168, 85, 247, 0.2) 100%
  );
  margin: 1.2rem auto 1.2rem auto;
}

.social-links-centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.social-links-centered .social-link {
  font-size: 0.92rem;
  color: #a855f7;
  text-align: center;
  justify-content: center;
  font-weight: 400;
  padding: 0.2rem 0;
}

.social-links-centered .social-link span {
  font-size: 1.05em;
}

.social-links-centered .social-link:hover {
  color: #9333ea;
}

@media (max-width: 600px) {
  .sidebar-profile-box {
    padding: 1.2rem 0.5rem 0.8rem 0.5rem;
  }
}

/* Settings Page Styles */
.settings-page-container {
  display: block !important;
  visibility: visible !important;
  min-height: 100vh !important;
  padding: 2rem !important;
}

.settings-main-container {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  min-height: 70vh !important;
  width: 100% !important;
}

.settings-content-box {
  background: rgba(0, 0, 0, 0.4) !important;
  border: 3px solid #9333ea !important;
  border-radius: 12px !important;
  padding: 3rem !important;
  max-width: 600px !important;
  width: 100% !important;
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.2) !important;
}

.settings-section-title {
  color: #a855f7 !important;
  font-size: 1.4rem !important;
  font-weight: bold !important;
  margin-bottom: 1.5rem !important;
  margin-top: 0 !important;
  text-align: left !important;
}

.settings-input-field {
  width: 100% !important;
  padding: 1rem 1.25rem !important;
  background: rgba(0, 0, 0, 0.6) !important;
  border: 2px solid #a855f7 !important;
  border-radius: 8px !important;
  color: white !important;
  font-size: 1rem !important;
  outline: none !important;
  margin-bottom: 0.75rem !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
}

.settings-input-field::placeholder {
  color: #ccc !important;
  opacity: 1 !important;
}

.settings-input-field:focus {
  border-color: #9333ea !important;
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2) !important;
  transform: translateY(-1px) !important;
}

.settings-input-field:disabled {
  background: rgba(0, 0, 0, 0.8) !important;
  border-color: #6b7280 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  opacity: 0.7 !important;
}

.settings-input-field:disabled::placeholder {
  color: #6b7280 !important;
}

.settings-message-text {
  font-size: 0.85rem !important;
  margin: 0.25rem 0 1rem 0 !important;
  min-height: 1.2rem !important;
}

.settings-error-message {
  color: #ef4444 !important;
}

.settings-info-message {
  color: #ccc !important;
}

.settings-action-btn {
  padding: 0.875rem 2rem !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 1rem !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-transform: none !important;
  margin-bottom: 1rem !important;
}

.settings-primary-btn {
  background: #a855f7 !important;
  color: white !important;
}

.settings-primary-btn:hover {
  background: #9333ea !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4) !important;
}

.settings-action-btn:disabled {
  background: #4b5563 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  opacity: 0.6 !important;
  border: 2px solid #6b7280 !important;
}

.settings-action-btn:disabled:hover {
  background: #4b5563 !important;
  transform: none !important;
  box-shadow: none !important;
}

.settings-danger-btn {
  background: #dc2626 !important;
  color: white !important;
}

.settings-danger-btn:hover {
  background: #b91c1c !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4) !important;
}

.settings-password-wrapper {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  margin-bottom: 0.75rem !important;
}

.settings-toggle-password {
  position: absolute !important;
  right: 1rem !important;
  cursor: pointer !important;
  color: #a855f7 !important;
  font-size: 1.2rem !important;
  user-select: none !important;
  z-index: 10 !important;
}

.settings-toggle-password:hover {
  color: #9333ea !important;
}

.settings-section-divider {
  height: 2px !important;
  background: linear-gradient(
    90deg,
    transparent,
    #a855f7,
    transparent
  ) !important;
  border: none !important;
  margin: 2.5rem 0 !important;
}

.settings-danger-divider {
  background: linear-gradient(
    90deg,
    transparent,
    #dc2626,
    transparent
  ) !important;
  margin: 3rem 0 2rem 0 !important;
}

.settings-danger-title {
  color: #dc2626 !important;
}

.settings-warning-text {
  color: #fbbf24 !important;
  background: rgba(251, 191, 36, 0.1) !important;
  padding: 1rem !important;
  border-radius: 8px !important;
  border-left: 4px solid #fbbf24 !important;
  margin-bottom: 1.5rem !important;
  font-size: 0.95rem !important;
  line-height: 1.5 !important;
}

/* Responsive Design for Settings Page */
@media (max-width: 768px) {
  .settings-page-container {
    padding: 1rem !important;
  }

  .settings-content-box {
    padding: 2rem !important;
    margin: 0 0.5rem !important;
  }

  .settings-section-title {
    font-size: 1.2rem !important;
  }

  .settings-input-field {
    padding: 0.875rem 1rem !important;
    font-size: 0.95rem !important;
  }

  .settings-action-btn {
    width: 100% !important;
    padding: 1rem !important;
  }
}

@media (max-width: 480px) {
  .settings-content-box {
    padding: 1.5rem !important;
    margin: 0 !important;
  }

  .settings-section-title {
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
  }

  .settings-input-field {
    padding: 0.75rem !important;
    font-size: 0.9rem !important;
  }

  .settings-message-text {
    font-size: 0.8rem !important;
  }
}

/* Avatar Section Styles */
.settings-avatar-section {
  margin-bottom: 2rem !important;
}

.settings-avatar-display {
  display: flex !important;
  align-items: center !important;
  gap: 2rem !important;
  margin-bottom: 1.5rem !important;
}

.settings-current-avatar {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  overflow: hidden !important;
  border: 3px solid #a855f7 !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3) !important;
  flex-shrink: 0 !important;
}

.settings-avatar-image {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.settings-avatar-info {
  flex: 1 !important;
}

.settings-avatar-text {
  color: #ccc !important;
  font-size: 0.95rem !important;
  margin: 0 0 1rem 0 !important;
  line-height: 1.4 !important;
}

.settings-secondary-btn {
  background: rgba(168, 85, 247, 0.2) !important;
  color: #a855f7 !important;
  border: 2px solid #a855f7 !important;
}

.settings-secondary-btn:hover {
  background: #a855f7 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.4) !important;
}

.settings-cancel-btn {
  background: rgba(107, 114, 128, 0.2) !important;
  color: #9ca3af !important;
  border: 2px solid #6b7280 !important;
}

.settings-cancel-btn:hover {
  background: #6b7280 !important;
  color: white !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(107, 114, 128, 0.4) !important;
}

.settings-avatar-preview {
  background: rgba(0, 0, 0, 0.6) !important;
  border: 2px solid #a855f7 !important;
  border-radius: 12px !important;
  padding: 2rem !important;
  margin-top: 1.5rem !important;
}

.settings-preview-container {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 1.5rem !important;
}

.settings-preview-image {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3px solid #a855f7 !important;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.3) !important;
}

.settings-preview-actions {
  display: flex !important;
  gap: 1rem !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
}

/* Responsive Design for Avatar Section */
@media (max-width: 768px) {
  .settings-avatar-display {
    flex-direction: column !important;
    text-align: center !important;
    gap: 1.5rem !important;
  }

  .settings-current-avatar {
    width: 100px !important;
    height: 100px !important;
    margin: 0 auto !important;
  }

  .settings-preview-image {
    width: 100px !important;
    height: 100px !important;
  }

  .settings-preview-actions {
    flex-direction: column !important;
    width: 100% !important;
  }

  .settings-preview-actions .settings-action-btn {
    width: 100% !important;
  }
}

@media (max-width: 480px) {
  .settings-current-avatar {
    width: 80px !important;
    height: 80px !important;
  }

  .settings-preview-image {
    width: 80px !important;
    height: 80px !important;
  }

  .settings-avatar-preview {
    padding: 1.5rem !important;
  }
}

/* === SIDEBAR NAVIGATION STYLES === */

.sidebar-navigation {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.nav-section-title {
  font-size: 0.8rem;
  font-weight: bold;
  color: #a855f7;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sidebar-nav-btn {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  color: white;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  width: 100%;
}

.sidebar-nav-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  transform: translateX(2px);
}

.sidebar-nav-btn.active {
  background: #a855f7;
  border-color: #a855f7;
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.sidebar-nav-btn.logout-btn {
  background: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.3);
  color: #fca5a5;
}

.sidebar-nav-btn.logout-btn:hover {
  background: rgba(220, 38, 38, 0.2);
  border-color: #dc2626;
}

.nav-icon {
  font-size: 1rem;
  width: 18px;
  text-align: center;
}
