/* Cross-browser compatibility and device optimizations */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  touch-action: manipulation;
}



/* General body styling */
body {
  margin: 0;
  padding: 0;
  font-family: 'Roboto', Arial, sans-serif;
  color: #fff;
  text-align: center;
  background: linear-gradient(-45deg, #0f2027, #203a43, #2c5364, #2980b9);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  overflow-x: hidden;
}

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

/* Welcome overlay styling */
.welcome-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(145deg, #0f2027, #203a43, #2c5364);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  box-shadow: inset 0 0 30px rgba(41, 128, 185, 0.4);
  perspective: 1000px;
  animation: fadeIn 1s ease-in-out forwards;
  overflow: hidden;
  position: relative;
}

.welcome-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(52, 152, 219, 0.2) 0%, transparent 70%);
  opacity: 0.7;
  animation: pulse-glow 4s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

/* Floating icons styling */
.floating-icons {
  position: absolute;
  width: 100%;
  height: 100%;
  pointer-events: none;
  perspective: 1200px;
}

.floating-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  opacity: 0.9;
  animation: float 12s infinite ease-in-out, rotate 10s infinite linear;
  filter: drop-shadow(0 0 15px rgba(41, 128, 185, 0.8));
  will-change: transform;
  transition: all 0.3s ease;
  border-radius: 50%;
  background: rgba(52, 152, 219, 0.15);
  backdrop-filter: blur(2px);
  padding: 5px;
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.4);
}

@keyframes float {
  0% {
    transform: translateY(0) translateZ(0) rotate(0deg) scale(1);
    filter: brightness(1);
  }
  25% {
    transform: translateY(-100px) translateZ(120px) rotate(25deg) scale(1.2);
    filter: brightness(1.2);
  }
  50% {
    transform: translateY(-180px) translateZ(0) rotate(-15deg) scale(0.9);
    filter: brightness(0.8);
  }
  75% {
    transform: translateY(-100px) translateZ(-120px) rotate(-25deg) scale(1.2);
    filter: brightness(1.2);
  }
  100% {
    transform: translateY(0) translateZ(0) rotate(0deg) scale(1);
    filter: brightness(1);
  }
}

@keyframes rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Welcome button styling */
.welcome-overlay button {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: #fff;
  font-size: 1.3rem;
  padding: 16px 40px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50px;
  cursor: pointer;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  box-shadow: 0 5px 20px rgba(41, 128, 185, 0.5), 0 0 0 3px rgba(52, 152, 219, 0.3);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.welcome-overlay button span {
  display: inline-block;
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.welcome-overlay button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  transform: skewX(-25deg);
  animation: shine 4s infinite;
}

@keyframes shine {
  0% {
    left: -100%;
  }
  20%, 100% {
    left: 100%;
  }
}

.welcome-overlay button:hover {
  background: linear-gradient(45deg, rgba(56, 189, 248, 0.9), rgba(14, 165, 233, 0.8));
  box-shadow: 0 0 30px rgba(56, 189, 248, 0.7), 0 0 0 4px rgba(52, 152, 219, 0.3);
  transform: scale(1.05) translateY(-5px);
}

.welcome-overlay button:hover span {
  transform: translateX(5px);
}

.welcome-overlay button:active {
  transform: scale(0.98) translateY(0);
  box-shadow: 0 2px 10px rgba(56, 189, 248, 0.3), 0 0 0 2px rgba(52, 152, 219, 0.4);
}

/* Main container styling */
.container {
  display: none;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  background: linear-gradient(-45deg, #222, #333, #444, #555);
  background-size: 400% 400%;
  animation: gradientBGMain 20s ease infinite;
  position: relative;
}

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

/* Background particles */
.particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: particleFloat 15s infinite linear;
}

@keyframes particleFloat {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100vh) translateX(100px);
    opacity: 0;
  }
}

/* Main content box styling */
.box {
  background: rgba(26, 32, 44, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(99, 179, 237, 0.2);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 30px rgba(64, 145, 247, 0.3);
  text-align: center;
  width: 90%;
  max-width: 500px;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  animation: fadeInZoom 1s ease-out forwards, glowPulse 5s ease-in-out infinite;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

@keyframes fadeInZoom {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.3);
  }
  50% {
    box-shadow: 0 0 50px rgba(52, 152, 219, 0.5);
  }
}

/* Logo styling */
.logo {
  width: 130px;
  height: 130px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(52, 152, 219, 0.6);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.7);
  transform: translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse 3s infinite ease-in-out;
}

