/* Enhanced Welcome Animation Styles */
.welcome-animation-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  overflow: hidden;
}

.welcome-animation-container.active {
  opacity: 1;
  pointer-events: auto;
}

.welcome-animation-container.fade-out {
  opacity: 0;
  transition: opacity 1s ease;
}

.welcome-animation-content {
  position: relative;
  text-align: center;
  max-width: 800px;
  width: 90%;
  padding: 2rem;
  transform: scale(0.8);
  transition: transform 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.welcome-animation-container.active .welcome-animation-content {
  transform: scale(1);
}

/* Background elements */
.welcome-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.circle-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 1px;
  background: transparent;
  /* Reduced shadow spread and opacity */
  box-shadow: 0 0 150px 100px rgba(var(--rgb-theme-color, 0, 255, 204), 0.05);
  border-radius: 50%;
  opacity: 0;
  animation: circle-pulse 3s ease-out forwards;
}

@keyframes circle-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.1);
  }
  50% {
    /* Reduced maximum opacity */
    opacity: 0.5;
  }
  100% {
    /* Reduced final opacity */
    opacity: 0.2;
    transform: translate(-50%, -50%) scale(1);
  }
}

.particle-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: var(--theme-color, #00ffcc);
  border-radius: 50%;
  opacity: 0;
  animation: particle-fade 8s linear infinite;
}

.particle:nth-child(1) { top: 10%; left: 20%; animation-delay: 0.1s; }
.particle:nth-child(2) { top: 35%; left: 15%; animation-delay: 1.5s; }
.particle:nth-child(3) { top: 60%; left: 25%; animation-delay: 0.7s; }
.particle:nth-child(4) { top: 75%; left: 10%; animation-delay: 2.3s; }
.particle:nth-child(5) { top: 20%; left: 80%; animation-delay: 0.5s; }
.particle:nth-child(6) { top: 40%; left: 90%; animation-delay: 1.8s; }
.particle:nth-child(7) { top: 65%; left: 85%; animation-delay: 0.3s; }
.particle:nth-child(8) { top: 85%; left: 75%; animation-delay: 2.1s; }
.particle:nth-child(9) { top: 15%; left: 45%; animation-delay: 1.2s; }
.particle:nth-child(10) { top: 90%; left: 50%; animation-delay: 0.9s; }
.particle:nth-child(11) { top: 5%; left: 55%; animation-delay: 2.4s; }
.particle:nth-child(12) { top: 30%; left: 30%; animation-delay: 0.4s; }
.particle:nth-child(13) { top: 45%; left: 60%; animation-delay: 1.7s; }
.particle:nth-child(14) { top: 70%; left: 40%; animation-delay: 0.8s; }
.particle:nth-child(15) { top: 80%; left: 65%; animation-delay: 2.2s; }
.particle:nth-child(16) { top: 25%; left: 85%; animation-delay: 0.6s; }
.particle:nth-child(17) { top: 50%; left: 75%; animation-delay: 1.9s; }
.particle:nth-child(18) { top: 75%; left: 25%; animation-delay: 0.2s; }
.particle:nth-child(19) { top: 35%; left: 35%; animation-delay: 1.3s; }
.particle:nth-child(20) { top: 60%; left: 60%; animation-delay: 1.1s; }

@keyframes particle-fade {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    /* Reduced maximum opacity */
    opacity: 0.6;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0);
  }
}

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(to right, 
    transparent, 
    rgba(var(--rgb-theme-color, 0, 255, 204), 0.5), 
    transparent);
  opacity: 0.7;
  animation: scan-down 3s linear forwards;
  z-index: 0;
}

@keyframes scan-down {
  0% {
    top: -5px;
  }
  100% {
    top: 100%;
  }
}

/* Logo with enhanced effects */
.logo-group {
  position: relative;
  margin-bottom: 2rem;
}

.welcome-logo-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 140px;
  height: 140px;
  border-radius: 50%;
  /* Reduced opacity in the gradient */
  background: radial-gradient(
    circle,
    rgba(var(--rgb-theme-color, 0, 255, 204), 0.2) 0%,
    transparent 70%
  );
  animation: logo-glow-pulse 2s infinite alternate;
}

