/* === Modal Overlay === */
.offlineModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center;
  align-items: flex-end;
  color: #fff;
  z-index: 9999;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  user-select: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* === Show Modal === */
.offlineModal.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

/* === Modal Content Box === */
.offlineModal-content {
  width: 90%;
  max-width: 400px;
  height: 70vh;
  margin: 90px auto;
  padding: 16px;
  background-color: #003248;
  box-shadow: 0 0 20px rgba(0, 255, 179, 0.5);
  border: 2px solid #00ff99;
  border-radius: min(13vw, 30px);
  color: var(--score-text-color, #00ff99);
  font-size: 1.3em;
  font-weight: bold;
  font-family: Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease forwards, glowPulse 2.5s ease-in-out infinite;
  text-align: center;
  position: relative;
}

/* === Button Styling (Optional) === */
.offlineModal-content button {
  margin-top: 20px;
  padding: 10px 24px;
  font-size: 1em;
  font-weight: bold;
  color: #003248;
  background-color: #00ff99;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.offlineModal-content button:hover {
  background-color: #00ffaa;
}

/* === Keyframe Animations === */
@keyframes modalFadeIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 179, 0.5); }
  50% { box-shadow: 0 0 40px rgba(0, 255, 179, 0.9); }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideDown {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(100%); opacity: 0; }
}

/* === Exit Animation === */
.offlineModal-content.slide-down {
  animation: slideDown 0.4s ease-in forwards;
}