/* ======================
   로그인 모달 라이트 모드
   ====================== */

/* Login Modal Overlay */
body.light-mode #modal-login {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Login Modal Inner */
body.light-mode #modal-login .modal__inner {
  background-color: #ffffff !important;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-radius: 12px;
}

/* Login Modal Header */
body.light-mode #modal-login .modal__header {
  background-color: transparent;
  border-bottom: none;
  padding-bottom: 16px;
}

body.light-mode #modal-login .modal__header h3 {
  color: #1a1d23;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

body.light-mode #modal-login .modal__header p {
  color: #6b7280;
  font-size: 14px;
}

/* Login Form */
body.light-mode #modal-login form {
  margin-top: 25px;
}

body.light-mode #modal-login fieldset {
  border: none;
  padding: 0;
  margin: 0;
}

/* Input Groups */
body.light-mode #modal-login .input--typeA {
  margin-bottom: 20px;
  padding-bottom: 0;
  border-bottom: none;
}

body.light-mode #modal-login .input--typeA:last-of-type {
  margin-bottom: 24px;
}

body.light-mode #modal-login .input--typeA .input_label {
  display: block;
  color: #4b5563;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Input Fields */
body.light-mode #modal-login input[type="email"],
body.light-mode #modal-login input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background-color: #f9fafb;
  color: #1a1d23;
  font-size: 14px;
  transition: all 0.2s ease;
}

body.light-mode #modal-login input[type="email"]:focus,
body.light-mode #modal-login input[type="password"]:focus {
  outline: none;
  border-color: #3b82f6;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

body.light-mode #modal-login input::placeholder {
  color: #9ca3af;
}

/* Login Button */
body.light-mode #modal-login .btn_submit {
  background-color: #3b82f6;
  color: #ffffff;
  font-weight: 600;
  height: 48px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

body.light-mode #modal-login .btn_submit:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

body.light-mode #modal-login .btn_submit:active {
  transform: translateY(0);
}

/* Social Login Buttons */
body.light-mode #modal-login .Etc {
  margin-top: 16px;
  gap: 8px;
}

body.light-mode #modal-login .Etc a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-decoration: none;
}

/* Google Login Button */
body.light-mode #modal-login .Etc a[data="Google"] {
  background-color: #ffffff;
  color: #1a1d23;
  border: 1px solid #d1d5db;
}

body.light-mode #modal-login .Etc a[data="Google"]:hover {
  background-color: #f9fafb;
  border-color: #3b82f6;
  color: #3b82f6;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Naver Login Button */
body.light-mode #modal-login .Etc a[data="Naver"] {
  background-color: #03c75a;
  color: #ffffff;
  border: 1px solid #03c75a;
}

body.light-mode #modal-login .Etc a[data="Naver"]:hover {
  background-color: #02b350;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(3, 199, 90, 0.3);
}

body.light-mode #modal-login .Etc a img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  position: static;
  top: auto;
  margin-right: 0;
}

/* Divider */
body.light-mode #modal-login hr {
  border: none;
  border-top: 1px solid #e5e7eb !important;
  margin-top: 20px;
  margin-bottom: 20px;
}

/* Bottom Buttons */
body.light-mode #modal-login .modal__btns.end:last-child {
  gap: 8px;
  margin-top: 20px;
}

body.light-mode #modal-login .btn_outline_brand {
  background-color: #ffffff;
  color: #3b82f6;
  border: 1px solid #3b82f6;
  font-weight: 600;
  transition: all 0.2s ease;
}

body.light-mode #modal-login .btn_outline_brand:hover {
  background-color: #eff6ff;
  border-color: #2563eb;
  color: #2563eb;
  transform: translateY(-1px);
}

/* Modal Close Button (if exists) */
body.light-mode #modal-login .modal-close {
  color: #6b7280;
  transition: color 0.2s ease;
}

body.light-mode #modal-login .modal-close:hover {
  color: #1a1d23;
}

/* Error State */
body.light-mode #modal-login input.error {
  border-color: #ef4444;
  background-color: #fef2f2;
}

