/* === POPUP & ANIMATION STyles === */

/* --- MAIN WEBSITE POPUP (Your Provided Code) --- */

/* Popup Overlay */
.popup-overlay {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Show popup when active */
.popup-overlay.active {
  display: flex;
  opacity: 1;
}

/* The main popup container - Merged from your rules */
.popup-box {
  position: relative;
  background: url("../assets/Images/PPBG.jpg") no-repeat center center;
  background-size: cover;
  color: white;
  text-align: center;
  border-radius: 12px;
  border: 2px solid rgba(43, 231, 131,0.6);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
  width: 50%;
  max-width: 500px;
  min-width: 300px;
  padding: 60px 40px 25px; /* Top padding adjusted for icon */
  animation: popup-explosion 0.6s ease forwards, glowing-border 2s infinite ease-in-out;
}

.popup-icon {
  position: absolute;
  top: -40px;   /* Pushes image above the popup */
  left: 50%;
  transform: translateX(-50%);
  width: 100px;  /* Adjust size */
  height: auto;
}

/* Popup Title */
.popup-box h2 {
  font-size: 1.5em;
  margin-bottom: 10px;
  color:rgba(9, 241, 117, 0.8);
  animation: glowing-text 2s infinite ease-in-out;
}

/* Popup Text */
.popup-box p {
  font-size: 1em;
  color: #ddd;
  margin-bottom: 20px;
}

/* Action buttons container */
.popup-actions {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

/* Popup Buttons */
.popup-btn {
  background: #06363d;
  color: #fff;
  padding: 10px 20px;
  text-decoration: none;
  font-size: 1em;
  border-radius: 8px;
  border: none;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.popup-btn:hover {
  background: #6de5e7;
  box-shadow: 0 0 8px rgba(0,247,255,0.6);
}

/* Cross (close) button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.8em;
  color: #fff;
  cursor: pointer;
  transition: color 0.3s ease;
  outline: none;
  box-shadow: none;  
}

.close-btn:hover {
  color: #403f3f;
}

.close-btn:focus {
  outline: none;
  box-shadow: none;
}

/* --- POPUP ANIMATIONS (Your Provided Code) --- */

@keyframes popup-explosion {
  0% {
    transform: scale(0.2);
    opacity: 0;
  }
  60% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes glowing-border {
  0%   { box-shadow: 0 0 6px rgba(43, 231, 131, 0.4), 0 0 12px rgba(43, 231, 131,0.3); }
  50%  { box-shadow: 0 0 14px rgba(43, 231, 131,0.5), 0 0 28px rgba(43, 231, 131,0.3); }
  100% { box-shadow: 0 0 6px rgba(43, 231, 131,0.4), 0 0 12px rgba(43, 231, 131,0.3); }
}

@keyframes glowing-text {
  0%   { text-shadow: 0 0 6px rgba(43, 231, 131,0.6), 0 0 12px rgba(43, 231, 131,0.4); }
  50%  { text-shadow: 0 0 14px rgba(43, 231, 131,0.8), 0 0 28px rgba(43, 231, 131,0.6); }
  100% { text-shadow: 0 0 6px rgba(43, 231, 131,0.6), 0 0 12px rgba(43, 231, 131,0.4); }
}

/* --- ROCKET ANIMATION (Added Code) --- */

#rocketWrapper {
  position: absolute;
  width: 144px;
  height: 144px;
  left: 0;
  top: 0;
  transform-origin: 50% 50%;
  pointer-events: none;
  z-index: 999; /* Below popup */
}

.rocket-inner {
  width: 100%;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 50% 50%;
}

.rocket-inner img.rocket {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
}

.flame {
  position: absolute;
  top: 50%; 
  left: 5px;
  
  /* CHANGE THE ROTATION HERE */
  transform: translateY(-50%) rotate(270deg);
  
  width: 35px;
  height: auto;
  pointer-events:none;
  user-select:none;
  z-index: -1;
  filter: drop-shadow(0 6px 12px rgba(0,255,90,0.12));
  animation: flameFlicker 0.12s steps(2) infinite;
}

@keyframes flameFlicker {
  /* AND CHANGE THE ROTATION IN ALL 3 STEPS HERE */
  0%   { transform: translateY(-50%) rotate(270deg) scaleY(1);    opacity:0.95; }
  50%  { transform: translateY(-50%) rotate(270deg) scaleY(1.25); opacity:0.7;  }
  100% { transform: translateY(-50%) rotate(270deg) scaleY(1);    opacity:0.95; }
}

.particle {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #00ff8a;
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(0, 255, 140, 0.5), 0 0 25px rgba(0, 255, 140, 0.3);
  pointer-events: none;
}

#triggerBtn {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1001; /* Above popup overlay */
  background: #071;
  color: #c7ffd0;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
}

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

.preheader {
  width: 100%;
  background: #001100;
  border-bottom: 3px solid #39ff14;
  color: #39ff14;
  font-family: "Share Tech Mono", monospace;
  font-size: 16px;
  padding: 12px 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  text-transform: uppercase;
  box-shadow: 0 0 12px #39ff14 inset;
  animation: flicker 4s infinite alternate;
}

#alertText {
  text-shadow: 0 0 6px #39ff14, 0 0 18px #00ff88;
  font-weight: bold;
  letter-spacing: 2px;
}

.cta-btn {
  background: #001100;
  border: 2px solid #39ff14;
  color: #39ff14;
  padding: 8px 16px;
  font-size: 14px;
  text-decoration: none;
  border-radius: 6px;
  text-transform: uppercase;
  font-weight: bold;
  letter-spacing: 1px;
  text-shadow: 0 0 6px #39ff14, 0 0 18px #00ff88;
  box-shadow: 0 0 15px #39ff14 inset, 0 0 10px #39ff14;
  animation: buttonGlow 3s infinite alternate;
  transition: all 0.3s ease;
}

.cta-btn:hover {
  background: #39ff14;
  color: #001100;
  text-shadow: none;
  box-shadow: 0 0 25px #39ff14, 0 0 40px #39ff14 inset;
}

@keyframes flicker {
  0% { box-shadow: 0 0 8px #39ff14 inset; }
  50% { box-shadow: 0 0 18px #39ff14 inset; }
  100% { box-shadow: 0 0 12px #39ff14 inset; }
}

@keyframes buttonGlow {
  0% { box-shadow: 0 0 8px #39ff14 inset, 0 0 12px #39ff14; }
  100% { box-shadow: 0 0 20px #39ff14 inset, 0 0 30px #39ff14; }
}
