/* Enhanced Zodiac Sign Styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Comic Sans MS", cursive, sans-serif;
  background: linear-gradient(135deg, #e0f7fa, #80deea, #4dd0e1);
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #333;
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  padding: 20px;
}

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

h1 {
  font-size: 2.8em;
  margin: 20px 0;
  color: #1a73e8;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  position: relative;
  display: inline-block;
  text-align: center;
  width: 100%;
}

h1::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 4px;
  bottom: -10px;
  left: 0;
  background: linear-gradient(to right, #1a73e8, #4dd0e1);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.5s ease-out;
}

h1:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.constellation-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  max-width: 1200px;
  padding: 30px;
  perspective: 1000px;
  margin-top: 20px;
}

.constellation-card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  width: 140px;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.constellation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 60%, rgba(255,255,255,0.3));
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.constellation-card:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 1);
}

.constellation-card:hover::before {
  transform: translateX(100%);
}

.symbol {
  font-size: 3.5em;
  margin-bottom: 10px;
  transition: transform 0.3s;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.constellation-card:hover .symbol {
  transform: rotate(10deg) scale(1.2);
}

.name {
  font-size: 1.3em;
  font-weight: bold;
  color: #1a73e8;
  transition: all 0.3s;
}

.constellation-card:hover .name {
  color: #0d47a1;
  transform: scale(1.1);
}

.emoji {
  font-size: 2.2em;
  margin-top: 10px;
  transition: all 0.3s;
  filter: drop-shadow(1px 1px 2px rgba(0,0,0,0.2));
}

.constellation-card:hover .emoji {
  transform: scale(1.3) rotate(5deg);
}

/* Enhanced Popup Styles */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

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

.popup-content {
  background: linear-gradient(145deg, #ffffff, #f5f5f5);
  border-radius: 16px;
  padding: 30px;
  max-width: 450px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  opacity: 0;
  animation: slideUp 0.4s ease-out 0.2s forwards;
}

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

.popup h2 {
  font-size: 1.8em;
  color: #1a73e8;
  margin-bottom: 15px;
  background: linear-gradient(to right, #1a73e8, #4dd0e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.popup p {
  font-size: 1.1em;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

.close-popup {
  background: linear-gradient(to right, #e53935, #f44336);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1em;
  position: absolute;
  top: 15px;
  right: 15px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s;
}

.close-popup:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Button Enhancements */
button {
  background: linear-gradient(to right, #4CAF50, #8BC34A);
  border: none;
  color: white;
  padding: 12px 24px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.3s;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.4s;
}

button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

button:hover::after {
  transform: translateX(100%);
}

/* Responsive Design */
@media (max-width: 768px) {
  .constellation-card {
    width: 120px;
    height: 170px;
  }
  
  .symbol {
    font-size: 3em;
  }
  
  .name {
    font-size: 1.1em;
  }
  
  .emoji {
    font-size: 1.8em;
  }
  
  .popup-content {
    width: 90%;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 2.2em;
  }
  
  .constellation-card {
    width: 100px;
    height: 150px;
  }
  
  button {
    padding: 10px 20px;
    font-size: 14px;
  }
}