body.light-mode #modal-login input.error:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Success State */
body.light-mode #modal-login input.success {
  border-color: #10b981;
  background-color: #ecfdf5;
}

/* Loading State */
body.light-mode #modal-login .btn_submit:disabled {
  background-color: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

body.light-mode #modal-login .btn_submit.loading {
  position: relative;
  color: transparent;
}

body.light-mode #modal-login .btn_submit.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Helper Text */
body.light-mode #modal-login .helper-text {
  font-size: 12px;
  margin-top: 6px;
  display: block;
}

body.light-mode #modal-login .helper-text.error {
  color: #dc2626;
}

body.light-mode #modal-login .helper-text.success {
  color: #059669;
}

/* Remember Me Checkbox (if added) */
body.light-mode #modal-login .remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

body.light-mode #modal-login .remember-me input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #3b82f6;
}

body.light-mode #modal-login .remember-me label {
  font-size: 14px;
  color: #4b5563;
  cursor: pointer;
}

/* Forgot Password Link (if inline) */
body.light-mode #modal-login .forgot-password {
  text-align: right;
  margin-bottom: 20px;
}

body.light-mode #modal-login .forgot-password a {
  font-size: 13px;
  color: #3b82f6;
  text-decoration: none;
}

body.light-mode #modal-login .forgot-password a:hover {
  text-decoration: underline;
  color: #2563eb;
}

/* Mobile Responsive */
@media screen and (max-width: 767px) {
  body.light-mode #modal-login .modal__inner {
    max-width: calc(100% - 32px);
    padding: 24px 20px;
  }

  body.light-mode #modal-login .modal__header h3 {
    font-size: 20px;
  }

  body.light-mode #modal-login .modal__header p {
    font-size: 13px;
  }

  body.light-mode #modal-login input[type="email"],
  body.light-mode #modal-login input[type="password"] {
    padding: 10px 14px;
    font-size: 14px;
  }

  body.light-mode #modal-login .btn_submit {
    height: 44px;
    font-size: 15px;
  }

  body.light-mode #modal-login .Etc {
    flex-direction: column;
  }

  body.light-mode #modal-login .Etc a {
    width: 100%;
  }

  body.light-mode #modal-login .modal__btns.end:last-child {
    flex-direction: column;
  }

  body.light-mode #modal-login .btn_outline_brand {
    width: 100% !important;
  }
}

/* Tablet */
@media screen and (min-width: 768px) and (max-width: 1024px) {
  body.light-mode #modal-login .modal__inner {
    max-width: 440px;
  }
}

/* Accessibility */
body.light-mode #modal-login input:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

body.light-mode #modal-login .btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Animation */
body.light-mode #modal-login.open {
  animation: fadeIn 0.3s ease;
}

body.light-mode #modal-login.open .modal__inner {
  animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translate(-50%, -45%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, -50%);
    opacity: 1;
  }
}

/* Smooth Transitions */
body.light-mode #modal-login * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body.light-mode #modal-login input,
body.light-mode #modal-login .btn {
  transition: all 0.2s ease;
}

/* Focus State Enhancement */
body.light-mode #modal-login input:focus,
body.light-mode #modal-login .btn:focus {
  position: relative;
  z-index: 1;
}

/* Security Badge (optional) */
body.light-mode #modal-login .security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  background-color: #f9fafb;
  border-radius: 6px;
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
}

body.light-mode #modal-login .security-badge::before {
  content: '🔒';
  font-size: 14px;
}

/* Alternative Social Login Layout */
body.light-mode #modal-login .Etc.vertical {
  flex-direction: column;
  gap: 12px;
}

body.light-mode #modal-login .Etc.vertical a {
  width: 100%;
}


/* ======================
   Coin Table Border - Light/Dark Mode
   ====================== */

/* Dark Mode (default) */
.coin_table_td_line {
  border-color: #323546 !important;
}

/* Light Mode */
body.light-mode .coin_table_td_line {
  border-color: #e5e7eb !important;
}