* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: linear-gradient(165deg, #f8f9ff 0%, #edf0fa 100%);
  font-family: "Inter", sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  position: relative;
}

/* abstract background (preserved) */
body::before {
  content: "";
  position: fixed;
  width: 60vw;
  height: 60vw;
  max-width: 800px;
  max-height: 800px;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(98, 0, 234, 0.03),
    rgba(0, 113, 227, 0.02) 70%
  );
  top: -20%;
  right: -10%;
  border-radius: 50%;
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  width: 70vw;
  height: 70vw;
  max-width: 900px;
  max-height: 900px;
  background: radial-gradient(
    circle at 70% 70%,
    rgba(0, 180, 216, 0.03),
    rgba(106, 17, 203, 0.02) 70%
  );
  bottom: -25%;
  left: -10%;
  border-radius: 50%;
  z-index: 0;
}

/* main card – compact & elegant */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 2rem;
  box-shadow:
    0 20px 40px -14px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.8) inset,
    0 0 0 1px rgba(98, 0, 234, 0.1);
  width: 100%;
  max-width: 440px;
  padding: 2rem 2rem;
  z-index: 10;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 auto;
}

.login-card:hover {
  box-shadow:
    0 25px 50px -16px rgba(55, 0, 130, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.9) inset;
}

/* header spacing tighter */
.card-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.library-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.rid-logo {
  width: 48px;
  height: 48px;
  background: linear-gradient(145deg, #6200ea, #0071e3);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 18px -8px #6200ea;
  transform: rotate(-3deg);
  transition: transform 0.3s ease;
}
.login-card:hover .rid-logo {
  transform: rotate(0deg) scale(1.02);
}
.rid-logo i {
  font-size: 1.6rem;
  color: white;
}

.rid-text {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, #1e293b, #0f1a3a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rid-text span {
  background: linear-gradient(145deg, #6200ea, #0071e3);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 800;
}

.card-header h2 {
  font-size: 1.6rem;
  font-weight: 600;
  color: #1e293b;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}
.card-header p {
  color: #5a627a;
  font-size: 0.9rem;
}

/* welcome message compact */
.welcome-message {
  background: rgba(98, 0, 234, 0.04);
  padding: 0.6rem 1rem;
  border-radius: 40px;
  margin-bottom: 1.5rem;
  gap: 0.6rem;
  border: 1px dashed rgba(98, 0, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.welcome-message i {
  color: #6200ea;
  font-size: 1rem;
}
.welcome-message span {
  color: #1e293b;
  font-weight: 500;
  font-size: 0.9rem;
}

/* input groups */
.input-group {
  position: relative;
  margin-bottom: 1.2rem;
}
.input-group i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #6200ea;
  font-size: 1rem;
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
}
.input-group input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 2.8rem;
  background: white;
  border: 1.5px solid #e9e4f2;
  border-radius: 18px;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1a1f36;
  outline: none;
  transition: all 0.2s ease;
  font-family: "Inter", sans-serif;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}
.input-group input::placeholder {
  color: #919bae;
  font-weight: 400;
  font-size: 0.9rem;
}
.input-group input:focus {
  border-color: #6200ea;
  box-shadow: 0 0 0 4px rgba(98, 0, 234, 0.1);
}

/* remember / forgot row */
.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.8rem 0 1.2rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.remember-me {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6200ea;
}
.remember-me label {
  color: #2d3648;
  font-size: 0.9rem;
  font-weight: 500;
}
.forgot-link {
  color: #6200ea;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed #b7a6df;
}

/* ========== PRIMARY LOGIN BUTTON – fresh & deep ========== */
.btn-primary {
  background: linear-gradient(115deg, #1f2a48, #28365e); /* richer navy */
  border: none;
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 1rem 1.5rem;
  width: 100%;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 10px 22px -10px #1e293b;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  letter-spacing: 0.2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  position: relative;
}
.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.7s;
}
.btn-primary:hover::before {
  left: 100%;
}
.btn-primary:hover {
  background: linear-gradient(115deg, #17213a, #1e2b50);
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -10px #0f1a3a;
}
.btn-primary i {
  font-size: 0.9rem;
  transition: transform 0.2s;
}
.btn-primary:hover i {
  transform: translateX(4px);
}

/* ========== DIVIDER ========== */
.divider {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 1.5rem 0;
  color: #919bae;
  font-size: 0.8rem;
  font-weight: 500;
}
.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d0c8e0, transparent);
}

/* ========== GOOGLE BUTTON – refined, clean, with subtle brand color ========== */
.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1.5px solid #e2d9f0;
  background: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  color: #2c3e4f;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
  box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.1);
}
.social-btn i {
  font-size: 1.2rem;
  color: #db4437; /* google brand red */
}
.social-btn:hover {
  border-color: #db4437; /* red accent on hover */
  background: #fff6f4; /* very light red tint */
  transform: translateY(-2px);
  box-shadow: 0 10px 18px -12px #db4437;
}
/* optional: if you want a more "google" look, you can also add a second button, but we keep one */

/* signup link */
.signup-link {
  text-align: center;
  margin-top: 1.2rem;
  color: #4a5578;
  font-size: 0.9rem;
}
.signup-link a {
  color: #6200ea;
  font-weight: 700;
  text-decoration: none;
  padding: 0.3rem 1rem;
  border-radius: 40px;
  background: rgba(98, 0, 234, 0.08);
  transition: 0.2s;
  display: inline-block;
  margin-left: 0.3rem;
  border: 1px solid rgba(98, 0, 234, 0.2);
}
.signup-link a:hover {
  background: rgba(98, 0, 234, 0.15);
  color: #0071e3;
  border-color: #6200ea;
}

/* responsive fine-tuning */
@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem 1.2rem;
    max-width: 380px;
    border-radius: 1.8rem;
  }
  .rid-text {
    font-size: 1.5rem;
  }
  .card-header h2 {
    font-size: 1.4rem;
  }
}

@media (max-height: 680px) {
  .login-card {
    padding: 1.2rem 1.5rem;
  }
  .card-header {
    margin-bottom: 1rem;
  }
  .welcome-message {
    margin-bottom: 1rem;
    padding: 0.4rem 0.8rem;
  }
  .input-group {
    margin-bottom: 0.8rem;
  }
  .btn-primary {
    padding: 0.8rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  body {
    padding: 0.5rem;
  }
  .login-card {
    padding: 1rem 1.5rem;
  }
}