@keyframes draw {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
  color: #333;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px 10px;
  box-sizing: border-box;
}

.container {
  text-align: center;
  background: #fff;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
  border: 1px solid #e1e1e1;
  width: 100%;
  max-width: 800px;
  margin-bottom: 20px;
  box-sizing: border-box;
}

h1, h2 {
  color: #333;
}

.numbers-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}

.white-balls-container, .powerball-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 10px;
}

.ball {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 5px;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  background-color: #fff;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), inset 0 2px 3px rgba(255,255,255,0.7);
  animation: draw 0.5s ease-out forwards;
}

.ball.powerball {
  background-color: #d71e28;
  color: #fff;
  border-color: #b91a23;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2), inset 0 -3px 4px rgba(0,0,0,0.3);
}

#generate-btn, #horoscope-btn {
  background: linear-gradient(145deg, #007bff, #0056b3);
  color: white;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
  margin-top: 10px;
}

#generate-btn:hover, #horoscope-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
}

#generate-btn:active, #horoscope-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* Header and Footer */
.site-header {
  width: 100%;
  background-color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  padding: 10px 0;
}

.site-header .container, .site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  box-shadow: none;
  border: none;
  border-radius: 0;
  width: 100%;
  box-sizing: border-box;
}

.site-title {
  margin: 0;
  font-size: 20px;
  color: #d71e28;
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
}

.main-nav li {
  margin-left: 20px;
}

.main-nav a {
  text-decoration: none;
  color: #555;
  font-weight: bold;
  transition: color 0.2s;
}

.main-nav a:hover {
  color: #007bff;
}

/* Dropdown styles */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 100;
  border-radius: 8px;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: #f1f1f1;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.hamburger-menu {
  display: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #333;
  border-radius: 2px;
  transition: all 0.3s ease-in-out;
}

.site-footer {
  background-color: #f8f9fa;
  color: #6c757d;
  font-size: 14px;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav li {
  margin: 5px 10px;
}

.footer-nav a {
  text-decoration: none;
  color: #555;
  font-weight: bold;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: #007bff;
}

.content-page {
  text-align: left;
  line-height: 1.8;
}

.content-page h1 {
  border-bottom: 2px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

.content-page p {
  margin-bottom: 1.2em;
}

/* Zodiac Card Styles */
#zodiac-container {
  perspective: 1000px;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  max-width: 400px;
}

.zodiac-card {
  width: 100%;
  min-height: 500px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s;
  cursor: pointer;
}

.zodiac-card.is-flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 25px;
  box-sizing: border-box;
}

.card-face--front {
  background: linear-gradient(135deg, #ffffff, #f1f4f9);
}

.card-face--back {
  background: linear-gradient(135deg, #4c4c4c, #333333);
  color: white;
  transform: rotateY(180deg);
}

.card-header h2 {
  margin: 0;
  font-size: 2.5em;
  color: #333;
}
.card-face--back .card-header h2 {
    color: #fff;
}
.zodiac-en {
  font-size: 0.7em;
  color: #888;
}
.card-face--back .zodiac-en {
  color: #ccc;
}
.zodiac-title {
  font-size: 1.2em;
  font-style: italic;
  color: #555;
  margin: 5px 0 0 0;
}
.card-face--back .zodiac-title {
  color: #ddd;
}
.zodiac-vibe {
    font-size: 1.1em;
    font-weight: bold;
}

.zodiac-trait {
  padding: 15px;
  border-radius: 10px;
  margin: 20px 0;
}

.zodiac-trait h3 {
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  font-size: 1.4em;
}
.zodiac-trait .icon {
  margin-right: 10px;
  font-size: 1.5em;
}

.god-tier {
  background: #fffbeb;
  border: 1px solid #ffd666;
}
.god-tier h3 {
  color: #b38600;
}

.red-flags {
  background: #fff5f5;
  border: 1px solid #ffcccc;
}
.card-face--back .red-flags {
    background: #5a3e3e;
    border: 1px solid #ff7b7b;
}

.red-flags h3 {
  color: #cc0000;
}
.card-face--back .red-flags h3 {
  color: #ff8a8a;
}

.card-footer {
  text-align: center;
  font-size: 0.9em;
  color: #888;
}
.card-face--back .card-footer {
  color: #ccc;
}

.share-quote {
    font-weight: bold;
}


/* Responsive Design */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }

  .main-nav.active {
    display: block;
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
  }

  .main-nav li {
    margin: 0;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
  }

  .main-nav a {
    display: block;
    padding: 15px;
  }

  .hamburger-menu {
    display: flex;
  }
  
  .hamburger-menu.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
  }
  .hamburger-menu.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger-menu.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
  }

  .numbers-display {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
