/**
 * HrdFlex Login Theme CSS
 * HRD Archive 로그인 페이지 디자인 시스템
 * Created: 배서연
 */

/* ========================================
   1. 기초 디자인 시스템
   ======================================== */
@import url('./hrdflex.theme.css');


/* ========================================
   2. 로그인 페이지 전체 스타일
   ======================================== */
body.login-page {
  font-family: var(--font-family);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%),
              url(../../img/hrdflex/hrdflex1.jpg) center / cover no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

body.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(77deg, rgba(0, 0, 0, 0.9) 0%, rgba(90, 90, 90, 0.5) 50%, transparent 100%),
              linear-gradient(180deg, transparent 60%, rgb(77, 77, 77) 100%);
  z-index: 1;
}

.login-particles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
}

/* ========================================
   3. 로그인 컨테이너
   ======================================== */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  position: relative;
  z-index: 2;
}

.login-container {
  width: 100%;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 75px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  min-height: 600px;
}

/* ========================================
   4. 로그인 왼쪽 - 소개 섹션
   ======================================== */
.login-welcome {
  background: linear-gradient(135deg, var(--hero-purple) 0%, #764ba2 100%);
  padding: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-welcome::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: rotate 30s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.login-logo {
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 2;
}

.login-logo h1 {
  font-size: 3rem;
  font-weight: 900;
  color: var(--text-white);
  background: linear-gradient(45deg, #ffffff, #e3f2fd, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: var(--spacing-sm);
}

.login-hero-badge {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  backdrop-filter: blur(10px);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-white);
  margin-bottom: var(--spacing-xl);
  position: relative;
  z-index: 2;
}

.welcome-text {
  position: relative;
  z-index: 2;
}

.welcome-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  line-height: 1.2;
}

.welcome-description {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: var(--spacing-xl);
  min-height: 3.6rem;
  display: flex;
  align-items: flex-start;
}

.welcome-features {
  list-style: none;
  padding: 0;
  margin: var(--spacing-xl) 0;
  position: relative;
  z-index: 2;
}

.welcome-features li {
  display: flex;
  align-items: center;
  color: var(--text-white);
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.welcome-features li::before {
  content: '✓';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin-right: var(--spacing-md);
  font-weight: bold;
}

/* ========================================
   5. 로그인 오른쪽 - 폼 섹션
   ======================================== */
.login-form-section {
  padding: var(--spacing-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-white);
}

.login-form-header {
  margin-bottom: var(--spacing-xl);
}

.login-form-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
}

.login-form-subtitle {
  font-size: 0.95rem;
  color: var(--text-gray);
  line-height: 1.5;
}

/* ========================================
   6. 폼 스타일
   ======================================== */
.login-form {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--spacing-sm);
  letter-spacing: -0.01em;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-family);
  transition: var(--transition-base);
  background: var(--bg-white);
  color: var(--text-dark);
}

.form-input:focus {
  border-color: var(--hero-purple);
  outline: none;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-input::placeholder {
  color: var(--text-light);
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-gray);
  cursor: pointer;
  padding: 0.25rem;
  transition: var(--transition-base);
}

.password-toggle:hover {
  color: var(--text-dark);
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-xl);
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
}

.checkbox-input {
  width: 18px;
  height: 18px;
  margin-right: var(--spacing-sm);
  cursor: pointer;
  accent-color: var(--hero-purple);
}

.checkbox-label {
  font-size: 0.9rem;
  color: var(--text-gray);
  cursor: pointer;
  user-select: none;
}

.forgot-link {
  font-size: 0.9rem;
  color: var(--hero-purple);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-base);
}

.forgot-link:hover {
  color: #5a67d8;
  text-decoration: underline;
}

/* ========================================
   7. 로그인 버튼 스타일
   ======================================== */
.login-button {
  width: 100%;
  padding: 1rem;
  background: var(--hero-purple);
  color: var(--text-white);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  margin-bottom: var(--spacing-lg);
}

.login-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  transition: left 0.6s ease;
}

.login-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
  border-color: rgba(255, 255, 255, 0.3);
}

.login-button:hover::before {
  left: 100%;
}

.login-button:active {
  transform: translateY(0);
}

/* Back Button Styles */
.back-button-wrapper {
  margin-top: var(--spacing-xl);
  text-align: left;
}
.back-button i {
  font-size: 0.9rem;
  transition: var(--transition-base);
}

.back-button:hover i {
  transform: translateX(-3px);
}

/* ========================================
   8. 반응형 디자인
   ======================================== */
@media (max-width: 1024px) {
  .login-container {
    max-width: 900px;
  }

  .login-logo h1 {
    font-size: 2.5rem;
  }

  .welcome-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .login-welcome {
    padding: var(--spacing-xl) var(--spacing-lg);
    min-height: 250px;
  }

  .login-logo{
    display: none;
  }

  .welcome-title {
    font-size: 1.5rem;
  }

  .welcome-features {
    display: none;
  }

  .login-form-section {
    padding: var(--spacing-xl) var(--spacing-lg);
  }

  .login-form {
    max-width: 100%;
  }

  .welcome-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    min-height: 3.1rem;
  }
}

@media (max-width: 480px) {
  .login-wrapper {
    padding: var(--spacing-md);
  }

  .login-container {
    border-radius: var(--radius-md);
  }

  .login-welcome {
    padding: var(--spacing-lg) var(--spacing-md);
    min-height: 200px;
  }

  .login-logo h1 {
    font-size: 1.75rem;
  }

  .login-form-section {
    padding: var(--spacing-lg) var(--spacing-md);
  }

  .login-form-title {
    font-size: 1.5rem;
  }
}

/* ========================================
   10. 폼 오류 메시지 스타일
   ======================================== */
.form-error {
  display: block;
  color: var(--primary-red);
  font-size: 0.85rem;
  margin-top: var(--spacing-xs);
}

.form-input.error {
  border-color: var(--primary-red);
}

.form-input.error:focus {
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.1);
}

.login-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-white);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========================================
   11. 접근성 향상
   ======================================== */
*:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ========================================
   12. 애니메이션 효과
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fadeIn {
  animation: fadeIn 0.6s ease-out;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float-animation {
  animation: float 3s ease-in-out infinite;
}