/* ===== GLOBAL STYLES ===== */

/* === Custom Font Definition === */
@font-face {
  font-family: "ProcrastinatingPixie";
  src: url("../styles/fonts/ProcrastinatingPixie-WyVOO.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* Reset and Box-Sizing */
html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  overflow-y: auto; /* Enable vertical scrolling */
  box-sizing: border-box;
}

/* Vanta background stays*/
#vanta-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2; /* Keep background behind content */
  overflow: hidden;
}

/* Button-85 */
.button-85 {
  padding: 0.6em 2em;
  border: none;
  outline: none;
  color: rgb(255, 255, 255);
  background: #111;
  cursor: pointer;
  position: relative;
  z-index: 0;
  border-radius: 10px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  text-decoration: none;
}

.button-85:before {
  content: "";
  background: linear-gradient(
    45deg,
    #ff0000,
    #ff7300,
    #fffb00,
    #48ff00,
    #00ffd5,
    #002bff,
    #7a00ff,
    #ff00c8,
    #ff0000
  );
  position: absolute;
  top: -2px;
  left: -2px;
  background-size: 400%;
  z-index: -1;
  filter: blur(5px);
  -webkit-filter: blur(5px);
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  animation: glowing-button-85 20s linear infinite;
  transition: opacity 0.3s ease-in-out;
  border-radius: 10px;
}

@keyframes glowing-button-85 {
  0% {
    background-position: 0 0;
  }
  50% {
    background-position: 400% 0;
  }
  100% {
    background-position: 0 0;
  }
}

.button-85:after {
  z-index: -1;
  content: "";
  position: absolute;
  width: 100%;
  height: 100%;
  background: #222;
  left: 0;
  top: 0;
  border-radius: 10px;
}

.button-30 {
  align-items: center;
  appearance: none;
  background-color: #fcfcfd;
  border-radius: 4px;
  border-width: 0;
  box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px,
    rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
  box-sizing: border-box;
  color: #4f46e5;
  font-weight: bolder;
  cursor: pointer;
  display: inline-flex;
  font-family: "JetBrains Mono", monospace;
  height: 48px;
  justify-content: center;
  line-height: 1;
  list-style: none;
  overflow: hidden;
  padding-left: 16px;
  padding-right: 16px;
  position: relative;
  text-align: left;
  text-decoration: none;
  transition: box-shadow 0.15s, transform 0.15s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  will-change: box-shadow, transform;
  font-size: 18px;
}

.button-30:focus {
  box-shadow: #d6d6e7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px,
    rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
}

.button-30:hover {
  box-shadow: rgba(45, 35, 66, 0.4) 0 4px 8px,
    rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
  transform: translateY(-2px);
}

.button-30:active {
  box-shadow: #d6d6e7 0 3px 7px inset;
  transform: translateY(2px);
}

/* ===== Responsive Button Styles ===== */
@media (max-width: 768px) {
  .button-85,
  .button-30 {
    padding: 0.5em 1.5em;
    font-size: 0.9em;
  }
}

@media (max-width: 480px) {
  .button-85,
  .button-30 {
    padding: 0.4em 1.2em;
    font-size: 0.8em;
  }
}

/* === UrNexus Logo (Independent Styles) === */
.button-urnexus-logo {
  font-family: "ProcrastinatingPixie", sans-serif !important; /* Force Custom Font */
  color: #ffffff !important; /* Force Custom Color */
  font-size: 2.5em !important; /* Force Font Size */
  text-align: center !important; /* Center if needed */
  line-height: 1 !important; /* Prevent extra spacing */
  margin: 0 !important; /* Remove unwanted margins */
  padding: 0 !important; /* Remove unwanted padding */
  display: inline-block !important; /* Ensure inline display */
  white-space: nowrap !important; /* Prevent text from breaking */
  overflow: visible !important; /* Ensure no clipping */
  text-decoration: none !important;
  transition: color 0.3s ease-in-out, transform 0.3s ease-in-out,
    text-shadow 0.3s ease-in-out;
}

/* === UrNexus Logo (Independent Hover Styles) === */
.button-urnexus-logo:hover {
  color: #4f46e5 !important;
  transform: translateY(-5px) scale(1.1);
}

/* ===== GLOBAL USER DETAILS MODAL STYLES ===== */

