@tailwind base;
@tailwind components;
@tailwind utilities;

/* 🌌 Background */
body {
  background: radial-gradient(ellipse at center, #001f3f 0%, #000814 100%);
  color: #F1F2F2;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* 🌌 Starfield container */
#stars-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: -2;
}

/* ✨ Sparkles overlay */
#stars-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("https://www.transparenttextures.com/patterns/stardust.png");
  background-size: 300px 300px;
  opacity: 0.05;
  z-index: -1;
}

/* ✨ Tiny twinkling stars */
.twinkle-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(241, 242, 242, 0.9);
  border-radius: 999px;
  box-shadow: 0 0 4px rgba(118, 191, 77, 0.7);
  opacity: 0.25;
  animation: twinkle 3.5s ease-in-out infinite;
}

@keyframes twinkle {
  0%, 100% {
    opacity: 0.15;
    transform: scale(0.7);
  }
  50% {
    opacity: 0.95;
    transform: scale(1.5);
  }
}

/* 🌠 Base shooting star / comet */
.shooting-star {
  position: absolute;
  height: 3px;
  border-radius: 999px;
  filter:
    blur(0.5px)
    drop-shadow(0 0 6px #76BF4D)
    drop-shadow(0 0 14px #003A62aa);
  opacity: 0;
  animation-timing-function: cubic-bezier(.3, .1, .6, 1);
  animation-iteration-count: infinite;
}

/* ⭐ Small shooting star */
.shooting-star--small {
  width: 120px;
  background: linear-gradient(
    90deg,
    #F1F2F2,
    #76BF4D,
    rgba(0, 58, 98, 0)
  );
  animation-name: smallShoot;
}

/* ☄️ Comet */
.shooting-star--comet {
  width: 260px;
  background: linear-gradient(
    90deg,
    #F1F2F2,
    #76BF4D,
    #003A62,
    rgba(0, 58, 98, 0)
  );
  animation-name: cometShoot;
}

/* 🚀 Animations */
@keyframes smallShoot {
  0% {
    transform: translate3d(-20vw, -10vh, 0) rotate(28deg) scale(0.7);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate3d(120vw, 70vh, 0) rotate(28deg) scale(1);
    opacity: 0;
  }
}

@keyframes cometShoot {
  0% {
    transform: translate3d(-30vw, -20vh, 0) rotate(32deg) scale(0.6);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  100% {
    transform: translate3d(130vw, 90vh, 0) rotate(32deg) scale(1.1);
    opacity: 0;
  }
}

/* 🪟 Auth card */
.auth-card {
  background: rgba(0, 58, 98, 0.22);
  padding: 40px;
  border-radius: 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 0 30px rgba(118, 191, 77, 0.18);
  width: 100%;
  max-width: 400px;
  border: 1px solid rgba(241, 242, 242, 0.08);
  text-align: center;
}

/* 🔐 Icon */
.login-icon {
  font-size: 2.5rem;
  color: #FFD92B;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 6px #FFD92Baa);
  animation: pulse 2.5s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.09); }
}

/* 🧊 Inputs */
.input-group {
  position: relative;
  margin-bottom: 16px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border-radius: 10px;
  background: rgba(241, 242, 242, 0.04);
  border: 1px solid rgba(241, 242, 242, 0.14);
  color: #F1F2F2;
  transition: 0.3s ease;
  font-size: 15px;
}

.input-group input:focus {
  outline: none;
  background: rgba(241, 242, 242, 0.08);
  box-shadow: 0 0 12px #003A62aa;
  border-color: #003A62;
}

/* 👤 Input icons */
.input-group::before {
  content: "👤";
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #76BF4D;
}

.input-group:nth-child(2)::before {
  content: "🔒";
}

/* 🌟 Button */
.auth-btn {
  background: linear-gradient(to right, #003A62, #76BF4D);
  color: #F1F2F2;
  font-weight: 600;
  padding: 12px;
  border-radius: 10px;
  width: 100%;
  border: none;
  box-shadow: 0 0 10px #76BF4D88;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 0 16px #FFD92Baa;
  background: linear-gradient(to right, #003A62, #FFD92B);
}

/* ✍️ Signup link text */
.auth-card p {
  margin-top: 16px;
  font-size: 14px;
  color: #ddd;
}

.auth-card a {
  color: #FFD92B;
  font-weight: 600;
}

.auth-card a:hover {
  text-decoration: underline;
}

/* ✨ 8-Point Star / Meteor burst — updated colors */
.meteor-burst {
  position: absolute;
  width: 40px;
  height: 40px;
  transform: translate(-50%, -50%) scale(0.2) rotate(25deg);
  opacity: 0;
  animation: starBloom 2s ease-in-out forwards;
  pointer-events: none;
}

/* 8-point tapered rays */
.meteor-burst::before,
.meteor-burst::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 50%;
}

/* main cross */
.meteor-burst::before {
  background-image:
    linear-gradient(
      90deg,
      rgba(118,191,77,0),
      #F1F2F2,
      #76BF4D,
      #003A62,
      #76BF4D,
      #F1F2F2,
      rgba(0,58,98,0)
    ),
    linear-gradient(
      0deg,
      rgba(118,191,77,0),
      #F1F2F2,
      #76BF4D,
      #003A62,
      #76BF4D,
      #F1F2F2,
      rgba(0,58,98,0)
    );
  background-size:
    100% 3px,
    3px 100%;
  filter:
    blur(0.4px)
    drop-shadow(0 0 6px #76BF4D)
    drop-shadow(0 0 14px #003A62);
}

/* diagonal rays */
.meteor-burst::after {
  background-image:
    linear-gradient(
      45deg,
      rgba(118,191,77,0),
      #F1F2F2,
      #76BF4D,
      #003A62,
      #76BF4D,
      #F1F2F2,
      rgba(0,58,98,0)
    ),
    linear-gradient(
      135deg,
      rgba(118,191,77,0),
      #F1F2F2,
      #76BF4D,
      #003A62,
      #76BF4D,
      #F1F2F2,
      rgba(0,58,98,0)
    );
  background-size:
    100% 2px,
    100% 2px;
  transform: scale(0.85);
  filter:
    blur(0.6px)
    drop-shadow(0 0 4px #003A62)
    drop-shadow(0 0 10px rgba(0,58,98,0.7));
}

/* 🌟 Star bloom animation */
@keyframes starBloom {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.2);
  }
  35% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  65% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(1.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
  }
}

/* 🪨 Little meteorites */
.meteorite {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: radial-gradient(
    circle,
    #F1F2F2 0%,
    #76BF4D 40%,
    #003A62 80%
  );
  box-shadow:
    0 0 4px #76BF4D,
    0 0 8px #003A62aa;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4);
  animation: meteoriteFade 1.4s ease-out forwards;
}

@keyframes meteoriteFade {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.4);
  }
  30% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.2);
  }
}