.logo:hover {
  transform: scale(1.05) translateZ(0);
  box-shadow: 0 0 30px rgba(52, 152, 219, 0.9);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* Title styling */
.title {
  font-family: 'Poppins', sans-serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: #fff;
  margin: 15px 0;
  position: relative;
  display: inline-block;
  text-shadow: 0 2px 10px rgba(64, 145, 247, 0.7), 0 4px 20px rgba(0, 0, 0, 0.4);
}

.title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 50%;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
  animation: expandWidth 3s infinite ease-in-out;
}

@keyframes expandWidth {
  0%, 100% {
    width: 50%;
    opacity: 1;
  }
  50% {
    width: 80%;
    opacity: 0.6;
  }
}

/* Description styling */
.description {
  font-family: 'Roboto', sans-serif;
  font-size: 1.1rem;
  color: #ddd;
  margin-bottom: 30px;
  line-height: 1.7;
  position: relative;
  padding: 0 10px;
}

/* Button container */
.button {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 10px;
}

/* Button styling */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(52, 152, 219, 0.4));
  border: 3px solid rgba(52, 152, 219, 0.7);
  backdrop-filter: blur(5px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 4px 15px rgba(52, 152, 219, 0.3);
  position: relative;
  overflow: hidden;
  min-width: 180px;
  z-index: 1;
  letter-spacing: 0.8px;
  opacity: 1 !important; /* Ensure buttons are always visible */
  visibility: visible !important;
}

.btn img {
  width: 26px;
  height: 26px;
  transition: transform 0.4s ease;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: 0.5s;
  z-index: -1;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0), rgba(52, 152, 219, 0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -2;
  border-radius: 50px;
}

.btn:hover {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(52, 152, 219, 0.5));
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(52, 152, 219, 0.7);
  color: #fff;
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.7);
  border-color: rgba(52, 152, 219, 0.9);
}

.btn:hover::before {
  left: 100%;
}

.btn:hover::after {
  opacity: 1;
}

.btn:hover img {
  transform: scale(1.3) rotate(15deg);
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 1));
}

.btn:active {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Responsive styles */
@media (max-width: 1200px) {
  .box {
    max-width: 600px;
    padding: 40px 30px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 20px 15px;
  }

  .box {
    padding: 35px 25px;
    max-width: 480px;
    width: 90%;
    border-radius: 18px;
  }

  .title {
    font-size: 2.1rem;
    margin: 12px 0 18px 0;
  }

  .description {
    font-size: 1rem;
    margin-bottom: 25px;
    padding: 0 8px;
  }

  .welcome-overlay button {
    font-size: 1.1rem;
    padding: 14px 30px;
  }

  .logo {
    width: 115px;
    height: 115px;
    margin-bottom: 20px;
  }

  .button {
    gap: 18px;
    margin-top: 15px;
  }

  .btn {
    padding: 14px 28px;
    font-size: 1.15rem;
    min-width: 170px;
  }
}

@media (max-width: 480px) {

  .container {
    padding: 20px 15px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .box {
    width: 90%;
    max-width: 340px;
    padding: 30px 22px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    min-height: auto;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3), 0 0 20px rgba(52, 152, 219, 0.2);
  }

  .logo {
    width: 75px;
    height: 75px;
    margin: 0 auto 20px auto;
    animation: pulse 3s infinite ease-in-out;
    display: block;
  }

  .title {
    font-size: 1.35rem;
    margin: 0 0 16px 0;
    text-align: center;
    width: 100%;
    line-height: 1.2;
  }

  .description {
    font-size: 0.85rem;
    margin: 0 0 25px 0;
    line-height: 1.4;
    padding: 0 8px;
    text-align: center;
    width: 100%;
    max-width: 100%;
  }

  .button {
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin: 0 0 20px 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
  }

  .btn {
    width: 100%;
    height: 48px;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.95rem;
    min-width: unset;
    margin: 0;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(52, 152, 219, 0.2);
    white-space: nowrap;
    overflow: hidden;
  }

  .btn img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  .welcome-overlay button {
    font-size: 1rem;
    padding: 12px 25px;
  }

  /* Notification settings centered and styled consistently */
  .notification-settings {
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .notification-toggle-btn {
    width: 100%;
    height: 48px;
    padding: 12px 16px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 5px rgba(100, 116, 139, 0.1);
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
  }

  .notification-toggle-btn img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }
}

/* Fix for very small screens */
@media (max-width: 320px) {
  .title {
    font-size: 1.5rem;
  }

  .description {
    font-size: 0.9rem;
  }

  .logo {
    width: 80px;
    height: 80px;
  }

  .btn {
    padding: 10px 14px;
    font-size: 0.9rem;
    height: 44px;
    gap: 6px;
  }

  .btn img {
    width: 18px;
    height: 18px;
  }

  .notification-toggle-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    height: 44px;
    gap: 6px;
  }

  .notification-toggle-btn img {
    width: 16px;
    height: 16px;
  }
}