@keyframes logo-glow-pulse {
  0% {
    /* Reduced opacity */
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.9);
  }
  100% {
    /* Reduced opacity */
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.welcome-logo {
  position: relative;
  margin-bottom: 1rem;
  animation: logo-hover 3s ease-in-out infinite alternate;
}

@keyframes logo-hover {
  0% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(5px);
  }
}

.welcome-logo img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 8px var(--theme-color));
}

/* Welcome text group with enhanced effects */
.welcome-text-container {
  position: relative;
  margin-bottom: 2rem;
  perspective: 800px;
}

.welcome-text-group {
  position: relative;
  margin-bottom: 1rem;
}

.welcome-text-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.glitch-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  animation: text-glitch 5s infinite;
  opacity: 0;
}

@keyframes text-glitch {
  0% {
    opacity: 0;
  }
  10% {
    opacity: 0;
  }
  10.5% {
    opacity: 1;
    left: -2px;
    background: rgba(var(--rgb-theme-color, 0, 255, 204), 0.1);
  }
  10.6% {
    opacity: 0;
  }
  11% {
    opacity: 0;
  }
  11.1% {
    opacity: 1;
    left: 2px;
    background: rgba(var(--rgb-theme-color, 0, 255, 204), 0.1);
  }
  11.2% {
    opacity: 0;
  }
  18% {
    opacity: 0;
  }
  18.1% {
    opacity: 1;
    left: -1px;
    background: rgba(var(--rgb-theme-color, 0, 255, 204), 0.1);
  }
  18.2% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

.text-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Reduced box shadow intensity */
  box-shadow: 0 0 10px var(--theme-color, #00ffcc);
  opacity: 0;
  animation: text-glow-pulse 2s ease-in-out infinite alternate;
  border-radius: 10px;
}

@keyframes text-glow-pulse {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    /* Reduced maximum opacity */
    opacity: 0.15;
    transform: scale(1.05);
  }
}

.welcome-text {
  font-family: 'Audiowide', cursive;
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(to right, #fff, var(--theme-color, #00ffcc), #fff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 4px;
  /* Reduced glow in text-flicker animation */
  animation: text-flicker 5s linear infinite;
  transform: translateZ(0);
  opacity: 1;
  transition: 
    opacity 0.5s ease-in-out,
    transform 0.5s ease-in-out;
  display: inline-block;
}

.welcome-text.fade-out {
  opacity: 0;
  transform: scale(0.9);
}

.welcome-text.fade-in {
  opacity: 1;
  transform: scale(1);
}

@keyframes text-flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
    opacity: 1;
    /* Reduced shadow intensity by using fewer layers and smaller blur radius */
    text-shadow: 0 0 5px var(--theme-color, #00ffcc),
                 0 0 10px var(--theme-color, #00ffcc);
  }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
    opacity: 0.8;
    text-shadow: none;
  }
}

@keyframes glitchText {
  0%, 100% { transform: translate(0); }
  10% { transform: translate(-2px, -2px); }
  20% { transform: translate(2px, 2px); }
  30% { transform: translate(-2px, 2px); }
  40% { transform: translate(2px, -2px); }
  50% { transform: translate(0); }
}

.welcome-text-effects .glitch-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--rgb-theme-color), 0.2);
  opacity: 0;
  pointer-events: none;
  animation: glitchText 2s infinite;
  transition: opacity 0.5s ease-in-out;
}

.welcome-text.fade-out + .welcome-text-effects .glitch-effect {
  opacity: 0.5;
}

.welcome-text.fade-in + .welcome-text-effects .glitch-effect {
  opacity: 0;
}

