/* ===============================
   CONTACT PAGE BASE STYLES
   =============================== */

/* Background section */
#contact-bg {
  background: url('../contact.jpg') center/cover no-repeat;
  background-attachment: fixed;
  min-height: 80vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Centered Contact title */
#contact-ptext {
  position: relative;
  top: -375px;
  text-align: center;
  z-index: 2;
}

/* Contact form area */
.contact-section {
  background: #282e34;
  padding: 80px 20px;
  color: #f2f0eb;
  text-align: center;
}

.contact-container {
  max-width: 700px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  padding: 40px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.contact-container h2 {
  margin-bottom: 15px;
  font-weight: 400;
}

.contact-container p {
  font-family: monospace;
  margin-bottom: 40px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  background: #111;
  border: none;
  outline: none;
  border-radius: 8px;
  color: #f2f0eb;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-family: monospace;
  transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: #000;
  box-shadow: 0 0 8px #f2f0eb;
}

#half-life2 {
  position: relative;
  top: -325px;
  text-align: center;
}

.send-btn {
  background: linear-gradient(to right, #008080, #282e34);
  color: #f2f0eb;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-family: monospace;
  transition: all 0.3s ease;
}

.send-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 12px #f2f0eb;
}

#tourney-3rd-bg {
  background: #181b1f;
  color: #f2f0eb;
}

/* ===============================
   THANK YOU POPUP STYLES
   =============================== */
.thank-you-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: rgba(20, 20, 20, 0.95);
  color: #f2f0eb;
  padding: 40px 60px;
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
}

.thank-you-popup h2 {
  font-weight: 100;
}

.thank-you-popup.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.thank-you-popup button {
  margin-top: 20px;
  padding: 10px 25px;
  background: linear-gradient(to right, #008080, #282e34);
  border: none;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.thank-you-popup button:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 12px #008080;
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

/* Tablets and smaller laptops */
@media (max-width: 992px) {
  #contact-bg {
    background-attachment: scroll;
    min-height: 65vh;
  }

  #contact-ptext {
    top: -250px;
  }

  #half-life2 {
    top: -200px;
  }

  .contact-container {
    max-width: 600px;
    padding: 30px;
  }

  .thank-you-popup {
    width: 80%;
    padding: 30px 40px;
  }
}

/* Tablets / Mobile Landscape */
@media (max-width: 768px) {
  #contact-bg {
    background-position: center;
    min-height: 60vh;
  }

  #contact-ptext .border {
    font-size: 1.8rem;
    padding: 10px 18px;
  }

  #half-life2 {
    top: -150px;
  }

  #half-life2 .border {
    font-size: 1.4rem;
    line-height: 1.3;
  }

  .contact-container {
    max-width: 90%;
    padding: 25px;
  }

  .send-btn {
    width: 100%;
  }

  .thank-you-popup {
    width: 90%;
    padding: 25px;
  }
}

/* Small phones (iPhone SE → iPhone 14 Pro Max) */
@media (max-width: 480px) {
  #contact-bg {
    background: url('../contact.jpg') center/cover no-repeat;
    background-attachment: scroll;
    min-height: 55vh;
  }

  #contact-ptext {
    top: -180px;
  }

  #contact-ptext .border {
    font-size: 1.5rem;
    letter-spacing: 2px;
    padding: 10px 14px;
    display: inline-block;
  }

  #half-life2 {
    top: -330px;
  }

  #half-life2 .border {
    font-size: 1.2rem;
    line-height: 1.2;
    white-space: pre-line;
  }

  .contact-container {
    width: 90%;
    padding: 20px;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
  }

  .thank-you-popup {
    width: 92%;
    padding: 20px;
  }

  .thank-you-popup h2 {
    font-size: 1.2rem;
  }

  .thank-you-popup p {
    font-size: 0.95rem;
  }

  .thank-you-popup button {
    padding: 8px 18px;
  }
}
