/* --- MAGICAL LOADER CONTAINER --- */
#magical-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, #0b0b16 40%, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 1s ease, visibility 1s ease;
  overflow: hidden;
}
.portal-container {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* --- PORTAL RING ANIMATION --- */
.portal-ring {
  position: absolute;
  width: 130px;
  height: 130px;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top: 3px solid #c084fc;
  border-bottom: 3px solid #7e22ce;
  border-radius: 50%;
  animation: rotate 2.8s linear infinite, pulse 2s ease-in-out infinite alternate;
  box-shadow: 0 0 30px 5px rgba(147, 51, 234, 0.3);
}

/* --- FLOATING GLOW ORB --- */
.glow-orb {
  position: absolute;
  width: 25px;
  height: 25px;
  background: radial-gradient(circle, #d8b4fe, #7e22ce);
  border-radius: 50%;
  animation: float 3s ease-in-out infinite alternate, shimmer 4s linear infinite;
  box-shadow: 0 0 20px 6px rgba(192, 132, 252, 0.6);
}

/* --- PORTAL LOGO --- */
.portal-logo {
  width: 125px;
  opacity: 0;
  filter: drop-shadow(0 0 10px #c084fc);
  animation: logoFadeIn 3s ease forwards 1.2s;
  z-index: 10;
}


/* --- MAGIC TEXT --- */
.magic-text {
  position: absolute;
  bottom: 10%;
  color: #f3e8ff;
  font-family: 'Poppins', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  letter-spacing: 3px;
  text-shadow: 0 0 10px #c084fc, 0 0 20px #7e22ce;
}


/* --- ANIMATIONS --- */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 20px 2px rgba(192,132,252,0.3); }
  100% { transform: scale(1.2); box-shadow: 0 0 40px 6px rgba(192,132,252,0.6); }
}

@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-25px); }
}

@keyframes shimmer {
  0% { opacity: 0.7; }
  50% { opacity: 1; }
  100% { opacity: 0.7; }
}

@keyframes logoFadeIn {
  0% { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.3); }
}

/* --- FADE OUT --- */
.fade-out {
  opacity: 0;
  visibility: hidden;
}

.magical-corner {
  background: radial-gradient(circle at top left, #ffffff, #f6f6f6);
  color: #222;
  text-align: center;
  padding: 100px 0;
  overflow: hidden;
  position: relative;
}

.magical-corner::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(160,55,33,0.3), transparent);
  filter: blur(100px);
  animation: float 10s ease-in-out infinite alternate;
}

@keyframes float {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.title {
  font-size: 3em;
  color: #a03721;
  margin-bottom: 20px;
  text-shadow: 0 0 10px rgba(160,55,33,0.4);
}

.subtitle {
  color: #666;
  margin-bottom: 60px;
}

.magic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  justify-items: center;
}

.magic-card {
  background: rgba(255,255,255,0.7);
  border-radius: 20px;
  padding: 40px 20px;
  box-shadow: 0 5px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px);
  transition: all 0.4s ease;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}

.magic-card::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(160,55,33,0.25), transparent);
  transform: scale(0);
  transition: transform 0.6s ease;
}

.magic-card:hover::after {
  transform: scale(1);
}

.magic-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 40px rgba(160,55,33,0.3);
}
/* Footer Alignment Fix */
/* Footer */
    footer {
      text-align: center;
      padding: 20px 0;
      margin-top: 80px;
      background: #fff;
      color: #555;
      position: sticky;
      bottom: 0;
    }

    footer .btn {
      display: inline-block;
      background: #a03721;
      color: #fff;
      padding: 10px 20px;
      border-radius: 30px;
      text-decoration: none;
      font-size: 0.9em;
      transition: background 0.3s ease;
      margin-bottom: 10px;
    }

    footer .btn:hover {
      background: #842c19;
    }

    footer span {
      color: #a03721;
      font-weight: 600;
    }

    /* Optional Sparkles */
    #particles span {
      position: absolute;
      width: 5px;
      height: 5px;
      background: radial-gradient(circle, #a03721, transparent);
      border-radius: 50%;
      animation: float 10s linear infinite;
      opacity: 0.4;
    }

    @keyframes float {
      0% { transform: translateY(0) translateX(0); }
      50% { transform: translateY(-20px) translateX(10px); }
      100% { transform: translateY(0) translateX(0); }
    }
