/* --- Font Definitions --- */
@font-face {
  font-family: 'Milker Bold';
  src: url('/milker/Milker.otf') format('truetype');
}

/* --- Global and Background Styling --- */
html, body {
  height: 100%; /* Ensures the body fills the full height of the viewport */
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: url('../images/formBackground.png') center/cover no-repeat;
  background-color: #0a1f44;
  color: rgb(255, 191, 0);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* --- Login Form Container --- */
.form-container {
  background: #13294b;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 460px !important; /* Default width for smaller screens */
  transition: max-width 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 10; /* Ensure it appears above background elements */
}


/* For small phones and up to 768px */
@media (min-width: 320px) and (max-width: 768px) {
  .form-container {
    width: 95%;        /* Nearly full width */
    max-width: 600px;   /* No artificial limit */
    padding: 20px;     /* Slightly smaller padding */
    border-radius: 8px;
  }
}

/* Tablets (≥768px and <992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .form-container {
    max-width: 500px; /* Bigger than default for better use of space */
    padding: 40px; /* More breathing room */
  }
}

/* Medium desktops (≥992px and <1200px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .form-container {
    max-width: 500px;
  }
}

/* Large desktops (≥1200px) */
@media (min-width: 1200px) {
  .form-container {
    max-width: 600px;
  }
}

.form-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: rgb(255, 191, 0);
  font-weight: normal;
}

.form-group {
  margin-bottom: 15px;
  position: relative; /* For positioning eye icon */
}

.form-group label {
  display: block;
  margin-bottom: 6px;
}

/* --- Form Input Styling --- */
.form-group input {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #c1c8d2;
  color: #fff;
  font-size: 14px;
  box-sizing: border-box;
  transition: all 0.8s ease-in-out;
}

/* Placeholder and focus effects */
.form-group input::placeholder {
  color: #4d4c4c;
  opacity: 1;
}

.form-group input:focus {
  background-color: #3e3e3e;
  color: #fff;
  border-color: #007bff;
  box-shadow: none;
}

.fa {
  position: absolute;
  right: 14px;
  top: 40px;
  cursor: pointer;
  font-size: 1.2em;
  color: #888;
}

/* --- Forgot Password Link --- */
.forgot-password-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
  margin-top: -8px;
}

.forgot-password {
  color: #fff;
  font-size: 0.98rem;
  text-decoration: none;
  transition: color 0.4s ease-in-out;
}

.forgot-password:hover {
  color: #ffc107;
  text-decoration: underline;
}

.rotated-arrow {
  display: inline-block;
  transform: rotate(45deg);
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

@media (max-width: 576px) {
  .forgot-password-row {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 0.3rem;
    gap: 10px;
  }
  .form-check {
    margin-bottom: 0.3rem;
  }
  
}

/* --- Remember Me Checkbox --- */
.form-group.form-check {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  margin-bottom: 1rem;
}

.form-check-input {
  margin: 0;
  width: 16px;
  height: 16px;
  min-width: 20px;
  min-height: 20px;
  max-width: 16px;
  max-height: 16px;
  accent-color: rgb(255, 191, 0);
  background-color: #2e2e2e;
  border-color: #444;
}

.form-check-label {
  margin: 0;
  font-size: 1rem;
  position: static;
  top: 0;
}

@media (max-width: 576px) {
  .form-group.form-check {
    gap: 0.3rem;
  }
  .form-check-label {
    font-size: 0.97rem;
  }
}

/* --- Captcha Styling --- */
.captcha-container .captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-box {
  background: #00d9ff;
  color: #000;
  font-weight: bold;
  padding: 10px;
  border-radius: 6px;
  font-family: 'Courier New', Courier, monospace;
  user-select: none;
  min-width: 90px;
  text-align: center;
}

.captcha-input {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: none;
  background: #c1c8d2;
  color: #fff;
  font-size: 14px;
}

/* --- Button Styling --- */
.form-container button {
  width: 100%;
  padding: 10px;
  background-color: RGB(255, 151, 0);
  color: #000;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
}

.form-container button:hover {
  background-color: #eea237;
  color: black;
}

/* --- Login Redirect --- */
.textregister {
  font-size: 16px;
  color: #fff;
  text-decoration: none;
  transition: all 0.4s ease-in-out;
}

.textregister:hover {
  color: #ffc107;
  text-decoration: underline;
}

/* --- Message Styling --- */
.message-success {
  color: green;
  font-weight: bold;
  margin-top: 10px;
}

.message-error {
  color: red;
  font-weight: bold;
  margin-top: 10px;
}

/* background animmation starts */

/* Canvas for nodes */
    #nodesCanvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 4;
    }

    /* Hover reveal effect */
    #hoverMask {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgb(0, 0, 0);
        /* Default: no hole */
        mask-image: none;
        -webkit-mask-image: none;
        mask-repeat: no-repeat;
        -webkit-mask-repeat: no-repeat;
        transition: mask-image 0.2s, -webkit-mask-image 0.2s;
        z-index: 3;
        pointer-events: none;
    }

    /* Background image layer */
    #bgLayer {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: url("../images/formBackground.png") center/cover no-repeat;
        z-index: 0;
    }

    .star {
        position: absolute;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        opacity: 1;
        animation: fly 0.7s ease-out forwards;
        z-index: 2;
    }

    @keyframes fly {
        0% { transform: translate(0, 0) scale(1); opacity: 1; }
        100% { transform: translate(var(--x), var(--y)) scale(0.5); opacity: 0; }
    }

    .cloud {
        position: absolute;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        animation: puff 0.6s ease-out forwards;
        z-index: 2;
    }

    @keyframes puff {
        0% { transform: scale(0.5); opacity: 0.6; }
        100% { transform: scale(2.5); opacity: 0; }
    }


/* background animation ends */