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.6;
  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;
  border-bottom: 2px solid #a855f7;
}

.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;
  margin-top: 2rem;
}

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

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

.ultra-wide-box {
  max-width: 95%;
}

.auth-box input,
.astro-box input {
  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;
}

.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;
}

/* Chat Messages Container */
.chat-messages-container {
  max-height: 45vh;
  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 */
.chat-message {
  margin-bottom: 1.5rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(147, 51, 234, 0.2);
}

.user-message {
  background: rgba(147, 51, 234, 0.1);
  border-color: rgba(147, 51, 234, 0.4);
  margin-left: 2rem;
}

.assistant-message {
  background: rgba(0, 0, 0, 0.4);
  border-color: rgba(255, 255, 255, 0.2);
  margin-right: 2rem;
}

.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;
}

.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;
}
