:root {
  --primary: #6e44ff;
  --secondary: #a18cff;
  --accent: #31e3cb;
  --neon: #9b7cff;
  --background-start: #f0f4ff;
  --background-end: #e6e9ff;
  --white: #ffffff;
  --text: #4a4a68;
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(182, 149, 255, 0.3);
  --glass-shadow: rgba(106, 68, 255, 0.15);
  --input-bg: rgba(255, 255, 255, 0.5);
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, var(--background-start), var(--background-end));
  color: var(--text);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 100vh;
  perspective: 1000px;
}

/* Stars Background */
.stars-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.stars {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(2px 2px at 20px 30px, var(--secondary), transparent),
    radial-gradient(2px 2px at 40px 70px, var(--primary), transparent),
    radial-gradient(1px 1px at 90px 40px, var(--accent), transparent),
    radial-gradient(1px 1px at 120px 180px, var(--neon), transparent),
    radial-gradient(1px 1px at 180px 100px, var(--secondary), transparent),
    radial-gradient(2px 2px at 220px 230px, var(--primary), transparent),
    radial-gradient(1px 1px at 250px 180px, var(--accent), transparent);
  background-repeat: repeat;
  background-size: 500px 500px;
  animation: stars-move 100s linear infinite;
  opacity: 0.4;
}

@keyframes stars-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 500px 500px;
  }
}

/* Floating Shapes */
.floating-shapes {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  will-change: transform;
}

.shape-1 {
  width: 120px;
  height: 120px;
  background: linear-gradient(45deg, rgba(155, 124, 255, 0.4), rgba(49, 227, 203, 0.3));
  top: 15%;
  left: 15%;
  animation: float 20s ease-in-out infinite;
}

.shape-2 {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, rgba(110, 68, 255, 0.3), rgba(161, 140, 255, 0.2));
  top: 25%;
  right: 20%;
  animation: float 25s ease-in-out infinite reverse;
}

.shape-3 {
  width: 150px;
  height: 150px;
  background: linear-gradient(225deg, rgba(49, 227, 203, 0.2), rgba(155, 124, 255, 0.1));
  bottom: 20%;
  right: 10%;
  animation: float 22s ease-in-out infinite 2s;
}

.shape-4 {
  width: 100px;
  height: 100px;
  background: linear-gradient(315deg, rgba(161, 140, 255, 0.3), rgba(110, 68, 255, 0.2));
  bottom: 15%;
  left: 25%;
  animation: float 18s ease-in-out infinite 1s;
}

.shape-5 {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, rgba(49, 227, 203, 0.3), rgba(110, 68, 255, 0.2));
  top: 50%;
  left: 5%;
  animation: float 15s ease-in-out infinite 3s;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-20px) rotate(5deg) scale(1.05);
  }
  50% {
    transform: translateY(10px) rotate(-2deg) scale(0.95);
  }
  75% {
    transform: translateY(-15px) rotate(3deg) scale(1.02);
  }
  100% {
    transform: translateY(0) rotate(0deg) scale(1);
  }
}

/* Main Container */
.container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  margin: 3rem 0;
}

/* Glassmorphism Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 8px 32px var(--glass-shadow);
  padding: 40px;
  width: 100%;
  max-width: 550px;
  text-align: center;
  position: relative;
  overflow: hidden;
  animation: card-appear 1s ease-out;
  will-change: transform, opacity;
}

@keyframes card-appear {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Logo */
.logo-container {
  position: relative;
  margin-bottom: 20px;
  animation: logo-float 6s ease-in-out infinite;
}

.logo {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 4px 10px rgba(110, 68, 255, 0.3));
}

@keyframes logo-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Text Content */
.headline {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  background: linear-gradient(45deg, var(--primary), var(--neon));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: text-appear 1.2s ease-out;
}

.subheadline {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 30px;
  animation: text-appear 1.2s ease-out 0.2s both;
}

