body {
  font-family: "Plus Jakarta Sans", sans-serif;
  background-color: #f8fafc;
  color: #334155;
  scroll-behavior: smooth; /* Native smooth scrolling */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Loader */
.loader {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- PREVIEW AREA STYLES (Chegg Simulation) --- */
.preview-area {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  font-size: 15px;
}

/* Strict Headers - Black & Bold */
.preview-area h1 {
  font-size: 24px;
  font-weight: bold;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 10px;
  margin-top: 24px;
  margin-bottom: 16px;
  color: #000;
}
.preview-area h2 {
  font-size: 20px;
  font-weight: bold;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
  margin-top: 20px;
  margin-bottom: 14px;
  color: #000;
}
.preview-area h3 {
  font-size: 18px;
  font-weight: bold;
  margin-top: 16px;
  margin-bottom: 10px;
  color: #000;
}

/* Text Spacing */
.preview-area p {
  margin-bottom: 16px;
}
.preview-area ul {
  list-style-type: disc;
  padding-left: 24px;
  margin-bottom: 16px;
}
.preview-area ol {
  list-style-type: decimal;
  padding-left: 24px;
  margin-bottom: 16px;
}
.preview-area li {
  margin-bottom: 8px;
}
.preview-area strong {
  color: #000;
  font-weight: bold;
}

/* No Italics */
.preview-area em,
.preview-area i {
  font-style: normal;
}

/* --- MATH BOXES --- */
.math-display-container {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 16px 0;
  clear: both;
}
.math-display-box {
  background-color: #f8fafc;
  padding: 14px 24px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  color: #000;
  font-family: "Times New Roman", serif;
  font-size: 1.15em;
  text-align: center;
}
.math-inline {
  background-color: #f3f4f6;
  padding: 2px 5px;
  border-radius: 4px;
  color: #111;
  font-family: "Times New Roman", Times, serif;
  font-weight: 500;
  border: 1px solid #e5e7eb;
}

/* Developer credit: animated gradient text */
.dev-credit {
  display: inline-block;
  font-weight: 700;
  letter-spacing: 0.3px;
  background: linear-gradient(
    90deg,
    #7c3aed 0%,
    #06b6d4 35%,
    #22c55e 70%,
    #7c3aed 100%
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(124, 58, 237, 0.25));
  animation: devGradient 3.5s ease-in-out infinite,
    devFloat 2.8s ease-in-out infinite;
}

@keyframes devGradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes devFloat {
  0%,
  100% {
    transform: translateY(0);
    opacity: 0.95;
  }
  50% {
    transform: translateY(-1px);
    opacity: 1;
  }
}

/* Modal Animation */
.modal-content {
  animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes modalPop {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* --- AUTH STYLES --- */
/* Ye class JS dwara add ki jayegi jab user login ho jayega */
.auth-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: all 0.5s ease-in-out;
    transform: scale(1.1);
    z-index: -1;
}

/* Ye Logout button ke liye */
#logoutBtn {
    cursor: pointer;
}