* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle, #0b0f14, #020409);
}

/* REGISTER BOX */
.register-container {
  width: 360px;
  background: #0f141a;
  border: 3px solid gold;
  border-radius: 16px;
  padding: 35px 30px;
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.25);
}

.register-container h2 {
  text-align: center;
  color: gold;
  margin-bottom: 25px;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input,
select {
  padding: 12px;
  background: #000;
  border: none;
  border-left: 4px solid gold;
  color: #fff;
  border-radius: 6px;
  font-size: 1rem;
  outline: none;
}

button {
  padding: 14px;
  background: gold;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #e6c200;
  transform: scale(1.03);
}

#passwordError {
  color: #ff4d4d;
  font-size: 0.85rem;
  text-align: center;
  display: none;
}

/* SUCCESS POPUP */
#successPopup {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.success-box {
  background: #0f141a;
  border: 3px solid gold;
  padding: 40px;
  border-radius: 18px;
  text-align: center;
  color: white;
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.35);
}

/* INDIAN FLAG ON TOP */
/* .success-box .flag {
  width: 100px;
  height: 65px;
  margin: 0 auto 15px auto;
  background-image: url("indflag.png");
  background-image: url("armylogo.png");
  justify-content: space-evenly;
  background-size: cover;
  background-position: center;
  border-radius: 5px;
} */

.success-box .flag {
  width: 160px;
  height: 70px;
  margin: 0 auto 15px auto;

  background-image:
    url("indflag.png"),
    url("armylogo.png");

  background-size: 80px 60px, 60px 60px;
  background-position: left center, right center;
  background-repeat: no-repeat;

  border-radius: 5px;
}


.success-box h3 {
  color: gold;
  letter-spacing: 3px;
}

.success-box h2 {
  margin-bottom: 25px;
}

input[type="radio"] {
  padding: 0;
  background: transparent;
  border: none;
  width: auto;
  height: auto;
}

.radio-label span {
  color: white;
  font-size: 1rem;
}

.radio-label {
  display: inline-flex;
  align-items: center;
  margin-right: 15px;
  cursor: pointer;
}

.radio-label input[type="radio"] {
  margin-right: 6px;
}

.radio-group {
  display: flex;
  align-items: center;
  gap: 15px;
}

.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.radio-label span {
  color: gold;
  margin-left: 6px;
}

.radio-label input[type="radio"] {
  margin: 0;
}
.forgot-password,.forgot-password:visited {
  color: #ffd700;
  text-decoration: none;
}

.forgot-password:hover {
  color: white;
  text-decoration: underline;
}

/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #0d0d0d;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px; /* Added padding so it doesn't touch edges on mobile */
}

/* Container for the form */
.container {
    background: #1a1a1a;
    padding: 30px;
    border-radius: 10px;
    border: 2px solid #ffd700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
    width: 100%;
    max-width: 500px; /* Prevents it from being too wide on PC */
    text-align: center;
}

h2 {
    color: #ffd700;
    margin-bottom: 20px;
}

/* Form Groups */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #ccc;
}

input, select {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background: #222;
    color: #fff;
    outline: none;
    font-size: 16px; /* 16px prevents zooming on iPhone */
}

input:focus, select:focus {
    border-color: #ffd700;
}

/* Buttons */
button {
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

button:hover {
    background: #e6c200;
}

button:disabled {
    background: #555;
    cursor: not-allowed;
}

/* Helper Texts */
.login-link {
    margin-top: 15px;
    font-size: 14px;
}

.login-link a {
    color: #ffd700;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: underline;
}

/* --- MOBILE FIXES --- */
/* --- BEAUTIFUL MOBILE DESIGN (Paste at bottom of register.css) --- */
@media (max-width: 600px) {
    body {
        /* Allow scrolling so the form isn't stuck in the middle */
        align-items: flex-start; 
        padding-top: 40px; 
        padding-bottom: 40px;
        background: #000; /* purely dark background on mobile */
    }

    .register-container {
        width: 90%; /* 90% width means 5% space on left and right */
        max-width: 400px;
        margin: 0 auto; /* Center it perfectly */
        padding: 30px 20px; /* Big internal breathing room */
        border-width: 2px; /* Thinner elegant border */
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.3); /* Softer glow */
    }

    h2 {
        font-size: 1.8rem;
        margin-bottom: 30px; /* More space below title */
    }

    /* Make inputs tall and easy to tap */
    input, select {
        padding: 15px; /* Taller box */
        font-size: 16px; /* Readable text */
        margin-bottom: 20px; /* Space between boxes */
        background: #111; /* Slightly lighter than black */
        border-radius: 8px; /* Smooth corners */
    }

    /* Big, bold buttons */
    button {
        padding: 16px; /* Big touch target */
        font-size: 1.1rem;
        margin-top: 10px;
        border-radius: 8px;
    }

    /* Fix the radio buttons row */
    .radio-group {
        flex-direction: column; /* Stack them vertically on phone */
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
    }
}

.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input {
    width: 100%;
    height: 45px;
    padding: 0 45px 0 15px; /* left + right padding */
    font-size: 16px; /* prevents zoom on mobile */
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.password-wrapper i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    cursor: pointer;
    color: #555;
}
@media (max-width: 768px) {

    .password-wrapper {
        max-width: 100%;
    }

    .password-wrapper input {
        height: 44px;
        padding-right: 45px;
        font-size: 15px;
    }

    .password-wrapper i {
        right: 12px;
        font-size: 16px;
    }

}

/* --- TOAST NOTIFICATION STYLES (Mobile Friendly) --- */
#toast-box {
    visibility: hidden;
    min-width: 280px; /* Slightly wider for readability */
    max-width: 90%;   /* Prevents it from going off-screen on phones */
    background-color: #222; /* Darker background */
    color: #fff;
    text-align: center;
    border-radius: 8px; /* Softer corners */
    padding: 15px 20px;
    position: fixed;
    z-index: 9999; /* Ensures it is on top of everything */
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    font-size: 15px;
    box-shadow: 0px 5px 15px rgba(0,0,0,0.5); /* Stronger shadow */
    opacity: 0;
    transition: opacity 0.4s ease-in-out, bottom 0.4s ease-in-out;
    white-space: nowrap; /* Keeps text on one line if possible */
}

/* Mobile Specific Adjustments */
@media (max-width: 600px) {
    #toast-box {
        width: 85%;       /* Take up most of the screen width */
        bottom: 20px;     /* Sit slightly lower */
        font-size: 14px;  /* Slightly smaller text */
        white-space: normal; /* Allow text to wrap on small phones */
    }
}

#toast-box.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px; /* Moves up slightly when appearing */
}

/* Colors for Success and Error */
#toast-box.success { 
    border-left: 6px solid #2ecc71; /* Green Bar */
} 

#toast-box.error { 
    border-left: 6px solid #e74c3c; /* Red Bar */
}