/* Notification Settings Styles */
.notification-settings {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.notification-toggle-btn {
  background: linear-gradient(45deg, #64748b, #475569);
  color: #fff;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-radius: 25px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Montserrat', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification-toggle-btn img {
  width: 18px;
  height: 18px;
  opacity: 0.8;
}

.notification-toggle-btn:hover {
  background: linear-gradient(45deg, #f59e0b, #d97706);
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.notification-toggle-btn.enabled {
  background: linear-gradient(45deg, #10b981, #059669);
  border-color: rgba(52, 211, 153, 0.5);
  animation: notificationPulse 2s infinite;
}

.notification-toggle-btn.enabled:hover {
  background: linear-gradient(45deg, #059669, #047857);
}

@keyframes notificationPulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(16, 185, 129, 0.5);
  }
}

/* Notification Request Modal Styles */
.notification-request-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.notification-request-overlay.show {
  opacity: 1;
  visibility: visible;
}

.notification-request-modal {
  background: rgba(25, 30, 35, 0.97);
  background-image: radial-gradient(circle at top center, rgba(56, 189, 248, 0.15), transparent 80%);
  border: 3px solid rgba(56, 189, 248, 0.8);
  border-radius: 20px;
  width: 90%;
  max-width: 450px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.4), inset 0 0 15px rgba(56, 189, 248, 0.1);
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.notification-request-overlay.show .notification-request-modal {
  transform: scale(1);
}

.notification-request-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}

.notification-request-header .notification-icon {
  width: 50px;
  height: 50px;
  margin-bottom: 15px;
  animation: bellRing 2s infinite;
}

.notification-request-header h3 {
  color: rgba(56, 189, 248, 0.9);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

.notification-request-content p {
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 25px;
  opacity: 0.9;
}

.notification-request-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.allow-btn, .block-btn {
  padding: 12px 25px;
  border: 2px solid;
  border-radius: 25px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.allow-btn {
  background: linear-gradient(45deg, #10b981, #059669);
  color: #fff;
  border-color: rgba(52, 211, 153, 0.5);
}

.allow-btn:hover {
  background: linear-gradient(45deg, #059669, #047857);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.block-btn {
  background: transparent;
  color: rgba(148, 163, 184, 0.9);
  border-color: rgba(148, 163, 184, 0.3);
}

.block-btn:hover {
  background: rgba(148, 163, 184, 0.1);
  color: #fff;
  border-color: rgba(148, 163, 184, 0.6);
}

/* Fix for landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .box {
    padding: 20px 15px;
  }

  .logo {
    width: 70px;
    height: 70px;
    margin-bottom: 10px;
  }

  .title {
    font-size: 1.5rem;
    margin: 5px 0;
  }

  .description {
    margin-bottom: 15px;
  }

  .button {
    flex-direction: row;
    gap: 15px;
  }

  .notification-request-modal {
    padding: 25px 20px;
    max-width: 380px;
  }

  .notification-request-header h3 {
    font-size: 1.3rem;
  }

  .notification-request-content p {
    font-size: 0.9rem;
  }

  .notification-request-buttons {
    flex-direction: column;
    gap: 10px;
  }
}

/* Notification popup styles */
.notification-popup {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(56, 189, 248, 0.7);
  border-radius: 15px;
  padding: 15px 20px;
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.4);
  z-index: 100;
  transform: translateX(-200%);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  max-width: 320px;
  display: flex;
  align-items: flex-start;
  min-height: 80px;
}

.notification-popup.show {
  transform: translateX(0);
}

.notification-popup .bell-icon {
  margin-right: 15px;
  animation: bellRing 2s infinite;
  transform-origin: top center;
  width: 30px;
  height: 30px;
}

@keyframes bellRing {
  0%, 100% {
    transform: rotate(0);
  }
  5%, 15%, 25% {
    transform: rotate(10deg);
  }
  10%, 20%, 30% {
    transform: rotate(-10deg);
  }
  35% {
    transform: rotate(0);
  }
}

.notification-popup .message {
  flex: 1;
  font-family: 'Poppins', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #fff;
  display: flex;
  flex-direction: column;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.notification-popup .message .message-title {
  color: rgba(56, 189, 248, 0.9);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.95rem;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.3);
  width: 100%;
  text-align: center;
  letter-spacing: 0.5px;
}

.notification-popup .message .message-text {
  font-size: 0.9rem;
  color: #fff;
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.4;
  padding: 2px 5px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.notification-popup .message strong {
  color: rgba(59, 130, 246, 0.9);
  font-weight: 600;
}

.notification-popup .close-btn {
  background: none;
  border: none;
  color: rgba(56, 189, 248, 0.8);
  cursor: pointer;
  font-size: 1.2rem;
  margin-left: 10px;
  padding: 5px;
  transition: all 0.3s ease;
}

.notification-popup .close-btn:hover {
  color: #fff;
  transform: rotate(90deg);
}

.notification-popup .message-text a.message-link,
.message-content a.message-link {
  color: rgba(56, 189, 248, 0.9);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: 1px dotted rgba(56, 189, 248, 0.6);
  font-weight: 500;
  display: inline-block;
  white-space: normal;
  word-break: break-all;
  position: relative;
  padding: 0 3px;
}

.notification-popup .message-text a.message-link:hover,
.message-content a.message-link:hover {
  color: #fff;
  border-bottom: 1px solid #fff;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
  background: rgba(56, 189, 248, 0.1);
  border-radius: 3px;
}

/* Fix for large screens */
@media (min-width: 1440px) {
  .box {
    max-width: 550px;
  }

  .title {
    font-size: 2.8rem;
  }

  .description {
    font-size: 1.2rem;
  }

  .btn {
    font-size: 1.3rem;
  }
}

/* Responsive styles for notification popup */
@media (max-width: 768px) {
  .notification-popup {
    bottom: 20px;
    left: 20px;
    max-width: 280px;
    padding: 12px 15px;
    min-height: 70px;
  }

  .notification-popup .bell-icon {
    width: 26px;
    height: 26px;
  }

  .notification-popup .message .message-title {
    font-size: 0.9rem;
    margin-bottom: 6px;
  }

  .notification-popup .message .message-text {
    font-size: 0.85rem;
  }

  .notification-request-modal {
    padding: 25px 20px;
    max-width: 350px;
  }

  .notification-request-header .notification-icon {
    width: 40px;
    height: 40px;
  }

  .notification-request-header h3 {
    font-size: 1.3rem;
  }

  .notification-request-content p {
    font-size: 0.9rem;
  }

  .allow-btn, .block-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .notification-popup {
    bottom: 15px;
    left: 50%;
    transform: translateX(-200%) translateY(0);
    max-width: 85%;
    width: 85%;
    padding: 10px 15px;
    margin-left: -42.5%;
  }

  .notification-popup.show {
    transform: translateX(0) translateY(0);
  }

  .notification-popup .message-text a.message-link {
    font-size: 0.85rem;
  }
}

/* Important Messages Modal Styles */
.important-message-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.7), rgba(14, 165, 233, 0.4));
  border: 2px solid rgba(56, 189, 248, 0.8);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.5);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.important-message-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.7);
}

.important-message-btn img {
  width: 30px;
  height: 30px;
  animation: pulse 2s infinite;
}

.message-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff3333;
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid white;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.3);
}

