:root {
  --bg: #0f0f0f;
  --card-bg: #1a1a1a;
  --accent: #6f9052;
  --text: #f5f5f5;
  --muted: #aaaaaa;
}

/* -------------------- BODY -------------------- */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  background: var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* -------------------- ANIMATIONS -------------------- */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes buttonPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* -------------------- LOGIN BOX -------------------- */
.login-box {
  text-align: center;
  background: var(--card-bg);
  padding: 2rem 3rem;
  border-radius: 12px;
  border: 1px solid var(--accent);
  width: 90%;
  max-width: 360px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: fadeInUp 0.6s ease-out;
  overflow: hidden;
}

.login-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px 4px var(--accent);
}

.login-box img {
  width: 140px;
  max-width: 80%;
  height: auto;
  margin-bottom: 1rem;
}

.login-box input[type=password] {
  width: 100%;
  max-width: 260px;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--bg);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.login-box input[type=password]:focus {
  border-color: #88b368;
  box-shadow: 0 0 12px 3px #88b368;
  transform: scale(1.02);
}

.login-box button {
  width: 120px;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--text);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: background 0.3s ease, transform 0.2s ease;
  align-self: center;
  text-transform: uppercase;
}

.login-box button:hover {
  background: #88b368;
}

.login-box button:focus,
.login-box button:active {
  animation: buttonPulse 0.5s ease-in-out 1;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vh; /* scaled spacing for mobile */
  width: 100%;
}

/* -------------------- MOBILE / SMALL SCREENS -------------------- */
@media (max-width: 600px) {

  html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center; /* vertical centering */
    align-items: center;     /* horizontal centering */
    overflow: hidden;
  }

  .login-box {
    width: 60vw;
    max-width: 400px;
    padding: 4vw 6vw;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3vh;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.6);
    animation: fadeInScale 0.6s ease-out;
    max-height: 40vh;
    
    /* NEW: move slightly above vertical center */
    transform: translateY(-10%);
  }

  .login-box img {
    width: 80%;
    max-width: 200px;
    height: auto;
    margin-bottom: -2vh;
  }

  .login-box input[type=password] {
    width: 80%;
    font-size: 1.3rem;
    padding: 0.8rem 1rem;
  }

  .login-box button {
    width: 50%;
    font-size: 1.2rem;
    padding: 0.6rem 0;
    margin-top: 0.2rem;
  }

  .login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2vh;
  }
}

