  :root {
    --color-dark-navy-1: rgb(0, 23, 43); 
    --color-dark-navy-2: rgb(5, 35, 65); 
    --color-gold: #FFC300;             
    --color-white: #ffffff;
    --color-error: #ff4d4d; /* RED for Offline */
    --color-success: #4CAF50; /* GREEN for Online */
}
  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    /* === 8. NETWORK STATUS BANNER === */
.network-status {
  background-color: #333;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    text-align: center;
    color: var(--color-white);
    font-weight: 600;
    font-size: 1rem;
    z-index: 2000;
    /* Initial state: Hidden off-screen, but we use transition for smooth movement */
    transform: translateY(-100%); 
    transition: transform 0.4s ease-in-out;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.network-status i {
    margin-right: 8px;
}

/* State when the user is OFFLINE */
.network-status.offline {
    background-color: var(--color-error); /* Bright red */
    /* Bring the banner down when the 'offline' class is present */
    transform: translateY(0); 
}

/* State when the user is ONLINE (optional, can be used for a temporary "Welcome Back" message) */
.network-status.online-success {
    background-color: var(--color-success); /* Green */
    /* Ensure the banner is visible for a short time */
    transform: translateY(0); 
}
    body {
      background-color: rgb(0, 21, 43);
      font-family: Arial, sans-serif;
      color: #0a2b36;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 2rem;
      min-height: 100vh;
    }

     .logo-wrapper {
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 25px;
    }

    .logo-icon {
      width: 60px; /* hand + spanner icon size */
      height: auto;
      margin-right: 12px;
    }

    .logo-text {
      font-size: 2rem;
      font-weight: bold;
      color: gold;
      letter-spacing: 1px;
    }

    /* Error and Success spans for input fields */
    .input-error-message, .input-success-message {
        font-size: 1rem;
        margin-left: 10px;
        display: block; /* Ensures it takes up its own line */
        text-align: left;
        padding-left: 1rem;
        margin-top: 5px; /* Spacing from input */
    }

    .input-error-message {
        color: red;
    }

    .input-success-message {
        color: green;
    }


    .logo {
      color: #fbd106;
      font-size: 2.5rem;
      font-weight: bold;
      margin-bottom: 2rem;
    }
    .input-group {
      text-align: center;
      margin-bottom: 1rem;
    }

    .input-group input {
      width: 100%;
      padding: 1rem; /* Consistent padding with other inputs */
      margin: 0.5rem 0; /* Consistent margin with other inputs */
      border: none;
      border-radius: 2rem;
      background: #ffe4b5;
      color: #333;
      font-size: 1rem;
    }

    .form-card {
      background-color: rgb(0, 23, 43);
      padding: 2rem 1.5rem;
      border-color: gray;
      border-style: solid;
      border-width: 1px;
      border-radius: 1rem;
      width: 100%;
      max-width: 400px;
      box-shadow: 0 0 10px rgba(0,0,0,0.3);
    }

    .form-card h2 {
      text-align: center;
      margin-bottom: 1.5rem;
      color: #fbd106;
    }

    /* Input placeholder color fix */
    form input::placeholder {
      color: #666;
    }

    form button {
      width: 100%;
      padding: 1rem;
      margin-top: 1rem;
      background-color: #fbd106;
      border: none;
      border-radius: 2rem;
      font-weight: bold;
      color: #004466;
      font-size: 1.1rem;
      cursor: pointer;
      transition: background-color 0.3s ease;
    }

    form button:hover:not(:disabled) {
      background-color: #e3bb00;
    }

    form button:disabled {
      background-color: #ccc;
      color: #666;
      cursor: not-allowed;
    }
    .username-status-container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.username-status {
  font-size: 0.9em;
}

.username-status.error {
  color: red;
}

.username-status.success {
  color: green;
}

.loader {
  border: 3px solid rgba(255, 215, 0, 0.2); /* light gold background */
  border-top: 3px solid gold; /* gold spin color */
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


    .or-divider {
        display: flex;
        align-items: center;
        text-align: center;
        margin: 20px 0;
        color: #aaa;
    }
    

    .or-divider::before,
    .or-divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #555;
    }

    .or-divider:not(:empty)::before {
        margin-right: .25em;
    }

    .or-divider:not(:empty)::after {
        margin-left: .25em;
    }

    /* Google Button Specific Styling */
    .google-signup-btn {
        background-color: #4285F4; /* Google Blue */
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        padding: 0.8rem 1rem; /* Slightly less padding than main button */
        border-radius: 2rem;
        cursor: pointer;
        font-size: 1rem;
        margin-top: 1rem;
        transition: background-color 0.3s ease;
        border: none; /* Ensure no default button border */
        width: 100%; /* Ensure it spans full width like other buttons */
        font-weight: bold;
    }

    .google-signup-btn:hover {
        background-color: #357ae8;
    }

    .google-signup-btn img {
        width: 20px; /* Adjust logo size */
        height: 20px;
    }

    .signin-link {
      margin-top: 1rem;
      text-align: center;
      color:white;
    }

    .signin-link a {
      color: gold;
      text-decoration: underline;
    }

    /* Message Display Styles (for general messages) */
    .message {
      margin-top: 15px;
      padding: 10px;
      border-radius: 5px;
      font-weight: bold;
      text-align: center;
      min-height: 20px;
      font-size: 0.9em;
      color: white;
    }
    .message.success { background-color: #388e3c; color: white; }
    .message.error { background-color: #d32f2f; color: white; }
    .message.info { background-color: #1976d2; color: white; }


    /* Responsive tweaks */
    @media (min-width: 600px) {
      .form-card {
        padding: 2.5rem;
      }

      .logo {
        font-size: 3rem;
      }
    }

    /* Onboarding styles (keeping them separated for clarity) */
    #googleSignUpModal {
        display: none;
        position: fixed;
        z-index: 1000;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        overflow: auto;
        background-color: rgba(0,0,0,0.6);
        justify-content: center;
        align-items: center;
    }

    #googleSignUpModal .modal-content {
        background-color: rgb(0, 23, 43);
        color: #fff;
        margin: auto;
        padding: 25px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 90%;
        max-width: 380px;
        border-radius: 8px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.4);
        text-align: center;
        box-sizing: border-box;
    }
    #googleSignUpModal .modal-content h3 {
        margin-top: 0;
        color: gold;
        margin-bottom: 20px;
    }
    #googleSignUpModal .modal-content p {
        color: rgba(255, 255, 255, 0.8);
    }
    #googleSignUpModal .modal-content button {
        background-color: gold;
        color: rgb(0, 23, 43);
        border: none;
        border-radius: 25px;
    }
    #googleSignUpModal .modal-content button:hover:not(:disabled) {
        background-color: #ffd700;
        color: rgb(0, 23, 43);
    }
    #googleSignUpModal .modal-content input,
    #googleSignUpModal .modal-content select {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff;
        width: 100%; /* Make modal inputs full width */
        padding: 10px;
        margin-bottom: 15px; /* Space between modal inputs */
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 5px;
    }
    #googleSignUpModal .modal-content input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }
    #googleSignUpModal .modal-content select option {
        color: #333; /* For better readability of options in some browsers */
        background-color: rgb(0, 23, 43);
    }


    /* Spinner style */
    .spinner {
      border: 4px solid rgba(255, 255, 255, 0.3);
      border-top: 4px solid #fbd106; /* Gold color */
      border-radius: 50%;
      width: 20px;
      height: 20px;
      animation: spin 1s linear infinite;
      display: inline-block;
      vertical-align: middle;
      margin-left: 10px;
    }

    @keyframes spin {
      0% { transform: rotate(0deg); }
      100% { transform: rotate(360deg); }
    }