/* ----- Import Fonts ----- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

/* ----- Global Styles ----- */
body {
  font-family: 'Orbitron', sans-serif;
  background: linear-gradient(to bottom right, #0f0c29, #302b63, #24243e);
  color: #ffffff;
  padding: 30px;
  line-height: 1.6;
}

h2 {
  text-align: center;
  color: #00ffff;
  font-family: 'Press Start 2P', cursive;
  animation: pulseText 2s infinite ease-in-out;
}

/* ----- Typography & Text Effects ----- */
#title {
  text-align: center;
  color: #00cccc;
  border: none;
  text-shadow: 0px 0px 5px #ff00cc, 0px 0px 10px #ff00cc, 0px 5px 15px #ff00cc;
  position: relative;
  padding-bottom: 10px;
  font-family: 'Press Start 2P', cursive;
  display: block;
  width: fit-content;
  margin: 0 auto;
  animation: pulseText 2s infinite ease-in-out;
}

#title::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -30px;
  height: 20px;
  width: 100%;
  background: linear-gradient(to top, rgba(255, 105, 180, 0.3), rgba(225, 105, 180, 0));
  box-shadow: 0 5px 15px rgba(0, 204, 204, 0.3);
  border-radius: 50%;
  z-index: -1;
  animation: pulseGlow 2s infinite ease-in-out;
}

/* ----- Keyframe Animations ----- */
@keyframes pulseText {
  0%, 100% {
    color: #00cccc;
    text-shadow: 0px 0px 5px #ff00cc, 0px 0px 10px #ff00cc, 0px 5px 15px #ff00cc;
  }
  50% {
    color: #33ffff;
    text-shadow: 0px 0px 15px #33ffff, 0px 0px 25px #33ffff, 0px 5px 35px #ff00cc;
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.3), 0 5px 15px rgba(255, 0, 204, 0.3);
    opacity: 0.7;
  }
  50% {
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.6), 0 10px 30px rgba(255, 0, 204, 0.6);
    opacity: 1;
  }
}

/* ----- Form & Layout ----- */
.form-wrapper {
  max-width: 800px;
  margin: auto;
}

form {
  max-width: 800px;
  margin: auto;
  padding: 25px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 30px;
  box-shadow: 0 0 20px #00ffff;
  animation: pulseGlow 2s infinite ease-in-out;
}

fieldset {
  border: 2px solid #00ffff;
  border-radius: 15px;
  margin-bottom: 20px;
  padding: 20px;
}

legend {
  text-align: center;
  padding: 0 10px;
  font-weight: bold;
  color: #00ffff;
}

/* ----- Personal Details Section ----- */
#personal-details {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

#personal-details > div {
  flex: 1 1 calc(33.333% - 20px);
}

@media (max-width: 600px) {
  #personal-details {
    flex-direction: column;
    gap: 15px;
  }
  #personal-details > div {
    width: 100%;
  }
}

/* ----- Input & Select Styles ----- */
input[type="text"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  margin-bottom: 20px;
  box-sizing: border-box;
  font-size: 16px;
  background-color: #222;
  color: #fff;
  resize: vertical;
  min-height: 10px;
}

/* ----- Glow Effects ----- */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: none;
  box-shadow: 0 0 8px 2px rgba(255, 0, 204, 0.8);
  border-color: #ff00cc;
}

textarea:not(:placeholder-shown):valid,
input[type="text"]:not(:placeholder-shown):valid,
input[type="email"]:not(:placeholder-shown):valid,
input[type="number"]:not(:placeholder-shown):valid {
  box-shadow: 0 0 8px 2px rgba(255, 0, 204, 0.8);
  border-color: #ff00cc;
}

textarea:not(:placeholder-shown):focus,
input[type="text"]:not(:placeholder-shown):focus,
input[type="email"]:not(:placeholder-shown):focus,
input[type="number"]:not(:placeholder-shown):focus,
select:focus {
  box-shadow: 0 0 8px 2px rgba(255, 0, 204, 0.8);
  border-color: #ff00cc;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
select:hover,
textarea:hover {
  border-color: #ff00cc;
  box-shadow: 0 0 8px 2px rgba(255, 0, 204, 0.6);
}

/* ----- Dropdown Styles ----- */
select#dropdown:focus,
select#dropdown:valid {
  outline: none;
  box-shadow: 0 0 8px 2px rgba(255, 0, 204, 0.8);
  border-color: #ff00cc;
}

select#dropdown {
  background-color: #222;
  color: #fff;
  font-size: 16px;
  border: 2px solid #444;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

select#dropdown option {
  background-color: #222;
  color: #fff;
}

select#dropdown:hover {
  border-color: #ff00cc;
  box-shadow: 0 0 8px 2px rgba(255, 0, 204, 0.6);
}

/* ----- Checkbox & Radio Button Styles ----- */
input[type="radio"],
input[type="checkbox"] {
  display: inline-block;
  vertical-align: middle;
}

.checkbox-group div,
.radio-group div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}

input[type="radio"]:checked + label,
input[type="checkbox"]:checked + label {
  color: #ff00cc;
  text-shadow: 0 0 5px #ff00cc;
}

