@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;700&display=swap');

/* ===================================
   1. RESET & BASE STYLES
   =================================== */

* {
  margin: 0;
  padding: 0;
  font-family: "Noto Sans KR", sans-serif;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  background: url('img.jpg') no-repeat center;
  background-size: cover;
}

/* ===================================
   2. AUTOFILL & FOCUS OVERRIDES
   =================================== */

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  -webkit-text-fill-color: #fff !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* ===================================
   3. LOGIN WRAPPER
   =================================== */

.wrapper {
  width: 420px;
  padding: 30px 40px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  color: #fff;
  backdrop-filter: blur(25px);
  animation: loginFade 0.8s ease;
}

h1 {
  font-size: 30px;
  text-align: center;
}

/* ===================================
   4. INPUT FIELDS
   =================================== */

.input-box {
  position: relative;
  width: 100%;
  height: 50px;
  margin: 30px 0;
}

.input-box input {
  width: 100%;
  height: 100%;
  padding: 20px 45px 20px 20px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 40px;
  font-size: 16px;
  color: #fff;
  outline: none;
  transition: all 0.3s ease;
}

.input-box input::placeholder {
  color: #fff;
}

.input-box input:hover {
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.input-box input:focus {
  border: 2px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.35);
}

.input-box input:focus + i {
  color: white;
}

.input-box i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
}

/* ===================================
   5. REMEMBER & FORGOT PASSWORD
   =================================== */

.remember-forgot {
  display: flex;
  justify-content: space-between;
  font-size: 14.5px;
  margin: -15px 0 15px;
}

.remember-forgot label input {
  accent-color: #fff;
  margin-right: 3px;
}

.remember-forgot label {
  margin-top: 6px;
}

.remember-forgot a:hover {
  text-decoration: underline;
}

/* ===================================
   6. BUTTONS
   =================================== */

.wrapper .btn {
  width: 100%;
  height: 45px;
  background: #fff;
  border: none;
  border-radius: 40px;
  outline: none;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}

.wrapper .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25), 0 0 10px rgba(255, 255, 255, 0.3);
}

.wrapper .btn:active {
  transform: translateY(1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

/* ===================================
   7. GOOGLE BUTTON
   =================================== */

.google-btn {
  width: 100%;
  height: 45px;
  margin-top: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.25s ease;
}

.google-btn i {
  font-size: 18px;
}

.google-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.google-btn:active {
  transform: scale(0.97);
}

/* ===================================
   8. ERROR MESSAGE
   =================================== */

.loginError {
  font-size: 14px;
  text-align: center;
  margin-top: 15px;
  color: #ff4d4f;
  font-weight: 500;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
}

/* ===================================
   9. LOADING STATES
   =================================== */

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.8s ease-out, visibility 0.8s;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#main-content {
  opacity: 0;
  transform: translateY(-50px);
  padding: 20px;
  text-align: center;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.loaded {
  overflow: auto;
}

.loaded #loading-screen {
  opacity: 0;
  visibility: hidden;
}

.loaded #main-content {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================
   10. ANIMATIONS
   =================================== */

@keyframes loginFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes textShake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.text-shake {
  animation: textShake 0.35s ease;
}

/* ===================================
   11. RESPONSIVE DESIGN
   =================================== */

@media (max-width: 600px) {
  body {
    padding: 20px;
    align-items: center;
  }

  .wrapper {
    width: 100%;
    max-width: 340px;
    padding: 25px 20px;
  }

  h1 {
    font-size: 28px;
  }

  .input-box {
    margin: 20px 0;
    height: 48px;
  }

  .input-box input {
    font-size: 15px;
    padding: 16px 42px 16px 16px;
  }

  .wrapper .btn {
    height: 44px;
    font-size: 15px;
  }

  .remember-forgot {
    font-size: 13px;
  }

  .remember-forgot label {
    margin-left: 6px;
  }
}

