/* Reset and Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.6;
  background: radial-gradient(ellipse at bottom, #1b2735, #090a0f);
  color: #fff;
  position: relative;
  overflow-x: hidden;
}

/* Starry Background */
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 200%;
  height: 200%;
  background: transparent url("https://s3-us-west-2.amazonaws.com/s.cdpn.io/1231630/stars.png") repeat;
  animation: moveStars 50s linear infinite;
  z-index: -3;
}

@keyframes moveStars {
  from { background-position: 0 0; }
  to { background-position: -1000px 500px; }
}

/* Navigation & Header */
header {
  background: linear-gradient(135deg, #2c3e50, #4ca1af);
  padding-bottom: 60px;
  text-align: center;
  position: relative;
  z-index: 1;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 50px;
}

nav .logo h1 {
  font-family: 'Fredoka One', cursive;
  font-size: 2em;
}

nav ul {
  list-style: none;
  display: flex;
}

nav ul li {
  margin-left: 20px;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: #a8e6cf;
}

/* Hero Section */
.hero {
  margin-top: 50px;
}

.hero h2 {
  font-size: 3em;
  margin-bottom: 20px;
  font-family: 'Fredoka One', cursive;
}

.hero p {
  font-size: 1.4em;
  margin-bottom: 30px;
}

.cta-button {
  background-color: #a8e6cf;
  color: #2c3e50;
  padding: 15px 30px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: #80cbc4;
}

/* Container */
.container {
  width: 85%;
  margin: auto;
  padding: 40px 0;
  position: relative;
  z-index: 1;
}

/* Section Styles */
section {
  padding: 60px 0;
}

.light-bg {
  background-color: rgba(22, 36, 71, 0.8);
}

.dark-bg {
  background-color: #0f3460;
}

/* Section Headings */
h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 2.5em;
  font-family: 'Fredoka One', cursive;
}

/* Research Cards */
.research-cards {
  display: flex;
  justify-content: space-around;
  margin-top: 20px;
  flex-wrap: wrap;
}

.card {
  background-color: #1f4068;
  border-radius: 15px;
  padding: 20px;
  margin: 10px;
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  text-align: center;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-10px);
}

/* Services List */
.services-list {
  list-style-type: none;
  font-size: 1.2em;
}

.services-list li {
  margin-bottom: 20px;
  padding: 15px;
  background: #1f4068;
  border-left: 6px solid #a8e6cf;
  border-radius: 8px;
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: auto;
}

form input,
form textarea {
  padding: 15px;
  margin-bottom: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1em;
}

form button {
  padding: 15px;
  border: none;
  border-radius: 50px;
  background: #a8e6cf;
  color: #2c3e50;
  font-size: 1.1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form button:hover {
  background: #80cbc4;
}

/* Footer Styles */
footer {
  text-align: center;
  padding: 20px 0;
  background: #0f3460;
  color: #fff;
  position: relative;
  z-index: 1;
}

/* Celestial Elements */
.planet {
  position: fixed;
  top: 10%;
  left: 5%;
  width: 80px;
  height: 80px;
  background: radial-gradient(circle, #f39c12, #d35400);
  border-radius: 50%;
  box-shadow: 0 0 15px rgba(243,156,18,0.8);
  z-index: 10000;
}

.comet {
  position: fixed;
  top: -50px;
  left: 110%;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 8px #fff;
  z-index: 10000;
  animation: flyComet 10s linear infinite;
}

@keyframes flyComet {
  0% { top: -50px; left: 110%; opacity: 0; }
  10% { opacity: 1; }
  50% { top: 50%; left: 50%; opacity: 1; }
  90% { opacity: 1; }
  100% { top: 110%; left: -10%; opacity: 0; }
}

/* Rocket Button (Blast Off) Styles */
.rocket {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 160px;
  display: block;
  z-index: 10000;
  cursor: pointer;
}

/* Rocket Body */
.rocket-body {
  width: 100%;
  height: 70%;
  background: #ccc;
  border-radius: 40px 40px 10px 10px;
  position: relative;
}

/* Rocket Fins */
.rocket-fin {
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
}

.rocket-fin-left {
  left: -15px;
  border-width: 0 15px 20px 0;
  border-color: transparent #ccc transparent transparent;
}

.rocket-fin-right {
  right: -15px;
  border-width: 0 0 20px 15px;
  border-color: transparent transparent transparent #ccc;
}

/* Rocket Window */
.rocket-window {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 20px;
  background: #66f;
  border-radius: 50%;
}

/* Blue Flame Element */
.flame {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 30px;
  opacity: 0;
}

.flame-active {
  opacity: 1;
  background: radial-gradient(ellipse at center, #00f, #0099ff);
  border-radius: 50% 50% 40% 40%;
  animation: flameFlicker 0.5s infinite;
}

@keyframes flameFlicker {
  0% { transform: translateX(-50%) scaleY(1); opacity: 1; }
  50% { transform: translateX(-50%) scaleY(1.2); opacity: 0.8; }
  100% { transform: translateX(-50%) scaleY(1); opacity: 1; }
}

/* Rocket Launch Animation */
@keyframes rocketLaunch {
  0% { transform: translateX(-50%) translateY(0); }
  100% { transform: translateX(-50%) translateY(-150vh); }
}

.launch {
  animation: rocketLaunch 4s forwards;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
  }
  
  nav ul {
    flex-direction: column;
    margin-top: 10px;
  }
  
  nav ul li {
    margin: 10px 0;
  }
  
  .research-cards {
    flex-direction: column;
    align-items: center;
  }
}