@keyframes text-appear {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contact Form */
.contact-form {
  margin-bottom: 30px;
  width: 100%;
}

.input-container {
  position: relative;
  margin-bottom: 20px;
  width: 100%;
  animation: input-appear 0.8s ease-out both;
  animation-delay: calc(var(--i, 0) * 0.1s + 0.5s);
}

.input-container:nth-child(1) { --i: 1; }
.input-container:nth-child(2) { --i: 2; }
.input-container:nth-child(3) { --i: 3; }
.input-container:nth-child(4) { --i: 4; }

@keyframes input-appear {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

.input-container input,
.input-container textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  background: var(--input-bg);
  backdrop-filter: blur(5px);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  transition: all 0.3s;
}

.input-container textarea {
  resize: none;
  height: 120px;
}

.input-container label {
  position: absolute;
  left: 15px;
  top: 15px;
  color: var(--text);
  font-size: 1rem;
  transition: all 0.3s;
  pointer-events: none;
}

.input-container input:focus,
.input-container textarea:focus,
.input-container input:valid,
.input-container textarea:valid {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(110, 68, 255, 0.1);
  outline: none;
}

.input-container input:focus ~ label,
.input-container textarea:focus ~ label,
.input-container input:valid ~ label,
.input-container textarea:valid ~ label {
  top: -10px;
  left: 15px;
  font-size: 0.8rem;
  background: linear-gradient(45deg, var(--primary), var(--neon));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 0 5px;
}

.submit-btn {
  background: linear-gradient(45deg, var(--neon), var(--primary));
  color: white;
  border: none;
  border-radius: 12px;
  padding: 15px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(110, 68, 255, 0.3);
  width: 100%;
  margin-top: 10px;
  position: relative;
  overflow: hidden;
  animation: input-appear 0.8s ease-out 0.9s both;
}

.submit-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(110, 68, 255, 0.4);
}

.submit-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(110, 68, 255, 0.3);
}

.submit-btn::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -60%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  transform: rotate(30deg);
  transition: transform 0.7s;
}

.submit-btn:hover::after {
  transform: translateX(100%) rotate(30deg);
}

/* Contact Info */
.contact-info {
  margin-top: 20px;
}

.contact-info p {
  margin-bottom: 10px;
  animation: fade-in 1s ease-out 1.2s both;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s;
}

.contact-info a:hover {
  color: var(--neon);
}

.contact-info i {
  margin-right: 8px;
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Social Media Constellation */
.social-constellation {
  position: absolute;
  width: 650px;
  height: 650px;
  pointer-events: none;
  animation: constellation-appear 1.5s ease-out forwards;
}

@keyframes constellation-appear {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.social-icon {
  position: absolute;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  color: var(--primary);
  transition: all 0.3s;
  box-shadow: 0 5px 15px rgba(106, 68, 255, 0.2);
  pointer-events: auto;
  animation: orbit 40s linear infinite;
  will-change: transform;
}

.social-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(110, 68, 255, 0.5),
    rgba(110, 68, 255, 0) 70%
  );
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.social-icon:hover {
  transform: scale(1.15);
  color: var(--white);
  background: var(--primary);
}

.social-icon:hover::before {
  opacity: 1;
}

.instagram {
  top: 50%;
  left: 0;
  transform: translateX(-100%) translateY(-50%);
  animation-delay: 0s;
}

.facebook {
  top: 20%;
  right: 0;
  transform: translateX(100%) translateY(-50%);
  animation-delay: -10s;
}

.email {
  bottom: 20%;
  right: 0;
  transform: translateX(100%) translateY(-50%);
  animation-delay: -20s;
}

.phone {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  animation-delay: -30s;
}

@keyframes orbit {
  0% {
    transform: rotate(0deg) translateX(300px) rotate(0deg);
  }
  100% {
    transform: rotate(360deg) translateX(300px) rotate(-360deg);
  }
}

/* Cursor Follower */
.cursor-follower {
  position: fixed;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(
    circle at center,
    rgba(110, 68, 255, 0.5),
    rgba(110, 68, 255, 0) 70%
  );
  pointer-events: none;
  transform: translate(-50%, -50%);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
  will-change: transform, width, height;
}

/* Responsive */
@media (max-width: 768px) {
  .glass-card {
    padding: 30px 20px;
  }
  
  .headline {
    font-size: 2rem;
  }
  
  .subheadline {
    font-size: 1rem;
  }
  
  .social-constellation {
    width: 100%;
    height: auto;
    position: relative;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
  }
  
  .social-icon {
    position: static;
    animation: none;
    transform: none !important;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
  }
  
  .social-icon:hover {
    transform: scale(1.15) !important;
  }
}

@media (max-width: 480px) {
  .glass-card {
    padding: 25px 15px;
  }
  
  .headline {
    font-size: 1.8rem;
  }
  
  .logo {
    max-width: 150px;
  }
  
  .input-container input,
  .input-container textarea {
    padding: 12px;
  }
  
  .input-container label {
    font-size: 0.9rem;
  }
  
  .submit-btn {
    padding: 12px 20px;
  }
  
  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1rem;
  }
}
