/* Mobile-First Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: linear-gradient(to bottom, #e0f7fa, #b2ebf2);
  min-height: 100vh;
  color: #333;
  line-height: 1.6;
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

h1 {
  font-size: 1.8rem;
  margin: 15px 0 25px;
  color: #1a73e8;
  text-align: center;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

/* Zodiac Cards Grid */
.constellation-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 15px;
  width: 100%;
  max-width: 600px;
  margin: 0 auto 30px;
  padding: 10px;
}

.constellation-card {
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid rgba(255,255,255,0.7);
}

.constellation-card:active {
  transform: scale(0.97);
  background-color: #e3f2fd;
}

.symbol {
  font-size: 2.5rem;
  margin-bottom: 8px;
  color: #1a73e8;
}

.name {
  font-size: 1.1rem;
  font-weight: bold;
  color: #1a73e8;
  margin-bottom: 8px;
  text-align: center;
}

.emoji {
  font-size: 3rem;
}

/* Popup Styles */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  backdrop-filter: blur(3px);
}

.popup-content {
  background-color: white;
  border-radius: 15px;
  padding: 25px;
  width: 95%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  border: 2px solid #1a73e8;
}

.popup h2 {
  font-size: 1.8rem;
  color: #1a73e8;
  margin-bottom: 15px;
  padding-right: 30px;
}

.popup p {
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
}

.close-popup {
  background-color: #e53935;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-popup:active {
  transform: scale(0.9);
}

/* Scrolling Text Banner */
.scrolling-text-container {
  width: 100%;
  overflow: hidden;
  margin: 30px 0;
  padding: 12px 0;
  background: linear-gradient(to right, #0a0e24, #1a1b3a);
  border-top: 2px solid gold;
  border-bottom: 2px solid gold;
  position: relative;
}

.scrolling-text {
  white-space: nowrap;
  display: inline-block;
  padding-left: 100%; /* Start off-screen */
  animation: scrollText 180s linear infinite;
  font-size: 1.2rem;
  color: gold;
  text-shadow: 0 0 5px rgba(255, 215, 0, 0.7);
  font-family: 'Georgia', serif;
}

@keyframes scrollText {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Tablet and Desktop Adjustments */
@media (min-width: 768px) {
  .scrolling-text {
    font-size: 1.4rem;
    animation-duration: 160s; /* Slower on larger screens */
  }
}

/* Footer Styles */
footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  width: 100%;
  padding: 15px;
}

footer a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: bold;
}

/* Fixed Position Badge */
a[href="https://games.nextnet.gr"] {
  position: fixed;
  bottom: 10px;
  right: 10px;
  z-index: 100;
}

/* Tablet Styles */
@media (min-width: 600px) {
  h1 {
    font-size: 2.2rem;
    margin-bottom: 30px;
  }
  
  .constellation-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }
  
  .scrolling-text {
    font-size: 1.3rem;
  }
}

/* Desktop Styles */
@media (min-width: 900px) {
  .constellation-container {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .constellation-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  }
  
  .close-popup:hover {
    background-color: #c62828;
  }
  
  .scrolling-text {
    font-size: 1.4rem;
    animation-duration: 140s;
  }
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
  .constellation-container {
    grid-template-columns: repeat(6, 1fr);
    max-width: 1000px;
  }
  
  .popup-content {
    padding: 30px;
  }
}