/* ==========================
   GLOBAL STYLES
========================== */
body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  color: #E9F3FF;
  background: radial-gradient(circle at top left, #050B14, #0b1a2a);
  overflow-x: hidden;
  position: relative;
}

/* Shimmer grid */
body::before {
  content: "";
  position: fixed;
  top:0; left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  background: 
    radial-gradient(circle, rgba(0,212,255,0.08) 2px, transparent 2px),
    radial-gradient(circle, rgba(143,87,255,0.06) 2px, transparent 2px);
  background-size: 30px 30px, 50px 50px;
  animation: shimmer 20s linear infinite;
  z-index: 0;
}

@keyframes shimmer {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 100px 100px, -50px -50px; }
}

/* Particles */
.particles {
  position: fixed;
  top:0; left:0;
  width:100%;
  height:100%;
  pointer-events:none;
  background: transparent;
  z-index: 0;
}

.particles::after {
  content: "";
  position: absolute;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: moveParticles 60s linear infinite;
}

@keyframes moveParticles {
  0% { transform: translate(0,0); }
  100% { transform: translate(-50px,-50px); }
}

/* Ensure content is above particles */
body * {
  position: relative;
  z-index: 1;
}

a { text-decoration: none; color: inherit; }

.section {
  padding: 80px 5%;
  position: relative;
}

.section h2 {
  font-size: 42px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 60px;
  background: linear-gradient(90deg, #84d5ff, #d0b3ff);
  -webkit-background-clip: text;
  color: transparent;
}

/* ==========================
   HERO / HEADER
========================== */
.contact-hero {
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  background: radial-gradient(circle at 50% 20%, rgba(0,168,255,0.15), transparent 60%);
  position: relative;
}

.contact-hero h1 {
  font-size: 60px;
  font-weight: 800;
  background: linear-gradient(120deg, #00eaff, #8e5bff);
  -webkit-background-clip: text;
  color: transparent;
}

.contact-hero p {
  font-size: 18px;
  color: #bcdcff;
  margin-top: 20px;
  max-width: 700px;
}

/* ==========================
   CONTACT FORM
========================== */
.contact-form-container {
  max-width: 700px;
  margin: -60px auto 100px;
  background: rgba(255,255,255,0.05);
  padding: 50px 40px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,190,255,0.15);
}

.contact-form-container h3 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 24px;
  text-align: center;
}

.contact-form-container p {
  text-align: center;
  opacity: 0.8;
  margin-bottom: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px 18px;
  font-size: 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #fff;
  outline: none;
  transition: 0.25s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #00eaff;
  background: rgba(0,234,255,0.05);
}

.contact-form textarea {
  min-height: 120px;
  resize: none;
}

.contact-form button {
  padding: 14px 36px;
  font-size: 18px;
  font-weight: 600;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #00eaff, #8f57ff);
  color: #fff;
  cursor: pointer;
  transition: 0.25s;
}

.contact-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,183,255,0.4);
}

/* ==========================
   SUCCESS MESSAGE
========================== */
.form-success {
  text-align: center;
  margin-top: 20px;
  font-size: 18px;
  color: #00eaff;
  opacity: 0;
  transition: 0.5s;
}

/* ==========================
   ICONS ANIMATION
========================== */
.fas {
  transition: transform 0.3s ease, color 0.3s ease;
}

.fas:hover {
  transform: scale(1.3) rotate(10deg);
  color: #00eaff;
}

/* ==========================
   RESPONSIVE
========================== */
@media(max-width: 800px) {
  .contact-hero h1 {
    font-size: 46px;
  }
  .contact-form-container {
    padding: 40px 20px;
    margin: -40px 10px 60px;
  }
}

/* Popup Overlay */
/* ==========================
   MODERN SUCCESS POPUP
========================== */
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(6px);
  z-index: 9999;
  animation: fadeInOverlay 0.3s ease forwards;
}

.popup-box {
  background: linear-gradient(135deg, #00eaff, #8f57ff);
  padding: 30px 25px;
  border-radius: 18px;
  max-width: 350px;
  width: 90%;
  text-align: center;
  color: #fff;
  box-shadow: 0 12px 28px rgba(0,0,0,0.25);
  transform: scale(0.7);
  opacity: 0;
  animation: popupScale 0.35s ease forwards;
}

.popup-icon {
  font-size: 50px;
  margin-bottom: 15px;
  animation: iconBounce 0.6s ease forwards;
}

.popup-box h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.popup-box p {
  font-size: 16px;
  margin-bottom: 20px;
}

.popup-btn {
  background: #fff;
  color: #8f57ff;
  border: none;
  border-radius: 12px;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  transition: 0.3s;
}

.popup-btn:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

/* Animations */
@keyframes popupScale {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes iconBounce {
  0% { transform: translateY(-20px); opacity: 0; }
  60% { transform: translateY(5px); opacity: 1; }
  100% { transform: translateY(0); }
}

#message {
  color: #aaa; /* 默认文字颜色，灰色 */
}

#message.user-typed {
  color: #fff; /* 用户输入后变白色 */
}