/* User Name Link Styling (For pages that use it) */
.user-name-link {
  color: #ffffff !important;
  font-weight: bold;
  cursor: pointer;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(10px);
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  min-width: 100px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-name-link:hover {
  background: rgba(79, 70, 229, 0.8) !important;
  color: #ffffff !important;
  border-color: #4f46e5;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Modal Content Box */
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 25px;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal Header */
.modal-content h2 {
  color: #333;
  text-align: center;
  margin: 0 0 20px 0;
  font-size: 1.5rem;
  font-weight: bold;
  border-bottom: 2px solid #4f46e5;
  padding-bottom: 10px;
}

/* Close Button (X) */
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 15px;
  right: 20px;
  transition: color 0.3s ease;
}

.close:hover,
.close:focus {
  color: #ff4444;
  transform: scale(1.1);
}

/* User Details Content */
.user-details-content {
  margin: 20px 0;
}

.user-details-content p {
  margin: 12px 0;
  padding: 12px 15px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-left: 4px solid #4f46e5;
  border-radius: 6px;
  color: #333;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.user-details-content p:hover {
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.2);
}

.user-details-content strong {
  color: #4f46e5;
  font-weight: 600;
  display: inline-block;
  min-width: 120px;
}

/* Modal Buttons */
.modal-buttons {
  text-align: center;
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.modal-buttons .button-30 {
  min-width: 100px;
}

/* ===== Responsive Modal Styles ===== */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 10% auto;
    padding: 20px;
  }

  .modal-content h2 {
    font-size: 1.3rem;
  }

  .user-name-link {
    padding: 6px 10px;
    font-size: 0.9em;
    min-width: 90px;
  }

  .user-details-content p {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .user-details-content strong {
    min-width: 100px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    margin: 15% auto;
    padding: 15px;
  }

  .modal-content h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }

  .close {
    top: 10px;
    right: 15px;
    font-size: 24px;
  }

  .user-name-link {
    padding: 5px 8px;
    font-size: 0.8em;
    min-width: 80px;
  }

  .user-details-content {
    margin: 15px 0;
  }

  .user-details-content p {
    padding: 8px 10px;
    font-size: 0.85rem;
    margin: 8px 0;
  }

  .user-details-content strong {
    min-width: 90px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
  }

  .modal-buttons {
    margin-top: 20px;
    flex-direction: column;
  }

  .modal-buttons .button-30 {
    width: 100%;
    margin: 5px 0;
  }
}

/* Shared Utilities */
.text-center {
  text-align: center;
}

/* ===== Shared Footer Styles ===== */
.footer {
  text-align: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: auto; /* Push footer to the bottom */
  padding: 1rem;
  background: rgba(255, 255, 255, 0); /* Slight transparency */
  border-top: 1px solid #ffffff00;
  z-index: 2; /* Ensure the footer is above the translucent layer */
  position: relative; /* Ensure stacking context works correctly */
}

.footer-link {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.footer-link:hover {
  color: #4f46e5;
  transform: translateY(-1px);
  font-weight: bold;
}

/* ===== Close Case Button Styling ===== */
.close-case-button {
  align-items: center;
  appearance: none;
  background-color: #fcfcfd;
  border-radius: 4px;
  border-width: 0;
  box-shadow: rgba(45, 35, 66, 0.4) 0 2px 4px,
    rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
  box-sizing: border-box;
  color: #4f46e5;
  font-weight: bolder;
  cursor: pointer;
  display: inline-flex;
  font-family: "JetBrains Mono", monospace;
  height: 48px;
  justify-content: center;
  line-height: 1;
  list-style: none;
  overflow: hidden;
  padding-left: 16px;
  padding-right: 16px;
  position: relative;
  text-align: left;
  text-decoration: none;
  transition: all 0.3s ease; /* Smooth transition for all properties */
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  white-space: nowrap;
  will-change: box-shadow, transform, background-color, color;
  font-size: 18px;
  margin-right: 10px;
}

.close-case-button:focus {
  box-shadow: #d6d6e7 0 0 0 1.5px inset, rgba(45, 35, 66, 0.4) 0 2px 4px,
    rgba(45, 35, 66, 0.3) 0 7px 13px -3px, #d6d6e7 0 -3px 0 inset;
}

/* Red hover effect for Close Case button */
.close-case-button:hover {
  background-color: #dc2626; /* Red background */
  color: #ffffff; /* White text */
  box-shadow: rgba(220, 38, 38, 0.4) 0 4px 8px,
    rgba(220, 38, 38, 0.3) 0 7px 13px -3px, #dc2626 0 -3px 0 inset;
  transform: translateY(-2px);
  border: 1px solid #dc2626;
}

.close-case-button:active {
  background-color: #b91c1c; /* Darker red when clicked */
  box-shadow: #b91c1c 0 3px 7px inset;
  transform: translateY(2px);
}

/* Responsive adjustments for close case button */
@media (max-width: 768px) {
  .close-case-button {
    padding: 0.5em 1.5em;
    font-size: 0.9em;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .close-case-button {
    padding: 0.4em 1.2em;
    font-size: 0.8em;
    height: 40px;
    margin-right: 5px;
  }
}