/* ----- Button Styles ----- */
button[type="submit"] {
  background-color: #00ffff;
  color: #000;
  padding: 12px 25px;
  font-size: 18px;
  font-family: 'Press Start 2P', cursive;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  display: block;
  margin: 30px auto 0;
  animation: pulseGlow 2s infinite ease-in-out;
}

button[type="submit"]:hover {
  background-color: #00cccc;
  box-shadow: 0 0 12px #00cccc;
}

/* ----- Horizontal Line Styles ----- */
hr.top-line,
hr.bottom-line {
  width: 100%;
  height: 3px;
  background: rgba(131, 34, 115, 0.1);
  border: none;
  border-radius: 50%;
  box-shadow: 0 0 10px #ff00cc, 0 0 20px #ff00cc, 0 0 30px #ff00cc, 0 0 40px #ff00cc;
  text-shadow: 0 5px 15px pink;
}

hr.top-line {
  margin-top: -1px;
}

hr.bottom-line {
  margin-top: 20px;
}

/* ----- Footer ----- */
footer {
  text-align: center;
}

/* ----- Autofill Styles ----- */
input[type="text"]:-webkit-autofill,
input[type="email"]:-webkit-autofill,
input[type="number"]:-webkit-autofill {
  background-color: #222 !important;
  color: #fff !important;
  box-shadow: 0 0 5px rgba(255, 0, 204, 0.8) inset !important;
  border-color: #ff00cc !important;
}

input[type="text"]:-webkit-autofill::first-line,
input[type="email"]:-webkit-autofill::first-line,
input[type="number"]:-webkit-autofill::first-line {
  color: #fff !important;
  font-weight: normal !important;
}

input[type="text"]:not(:-webkit-autofill),
input[type="email"]:not(:-webkit-autofill),
input[type="number"]:not(:-webkit-autofill) {
  background-color: #222 !important;
  color: #fff !important;
  border-color: #ff00cc !important;
}

input:-webkit-autofill {
  transition: background-color 5000s ease-in-out 0s;
}


body.modal-open {
  overflow: hidden;
}

.modal {
  display: none; /* Hidden by default */
  justify-content: center;
  align-items: center;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.6); 
}

.modal-content {
  background-color: #191919;
  margin: 0 auto;
  padding: 30px 20px;
  border: 2px solid #00cccc;
  border-radius: 10px;
  width: 80%;
  max-width: 400px;
  text-align: center;
  position: relative;
  animation: fadeUp 0.3s ease-out;
}

.modal-content h2 {
    color: white;
    padding-bottom: 10px;
}

.modal-content p {
    color: white;
    padding-top: 10px;
}

.close-btn {
  margin-top: 30px;
  padding: 10px 35px;
  background-color: #00cccc; 
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background-color: #191919;
    border: 2px solid #00cccc;
  border-radius: 30px;
}


@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* ----- Tablets (max-width: 1024px) ----- */
@media (max-width: 1024px) {
  .form-wrapper, form {
    padding: 20px;
  }

  fieldset {
    padding: 15px;
  }

  legend {
    font-size: 1rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 15px;
    padding: 10px;
  }

  button[type="submit"] {
    font-size: 16px;
    padding: 10px 20px;
  }
}

/* ----- Mobile Devices (max-width: 768px) ----- */
@media (max-width: 768px) {
  body {
    padding: 15px;
  }

  h2, #title {
    font-size: 1rem;
    text-align: center;
  }

  #title {
    margin: 10px auto;
    padding: 5px;
  }

  #title::after {
    width: 40px;
    height: 6px;
    margin: -10px auto 0;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
  }

  .form-wrapper, form {
    padding: 15px;
    border-radius: 20px;
  }

  fieldset {
    padding: 10px;
  }

  legend {
    font-size: 0.9rem;
  }

  input[type="text"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 14px;
    padding: 8px;
  }

  .radio-group div,
  .checkbox-group div {
    flex-direction: row;
    align-items: flex-start;
  }

  button[type="submit"] {
    font-size: 14px;
    padding: 10px 15px;
  }

  footer span {
    font-size: 0.8rem;
  }
}

/* ----- Very Small Devices (max-width: 480px) ----- */
@media (max-width: 480px) {
  h2, #title {
    font-size: 0.9rem;
  }

  #title::after {
    content: "";
    display: block;
    width: 350px;              /* Smaller width for small screens */
    height: 10px;              /* Adjusted height */
    margin: -10px auto 0;     /* Adjust position to match new layout */
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.35); /* Softer glow for mobile */
  }

  legend {
    font-size: 0.8rem;
  }

  button[type="submit"] {
    width: 100%;
    font-size: 13px;
  }

  .checkbox-group div,
  .radio-group div {
    gap: 6px;
    flex-direction: row; /* ✅ Keeps input + label inline */
    align-items: center;
  }

  input[type="radio"],
  input[type="checkbox"] {
    transform: scale(1.2);
  }

    .modal-content {
    width: 90%;
    margin-top: 40vh;
    padding: 20px 15px;
    border-width: 1px;
  }

  .modal-content h2 {
    font-size: 20px;
  }

  .modal-content p {
    font-size: 14px;
  }

  .close-btn {
    width: 40%;
    padding: 12px 0;
    font-size: 15px;
    margin-top: 20px;
  }

  footer span {
    display: block;
    font-size: 0.75rem;
  }
}
