.hero-gradient {
  position: relative;
}

.version-tag {
  position: absolute;
  top: 12px;
  right: 22px;
}

#fileGrid .card .card-title,
#recentsGrid .card .card-title {
  line-height: 1.35;
}

#fileGrid .card .card-text,
#recentsGrid .card .card-text {
  color: #55607e;
}

.answer {
  margin: 1rem 0 0 2.4rem;
  padding-left: 1rem;
  border-left: 3px solid #1d4ed8;
  color: #1e3a8a;
}

.question {
  color: #0f766e;
  font-weight: 700;
}

.markdown-content img,
.docx-content img {
  max-width: 100%;
  height: auto;
}

.markdown-content code,
.docx-content code {
  white-space: pre-wrap;
  word-break: break-word;
}

.markdown-content,
.docx-content {
  font-size: 1.03rem;
}

.markdown-content p,
.docx-content p {
  margin-bottom: 1rem;
}

/* Keep rendered content list items readable on dark/custom themes. */
.markdown-content ul,
.markdown-content ol,
.docx-content ul,
.docx-content ol {
  list-style-position: outside;
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.markdown-content ul,
.docx-content ul {
  list-style-type: disc;
}

.markdown-content ol,
.docx-content ol {
  list-style-type: decimal;
}

.markdown-content li,
.docx-content li {
  display: list-item;
  margin-bottom: 0.45rem;
  color: #fff;
}

.markdown-content li::marker,
.docx-content li::marker {
  color: #fff;
}

.markdown-content table,
.docx-content table {
  width: 100%;
  margin: 1rem 0;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #dbe4fb;
}

.markdown-content th,
.markdown-content td,
.docx-content th,
.docx-content td {
  border: 1px solid #dbe4fb;
  padding: 0.55rem 0.65rem;
  text-align: left;
}

.markdown-content th,
.docx-content th {
  background-color: #eef3ff;
  color: #172554;
  font-weight: 700;
}

/* Glow Button Styling */
.glow-button {
  --border-angle-1: 0deg;
  --border-angle-2: 90deg;
  --border-angle-3: 180deg;

  display: block;
  width: 100%;
  max-width: 400px;
  margin: 1rem auto;
  padding: 1.25rem 2rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #fff !important;
  text-decoration: none;
  background-color: #0b0719;
  border-radius: 20px;
  position: relative;

  /* Animated border using conic gradients */
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(11, 7, 25, 0.9) 0%, rgba(11, 7, 25, 1) 100%),
    conic-gradient(from var(--border-angle-1) at 50% 50%, #03edf9, transparent 20%, #ff2da3 50%, transparent 70%, #03edf9 100%),
    conic-gradient(from var(--border-angle-2) at 50% 50%, #03edf9, transparent 20%, #22c55e 50%, transparent 70%, #03edf9 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box, border-box;
  border: 2px solid transparent;

  box-shadow: 0 0 25px rgba(3, 237, 249, 0.25);
  animation: rotateBorder 6s linear infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glow-button:hover {
  transform: scale(1.03);
  box-shadow: 0 0 35px rgba(255, 45, 163, 0.4);
}

.glow-button {
  --border-angle-1: 0deg;
  --border-angle-2: 90deg;
  --border-angle-3: 180deg;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 600px;
  /* Expanded width constraint */
  min-height: 140px;
  /* Huge vertical touch target */
  margin: 2rem auto;
  /* Generous spacing between buttons */
  padding: 2.5rem 2rem;
  /* Extra inner padding */
  font-size: 3rem;
  /* 2x bigger text size for high visibility */
  font-weight: 800;
  text-align: center;
  color: #fff !important;
  text-decoration: none;
  background-color: #0b0719;
  border-radius: 32px;
  /* Scale up corner radius */
  position: relative;

  /* Animated gradient border */
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(11, 7, 25, 0.9) 0%, rgba(11, 7, 25, 1) 100%),
    conic-gradient(from var(--border-angle-1) at 50% 50%, #03edf9, transparent 20%, #ff2da3 50%, transparent 70%, #03edf9 100%),
    conic-gradient(from var(--border-angle-2) at 50% 50%, #03edf9, transparent 20%, #22c55e 50%, transparent 70%, #03edf9 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box, border-box;
  border: 4px solid transparent;
  /* Thicker animated border */

  box-shadow: 0 0 35px rgba(3, 237, 249, 0.35);
  animation: rotateBorder 6s linear infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glow-button:hover {
  transform: scale(1.03);
  box-shadow: 0 0 50px rgba(255, 45, 163, 0.5);
}

.glow-button:active {
  transform: scale(0.96);
}

/* 1. Define CSS custom properties for smooth rotation */
@property --border-angle-1 {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@property --border-angle-2 {
  syntax: "<angle>";
  inherits: true;
  initial-value: 90deg;
}

@property --border-angle-3 {
  syntax: "<angle>";
  inherits: true;
  initial-value: 180deg;
}

/* 2. Scaled-down (50%) Glow Button Styles */
.glow-button {
  --border-angle-1: 0deg;
  --border-angle-2: 90deg;
  --border-angle-3: 180deg;

  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 320px;
  /* Reduced width */
  min-height: 65px;
  /* Reduced height (down from 140px) */
  margin: 1rem auto;
  /* Compact spacing */
  padding: 1rem 1.25rem;
  /* Scaled padding */
  font-size: 1.5rem;
  /* Scaled down font (down from 3rem) */
  font-weight: 700;
  text-align: center;
  color: #fff !important;
  text-decoration: none;
  background-color: #0b0719;
  border-radius: 16px;
  /* Sleeker corners */
  position: relative;

  /* Conic gradient for rotating border */
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(11, 7, 25, 0.9) 0%, rgba(11, 7, 25, 1) 100%),
    conic-gradient(from var(--border-angle-1) at 50% 50%, #03edf9, transparent 20%, #ff2da3 50%, transparent 70%, #03edf9 100%),
    conic-gradient(from var(--border-angle-2) at 50% 50%, #03edf9, transparent 20%, #22c55e 50%, transparent 70%, #03edf9 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box, border-box;
  border: 2px solid transparent;

  box-shadow: 0 0 18px rgba(3, 237, 249, 0.3);
  animation: rotateBorder 6s linear infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glow-button:hover {
  transform: scale(1.02);
  box-shadow: 0 0 25px rgba(255, 45, 163, 0.4);
}

.glow-button:active {
  transform: scale(0.97);
}

/* 3. Border Rotation Animation */
@keyframes rotateBorder {
  to {
    --border-angle-1: 360deg;
    --border-angle-2: 450deg;
    --border-angle-3: 540deg;
  }
}