.welcome-name {
  font-family: 'Audiowide', cursive;
  font-size: 2.5rem;
  color: var(--theme-color, #00ffcc);
  /* Reduced glow intensity on the text shadow */
  text-shadow: 0 0 8px var(--theme-color, #00ffcc);
  letter-spacing: 2px;
  animation: name-reveal 1.5s ease-out forwards,
             name-glow 2s 1.5s ease-in-out infinite alternate;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes name-reveal {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes name-glow {
  0% {
    /* Reduced shadow intensity */
    text-shadow: 0 0 5px var(--theme-color, #00ffcc);
  }
  100% {
    /* Reduced shadow intensity and removed the third layer */
    text-shadow: 0 0 8px var(--theme-color, #00ffcc),
                 0 0 12px var(--theme-color, #00ffcc);
  }
}

/* Animated elements */
.welcome-animated-elements {
  position: relative;
  width: 100%;
  height: 100px;
  margin-bottom: 2rem;
}

/* Data streams */
.data-stream {
  position: absolute;
  top: 0;
  width: 120px;
  height: 100%;
}

.data-stream.left {
  left: 0;
}

.data-stream.right {
  right: 0;
}

.data-line {
  height: 4px;
  background-color: var(--theme-color, #00ffcc);
  /* Reduced opacity */
  opacity: 0.5;
  margin: 15px 0;
  position: relative;
  animation: data-flow 2s linear infinite;
}

.data-stream.left .data-line {
  animation: data-flow-left 2s linear infinite;
}

.data-stream.right .data-line {
  animation: data-flow-right 2s linear infinite;
}

.data-stream.left .data-line:nth-child(1) { animation-delay: 0.1s; }
.data-stream.left .data-line:nth-child(2) { animation-delay: 0.5s; }
.data-stream.left .data-line:nth-child(3) { animation-delay: 0.9s; }
.data-stream.right .data-line:nth-child(1) { animation-delay: 0.3s; }
.data-stream.right .data-line:nth-child(2) { animation-delay: 0.7s; }
.data-stream.right .data-line:nth-child(3) { animation-delay: 1.1s; }

@keyframes data-flow-left {
  0% {
    width: 0;
    left: 0;
    opacity: 0.7;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    width: 100%;
    left: 0;
    opacity: 0.7;
  }
}

@keyframes data-flow-right {
  0% {
    width: 0;
    right: 0;
    left: auto;
    opacity: 0.7;
  }
  50% {
    opacity: 0.9;
  }
  100% {
    width: 100%;
    right: 0;
    left: auto;
    opacity: 0.7;
  }
}

/* Digital rain effect */
.digital-rain {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  height: 100%;
}

.rain-column {
  width: 2px;
  background: linear-gradient(to bottom, 
    transparent,
    var(--theme-color, #00ffcc));
  height: 0;
  /* Reduced opacity */
  opacity: 0.5;
  animation: rain-fall 2s ease-in infinite;
}

.rain-column:nth-child(1) { animation-delay: 0s; }
.rain-column:nth-child(2) { animation-delay: 0.4s; }
.rain-column:nth-child(3) { animation-delay: 0.8s; }
.rain-column:nth-child(4) { animation-delay: 1.2s; }
.rain-column:nth-child(5) { animation-delay: 1.6s; }

@keyframes rain-fall {
  0% {
    height: 0;
    opacity: 0;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    height: 100%;
    opacity: 0;
  }
}

/* Tech details */
.tech-details {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 30px;
  font-family: monospace;
  font-size: 0.85rem;
  color: var(--theme-color, #00ffcc);
  opacity: 0;
  animation: tech-details-appear 1s forwards;
  animation-delay: 2s;
}

@keyframes tech-details-appear {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  100% {
    opacity: 0.8;
    transform: translateX(-50%) translateY(0);
  }
}

.detail-item {
  position: relative;
  padding-left: 15px;
  transition: all 0.3s ease-in-out;
}

.detail-item::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--theme-color, #00ffcc);
  animation: detail-blink 1s infinite;
}

.detail-item:nth-child(1)::before { animation-delay: 0.1s; }
.detail-item:nth-child(2)::before { animation-delay: 0.3s; }
.detail-item:nth-child(3)::before { animation-delay: 0.5s; }
.detail-item:nth-child(4)::before { animation-delay: 0.7s; }

@keyframes detail-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Notification pulse animation for unread alerts */
@keyframes notificationPulse {
  0%, 100% { 
    opacity: 1;
    text-shadow: 0 0 5px rgba(var(--rgb-theme-color), 0.3);
  }
  50% { 
    opacity: 0.7;
    text-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.6);
  }
}

/* Special styling for notification count (last item) */
.tech-details .detail-item:last-child {
  position: relative;
}

/* Optional: Add a subtle icon or indicator for notifications */
.tech-details .detail-item:last-child::before {
  content: "";
  width: 14px;
  height: 14px;
  background-color: var(--theme-color);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9'/%3E%3Cpath d='M13.73 21a2 2 0 0 1-3.46 0'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-position: center;
  display: inline-block;
  margin-right: 5px;
  margin-left: 16px;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
  vertical-align: middle;
  margin-top: -1px;
}

/* Show icon when there are unread notifications */
.tech-details .detail-item:last-child[style*="bold"]::before {
  opacity: 1;
}

/* Enhanced grid with interactive elements */
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 0 auto;
  max-width: 500px;
}

.grid-item {
  height: 4px;
  background-color: var(--theme-color, #00ffcc);
  opacity: 0.6; /* Reduced from 0.7 */
  animation: grid-item-glow 1.5s infinite alternate;
  /* Reduced box shadow intensity */
  box-shadow: 0 0 5px var(--theme-color, #00ffcc);
  animation-delay: calc(var(--i, 0) * 0.1s);
  position: relative;
}

.grid-item.center-highlight::after {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 20px;
  background-color: var(--theme-color, #00ffcc);
  border-radius: 3px;
  animation: center-pulse 2s infinite alternate;
  /* Reduced opacity */
  opacity: 0.7;
}

@keyframes center-pulse {
  0% {
    height: 10px;
    opacity: 0.7;
  }
  100% {
    height: 20px;
    opacity: 1;
  }
}

.grid-item:nth-child(1) { --i: 1; }
.grid-item:nth-child(2) { --i: 2; }
.grid-item:nth-child(3) { --i: 3; }
.grid-item:nth-child(4) { --i: 4; }
.grid-item:nth-child(5) { --i: 5; }
.grid-item:nth-child(6) { --i: 6; }
.grid-item:nth-child(7) { --i: 7; }
.grid-item:nth-child(8) { --i: 8; }
.grid-item:nth-child(9) { --i: 9; }
.grid-item:nth-child(10) { --i: 10; }
.grid-item:nth-child(11) { --i: 11; }
.grid-item:nth-child(12) { --i: 12; }

@keyframes grid-item-glow {
  0% {
    opacity: 0.4;
    transform: scaleX(0.8);
  }
  100% {
    opacity: 0.9;
    transform: scaleX(1);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .welcome-animation-content {
    padding: 1.5rem;
    max-width: 90%;
  }
  
  .welcome-logo img {
    width: 100px;
    height: auto;
    /* Further reduced drop shadow for mobile */
    filter: drop-shadow(0 0 5px var(--theme-color, #00ffcc));
  }
  
  .welcome-logo-glow {
    width: 120px;
    height: 120px;
    /* Reduced opacity for mobile */
    background: radial-gradient(
      circle,
      rgba(var(--rgb-theme-color, 0, 255, 204), 0.15) 0%,
      transparent 70%
    );
  }
  
  .welcome-text {
    font-size: 2.5rem;
    /* Reduced text shadow for mobile */
    text-shadow: 0 0 4px var(--theme-color, #00ffcc);
  }
  
  .welcome-name {
    font-size: 1.8rem;
    /* Reduced text shadow for mobile */
    text-shadow: 0 0 5px var(--theme-color, #00ffcc);
  }
  
  .welcome-grid {
    max-width: 300px;
    gap: 8px;
  }
  
  .grid-item {
    /* Reduced box shadow for mobile */
    box-shadow: 0 0 3px var(--theme-color, #00ffcc);
    opacity: 0.5;
  }
  
  .welcome-animated-elements {
    height: 80px;
    margin-bottom: 1.5rem;
  }
  
  .data-stream {
    width: 80px;
  }
  
  .data-line {
    /* Reduced opacity for mobile */
    opacity: 0.4;
  }
  
  .tech-details {
    gap: 15px;
    font-size: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    /* Reduced text shadow for mobile */
    text-shadow: 0 0 3px var(--theme-color, #00ffcc);
  }
  
  /* Reduce circle effect for mobile */
  .circle-effect {
    box-shadow: 0 0 100px 80px rgba(var(--rgb-theme-color, 0, 255, 204), 0.03);
  }
  
  /* Reduce rain column opacity for mobile */
  .rain-column {
    opacity: 0.4;
  }
}

/* Small mobile devices (under 480px) */
@media (max-width: 480px) {
  .welcome-animation-content {
    padding: 1rem;
  }
  
  .welcome-logo img {
    width: 80px;
    /* Minimal shadow for small devices */
    filter: drop-shadow(0 0 3px var(--theme-color, #00ffcc));
  }
  
  .welcome-logo-glow {
    width: 100px;
    height: 100px;
    /* Further reduced opacity for small mobile */
    background: radial-gradient(
      circle,
      rgba(var(--rgb-theme-color, 0, 255, 204), 0.1) 0%,
      transparent 70%
    );
  }
  
  .welcome-text {
    font-size: 2rem;
    letter-spacing: 2px;
    /* Minimal text shadow for small devices */
    text-shadow: 0 0 3px var(--theme-color, #00ffcc);
  }
  
  .welcome-name {
    font-size: 1.4rem;
    letter-spacing: 1px;
    /* Minimal text shadow for small devices */
    text-shadow: 0 0 4px var(--theme-color, #00ffcc);
  }
  
  .welcome-grid {
    max-width: 250px;
    gap: 6px;
  }
  
  .grid-item {
    height: 3px;
    /* Minimal box shadow for small devices */
    box-shadow: 0 0 2px var(--theme-color, #00ffcc);
    opacity: 0.4;
  }
  
  .grid-item.center-highlight::after {
    width: 8px;
    height: 16px;
    top: -6px;
    /* Reduced opacity for small devices */
    opacity: 0.5;
  }
  
  .welcome-animated-elements {
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .data-stream {
    width: 60px;
  }
  
  .data-line {
    height: 3px;
    margin: 12px 0;
    /* Further reduced opacity for small devices */
    opacity: 0.3;
  }
  
  .digital-rain {
    gap: 10px;
  }
  
  .rain-column {
    width: 1px;
    /* Further reduced opacity for small devices */
    opacity: 0.3;
  }
  
  .tech-details {
    font-size: 0.7rem;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    bottom: 0;
    /* Minimal text shadow for small devices */
    text-shadow: 0 0 2px var(--theme-color, #00ffcc);
  }
  
  .detail-item {
    padding-left: 12px;
  }
  
  .particle-grid .particle {
    width: 1px;
    height: 1px;
    /* Reduced maximum opacity in animation */
    animation-name: particle-fade-mobile;
  }
  
  @keyframes particle-fade-mobile {
    0% {
      opacity: 0;
      transform: scale(0);
    }
    50% {
      opacity: 0.4;
      transform: scale(1.2);
    }
    100% {
      opacity: 0;
      transform: scale(0);
    }
  }
  
  /* Reduced circle effect for small mobile */
  .circle-effect {
    box-shadow: 0 0 70px 50px rgba(var(--rgb-theme-color, 0, 255, 204), 0.02);
  }
}

/* Extremely small devices (under 360px) */
@media (max-width: 360px) {
  .welcome-animation-content {
    padding: 0.8rem;
  }
  
  .welcome-logo img {
    width: 70px;
    /* Minimal shadow for tiny devices */
    filter: drop-shadow(0 0 2px var(--theme-color, #00ffcc));
  }
  
  .welcome-text {
    font-size: 1.7rem;
    /* Extremely reduced shadow for tiny devices */
    text-shadow: 0 0 2px var(--theme-color, #00ffcc);
  }
  
  .welcome-name {
    font-size: 1.2rem;
    /* Extremely reduced shadow for tiny devices */
    text-shadow: 0 0 3px var(--theme-color, #00ffcc);
  }
  
  .welcome-grid {
    max-width: 200px;
    gap: 5px;
  }
  
  .grid-item {
    /* Almost no shadow for tiny devices */
    box-shadow: 0 0 1px var(--theme-color, #00ffcc);
    opacity: 0.3;
  }
  
  .welcome-animated-elements {
    height: 50px;
  }
  
  .data-stream {
    width: 40px;
  }
  
  .data-line {
    opacity: 0.25;
  }
  
  .digital-rain {
    gap: 8px;
  }
  
  .rain-column {
    opacity: 0.25;
  }
  
  /* Hide some elements on extremely small screens */
  .data-stream .data-line:nth-child(3),
  .digital-rain .rain-column:nth-child(5),
  .digital-rain .rain-column:nth-child(1) {
    display: none;
  }
  
  .tech-details {
    font-size: 0.65rem;
    /* Minimal shadow for tiny devices */
    text-shadow: 0 0 1px var(--theme-color, #00ffcc);
  }
  
  /* Minimized circle effect for tiny devices */
  .circle-effect {
    box-shadow: 0 0 50px 30px rgba(var(--rgb-theme-color, 0, 255, 204), 0.01);
  }
}

/* Portrait orientation adjustments */
@media (max-height: 600px) {
  .welcome-animation-content {
    transform: scale(0.9);
  }
  
  .welcome-animated-elements {
    height: 50px;
    margin-bottom: 1rem;
  }
  
  .welcome-logo {
    margin-bottom: 0.5rem;
  }
  
  .tech-details {
    bottom: 0;
  }
  
  /* Further reduce glow effects for low-height devices */
  .welcome-text,
  .welcome-name {
    text-shadow: 0 0 3px var(--theme-color, #00ffcc);
  }
  
  .grid-item {
    box-shadow: 0 0 2px var(--theme-color, #00ffcc);
    opacity: 0.4;
  }
}

/* Event Celebration Styles */
.welcome-animation-container.celebrating {
  animation: celebrationGlow 3s ease-in-out;
}

.welcome-animation-container.priority-celebration {
  animation: priorityCelebrationGlow 3s ease-in-out;
}

.celebration-text {
  color: rgba(var(--rgb-theme-color), 1) !important;
  text-shadow: 
    0 0 10px rgba(var(--rgb-theme-color), 0.8),
    0 0 20px rgba(var(--rgb-theme-color), 0.6),
    0 0 30px rgba(var(--rgb-theme-color), 0.4);
  animation: celebrationPulse 2s ease-in-out infinite alternate;
}

.event-flag-display {
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%) scale(0);
  transition: transform 0.5s ease-out;
  z-index: 15;
}

.event-flag-display.show {
  transform: translateY(-50%) scale(1);
  animation: flagWave 2s ease-in-out infinite;
}

.event-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  animation: bounce 1s ease-in-out infinite;
}

.event-flag {
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

/* Celebration Effects */
.celebration-effects {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 12;
}

.firework {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(var(--rgb-theme-color), 1);
  border-radius: 50%;
  animation: fireworkBurst 2s ease-out forwards;
}

.firework:nth-child(1) {
  top: 30%;
  left: 20%;
  animation-delay: 0.5s;
}

.firework:nth-child(2) {
  top: 40%;
  right: 25%;
  animation-delay: 1s;
}

.firework:nth-child(3) {
  top: 25%;
  left: 50%;
  animation-delay: 1.5s;
}

.sparkle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  animation: sparkleEffect 3s ease-in-out infinite;
}

.sparkle:nth-child(n+4) {
  animation-delay: 0.5s;
}

.sparkle:nth-child(1) { top: 20%; left: 15%; }
.sparkle:nth-child(2) { top: 35%; right: 20%; }
.sparkle:nth-child(3) { top: 60%; left: 25%; }
.sparkle:nth-child(4) { top: 45%; right: 30%; }
.sparkle:nth-child(5) { top: 70%; left: 60%; }

.floating-heart {
  position: absolute;
  font-size: 1.5rem;
  animation: floatUp 4s ease-out forwards;
  opacity: 0;
}

.floating-heart:nth-child(1) {
  left: 20%;
  animation-delay: 0.5s;
}

.floating-heart:nth-child(2) {
  right: 25%;
  animation-delay: 1s;
}

.floating-heart:nth-child(3) {
  left: 50%;
  animation-delay: 1.5s;
}

.floating-heart:nth-child(4) {
  right: 40%;
  animation-delay: 2s;
}

.celebration-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(var(--rgb-theme-color), 0.8);
  border-radius: 50%;
  animation: particleBurst 3s ease-out forwards;
}

.celebration-particle:nth-child(1) { top: 30%; left: 30%; }
.celebration-particle:nth-child(2) { top: 40%; right: 35%; }
.celebration-particle:nth-child(3) { top: 50%; left: 60%; }
.celebration-particle:nth-child(4) { top: 35%; right: 45%; }
.celebration-particle:nth-child(5) { top: 60%; left: 40%; }

/* Celebration Animations */
@keyframes celebrationGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2) saturate(1.3); }
}

@keyframes priorityCelebrationGlow {
  0%, 100% { 
    filter: brightness(1); 
    box-shadow: 0 0 0 rgba(var(--rgb-theme-color), 0);
  }
  50% { 
    filter: brightness(1.3) saturate(1.5); 
    box-shadow: 0 0 30px rgba(var(--rgb-theme-color), 0.3);
  }
}

@keyframes celebrationPulse {
  0% { transform: scale(1); }
  100% { transform: scale(1.05); }
}

@keyframes flagWave {
  0%, 100% { transform: translateY(-50%) scale(1) rotate(0deg); }
  25% { transform: translateY(-50%) scale(1.1) rotate(2deg); }
  75% { transform: translateY(-50%) scale(1.1) rotate(-2deg); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes fireworkBurst {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(15);
    opacity: 0.8;
  }
  100% {
    transform: scale(25);
    opacity: 0;
  }
}

@keyframes sparkleEffect {
  0%, 100% { 
    opacity: 0; 
    transform: scale(0) rotate(0deg);
  }
  50% { 
    opacity: 1; 
    transform: scale(1) rotate(180deg);
  }
}

@keyframes floatUp {
  0% {
    opacity: 0;
    transform: translateY(100px) scale(0.5);
  }
  30% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-100px) scale(0.3);
  }
}

@keyframes particleBurst {
  0% {
    transform: scale(0) translate(0, 0);
    opacity: 1;
  }
  50% {
    transform: scale(1) translate(var(--random-x, 20px), var(--random-y, -30px));
    opacity: 0.8;
  }
  100% {
    transform: scale(0.3) translate(var(--random-x, 40px), var(--random-y, -60px));
    opacity: 0;
  }
}

@keyframes notificationPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Mobile optimizations for celebrations */
@media (max-width: 480px) {
  .event-flag-display {
    right: 10px;
    transform: translateY(-50%) scale(0.8);
  }
  
  .event-emoji {
    font-size: 1.5rem;
  }
  
  .event-flag {
    font-size: 1.2rem;
  }
  
  .floating-heart {
    font-size: 1.2rem;
  }
  
  .firework {
    width: 3px;
    height: 3px;
  }
}

/* Event day hint styles */
.welcome-event-hint {
  font-weight: 600;
  text-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.5);
}

@keyframes celebrationHintGlow {
  0%, 100% { 
    opacity: 0.8;
    text-shadow: 0 0 10px rgba(var(--rgb-theme-color), 0.5);
  }
  50% { 
    opacity: 1;
    text-shadow: 0 0 15px rgba(var(--rgb-theme-color), 0.8);
  }
}

/* Style for event day overlay */
.welcome-skip-overlay.event-day {
  cursor: default !important;
}

.welcome-skip-overlay.event-day:hover {
  cursor: default !important;
}

.event-flag svg {
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  animation: flagWave 2s ease-in-out infinite;
}

.event-flag-emoji {
  font-size: 1.5rem;
  animation: pulse 2s ease-in-out infinite;
}

/* Enhanced flag wave animation for SVG */
@keyframes flagWave {
  0%, 100% { 
    transform: scale(1) rotate(0deg);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  }
  25% { 
    transform: scale(1.05) rotate(1deg);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  }
  75% { 
    transform: scale(1.05) rotate(-1deg);
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  }
}