.messages-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.messages-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.messages-modal {
  background: rgba(25, 30, 35, 0.97);
  background-image: radial-gradient(circle at top right, rgba(52, 152, 219, 0.15), transparent 80%);
  border: 3px solid rgba(52, 152, 219, 0.8);
  border-radius: 20px;
  width: 90%;
  max-width: 650px;
  max-height: 80vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 30px;
  position: relative;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.4), inset 0 0 15px rgba(56, 189, 248, 0.1);
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  scrollbar-width: thin;
  The btn font-family has been updated to 'Montserrat', sans-serif.```text
scrollbar-color: rgba(56, 189, 248, 0.5) rgba(40, 40, 40, 0.5);
}

.messages-modal::-webkit-scrollbar {
  width: 8px;
}

.messages-modal::-webkit-scrollbar-track {
  background: rgba(40, 40, 40, 0.5);
  border-radius: 10px;
}

.messages-modal::-webkit-scrollbar-thumb {
  background: rgba(56, 189, 248, 0.5);
  border-radius: 10px;
}

.messages-modal::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.7);
}

.messages-modal-overlay.show .messages-modal {
  transform: scale(1);
}

.messages-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
  position: relative;
}

.messages-modal-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
}

.messages-modal-header h2 {
  font-family: 'Poppins', sans-serif;
  color: rgba(52, 152, 219, 0.9);
  margin: 0;
  font-size: 1.8rem;
  text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.messages-modal-header h2::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url('../image/alert.png');
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 12px;
  filter: drop-shadow(0 0 5px rgba(56, 189, 248, 0.7));
}

.messages-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
}

.messages-modal-close:hover {
  background: rgba(56, 189, 248, 0.3);
  transform: rotate(90deg);
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.message-item {
  background: rgba(30, 35, 45, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid rgba(52, 152, 219, 0.4);
  border-left: 6px solid rgba(52, 152, 219, 0.9);
  position: relative;
  animation: fadeIn 0.5s forwards;
  opacity: 0;
  transform: translateY(20px);
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 5px 15px rgba(52, 152, 219, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.message-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(to bottom, rgba(56, 189, 248, 0.05), transparent);
  pointer-events: none;
}

.message-item:hover {
  background: rgba(45, 45, 50, 0.9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35), 0 0 15px rgba(56, 189, 248, 0.2);
  transform: translateY(-5px) scale(1.02);
  border-left-color: rgba(56, 189, 248, 1);
}

.message-item:nth-child(1) { animation-delay: 0.1s; }
.message-item:nth-child(2) { animation-delay: 0.2s; }
.message-item:nth-child(3) { animation-delay: 0.3s; }
.message-item:nth-child(4) { animation-delay: 0.4s; }
.message-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-title {
  font-weight: bold;
  color: rgba(52, 152, 219, 0.9);
  margin-bottom: 15px;
  font-size: 1.25rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
  padding: 5px 10px 10px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.2px;
  position: relative;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.message-title:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
  border-radius: 5px;
}

.message-content {
  color: #fff;
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  max-width: 100%;
  overflow: hidden;
  padding: 12px 15px;
  display: block;
  text-overflow: ellipsis;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin: 5px 0;
  font-size: 1.05rem;
  position: relative;
  border: 1px solid rgba(56, 189, 248, 0.15);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
}

.message-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.05), transparent 70%);
  pointer-events: none;
}

.message-date {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 12px;
  font-style: italic;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 20px;
  display: inline-block;
  float: right;
  border: 1px solid rgba(56, 189, 248, 0.1);
}

.no-messages {
  text-align: center;
  padding: 40px 20px;
  color: #aaa;
  font-style: italic;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  border: 1px dashed rgba(56, 189, 248, 0.3);
}

@media (max-width: 768px) {
  .important-message-btn {
    top: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }

  .important-message-btn img {
    width: 25px;
    height: 25px;
  }

  .messages-modal-header h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .important-message-btn {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .important-message-btn img {
    width: 22px;
    height: 22px;
  }

  .messages-modal {
    padding: 15px;
    width: 95%;
    max-height: 85vh;
  }

  .messages-modal-header h2 {
    font-size: 1.3rem;
  }

  .message-item {
    padding: 15px 12px;
    margin-bottom: 15px;
  }

  .message-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }

  .message-content {
    font-size: 0.9rem;
    padding: 8px;
  }
}

/* For tablet devices */
@media (min-width: 768px) and (max-width: 1024px) {
  .messages-modal {
    max-width: 85%;
  }

  .message-item {
    padding: 18px;
  }

  .important-message-btn {
    width: 55px;
    height: 55px;
  }

  .important-message-btn img {
    width: 32px;
    height: 32px;
  }
}

/* Main container styling */
.container {
  display: none;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 20px;
  background: linear-gradient(-45deg, #1c313a, #243b55, #2b324b, #2980b9);
  background-size: 400% 400%;
  animation: gradientBGMain 20s ease infinite;
  position: relative;
}

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

/* Main content box styling */
.box {
  background: rgba(26, 32, 44, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid rgba(99, 179, 237, 0.2);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), 0 0 30px rgba(64, 145, 247, 0.3);
  text-align: center;
  width: 90%;
  max-width: 500px;
  opacity: 0;
  transform: scale(0.8) translateY(20px);
  animation: fadeInZoom 1s ease-out forwards, glowPulse 5s ease-in-out infinite;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

@keyframes fadeInZoom {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 30px rgba(52, 152, 219, 0.3);
  }
  50% {
    box-shadow: 0 0 50px rgba(52, 152, 219, 0.5);
  }
}

.important-message-btn {
  position: fixed;
  top: 30px;
  right: 30px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.7), rgba(52, 152, 219, 0.4));
  border: 2px solid rgba(52, 152, 219, 0.8);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 90;
  box-shadow: 0 0 15px rgba(52, 152, 219, 0.5);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.important-message-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 0 25px rgba(52, 152, 219, 0.7);
}

.messages-modal-header h2 {
  font-family: 'Poppins', sans-serif;
  color: rgba(52, 152, 219, 0.9);
  margin: 0;
  font-size: 1.8rem;
  text-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

.message-item {
  background: rgba(30, 35, 45, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid rgba(52, 152, 219, 0.4);
  border-left: 6px solid rgba(52, 152, 219, 0.9);
  position: relative;
  animation: fadeIn 0.5s forwards;
  opacity: 0;
  transform: translateY(20px);
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 5px 15px rgba(52, 152, 219, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.message-title {
  font-weight: bold;
  color: rgba(52, 152, 219, 0.9);
  margin-bottom: 15px;
  font-size: 1.25rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
  padding: 5px 10px 10px;
  text-transform: uppercase;
  text-align: center;
  letter-spacing: 1.2px;
  position: relative;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.message-title:after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.6), transparent);
  border-radius: 5px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 1.2rem;
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  color: #fff;
  text-decoration: none;
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(52, 152, 219, 0.4));
  border: 3px solid rgba(52, 152, 219, 0.7);
  backdrop-filter: blur(5px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 4px 15px rgba(52, 152, 219, 0.3);
  position: relative;
  overflow: hidden;
  min-width: 180px;
  z-index: 1;
  letter-spacing: 0.8px;
  opacity: 1 !important; /* Ensure buttons are always visible */
  visibility: visible !important;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0), rgba(52, 152, 219, 0.3));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -2;
  border-radius: 50px;
}

.btn:hover {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.8), rgba(52, 152, 219, 0.5));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), 0 0 25px rgba(52, 152, 219, 0.7);
  border-color: rgba(52, 152, 219, 0.9);
}

/* Logo styling */
.logo {
  width: 130px;
  height: 130px;
  margin: 0 auto 25px;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid rgba(52, 152, 219, 0.6);
  box-shadow: 0 0 20px rgba(52, 152, 219, 0.7);
  transform: translateZ(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse 3s infinite ease-in-out;
}

.logo:hover {
  transform: scale(1.05) translateZ(0);
  box-shadow: 0 0 30px rgba(52, 152, 219, 0.9);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}
/* The CSS code was updated to reflect the modern blue color scheme, updating all colors as requested.*/
/* Important Messages Modal Styles */
.messages-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.messages-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.messages-modal {
  background: rgba(15, 23, 42, 0.97);
  border: 3px solid rgba(56, 189, 248, 0.8);
  border-radius: 20px;
  width: 90%;
  max-width: 650px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  position: relative;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.4);
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.messages-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(52, 152, 219, 0.3);
}

.messages-modal-header h2 {
  color: rgba(75, 192, 192, 0.9);
  margin: 0;
  font-size: 1.8rem;
  text-transform: uppercase;
}

.messages-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.message-item {
  background: rgba(30, 35, 45, 0.75);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-radius: 25px;
  padding: 25px;
  margin-bottom: 25px;
  border: 2px solid rgba(52, 152, 219, 0.4);
  border-left: 6px solid rgba(52, 152, 219, 0.9);
  position: relative;
  animation: fadeIn 0.5s forwards;
  opacity: 0;
  transform: translateY(20px);
  width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  box-shadow: 
    0 15px 35px rgba(0, 0, 0, 0.4),
    0 5px 15px rgba(52, 152, 219, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
}

.message-content {
  color: #fff;
  line-height: 1.7;
  padding: 12px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  margin: 10px 0;
}

.message-date {
  display: block;
  text-align: right;
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 10px;
}

/* Responsive styles */
@media (max-width: 768px) {
  .messages-modal {
    padding: 20px;
    width: 95%;
  }

  .messages-modal-header h2 {
    font-size: 1.5rem;
  }

  .message-item {
    padding: 15px;
  }
}