/* ==============================================================================
   Read and Grow Lab - Interactive Audiobooks
   Auth Landing Page Styles (login.css)
   ============================================================================== */

:root {
  --daisy-green: #3B7A57;
  --daisy-green-hover: #4E9A70;
  --daisy-green-dark: #255239;
  --daisy-green-soft: #F0F7F4;
  --daisy-green-line: #B7E4C7;
  --daisy-bg: #f5f6f8;
  --daisy-card: #ffffff;
  --daisy-text: #181818;
  --daisy-subtext: #4a4a4d;
  --daisy-muted: #78787c;
  --daisy-line: #e9ecef;
  --shadow-sm: 0 4px 12px rgba(24, 32, 36, 0.04);
  --shadow-md: 0 12px 28px rgba(24, 32, 36, 0.08);
  --shadow-lg: 0 20px 48px rgba(24, 32, 36, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  background: var(--daisy-bg);
  color: var(--daisy-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 16px;
}

.landing-container {
  max-width: 1080px;
  width: 100%;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid var(--daisy-line);
  border-radius: 32px;
  padding: 44px;
  box-shadow: var(--shadow-lg);
}

/* Left: Hero Intro */
.hero-info {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 16px;
}

.hero-brand-wrapper {
  display: block;
  margin-bottom: 2px;
}

.hero-description-wrapper {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.hero-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #eafaf1;
  border: 1.5px solid #bbf7d0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(59, 122, 87, 0.16);
  overflow: hidden;
  flex-shrink: 0;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-title,
.site-brand-title,
#siteBrandTitle {
  font-family: 'Plus Jakarta Sans', 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-style: normal !important;
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: #19383b !important;
  letter-spacing: -0.025em !important;
  line-height: 1.1 !important;
  margin: 0;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.brand-title .brand-main,
.site-brand-title .brand-main,
#siteBrandTitle .brand-main {
  color: #19383b;
}

.brand-title .brand-and,
.brand-title .brand-main .brand-and,
.site-brand-title .brand-and,
.site-brand-title .brand-main .brand-and,
#siteBrandTitle .brand-and,
#siteBrandTitle .brand-main .brand-and {
  color: #7a9c84;
  font-weight: 700;
  margin: 0 0.28em;
}

.brand-title .brand-sub-tag,
.site-brand-title .brand-sub-tag,
#siteBrandTitle .brand-sub-tag {
  font-family: 'Montserrat', 'Plus Jakarta Sans', sans-serif !important;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: #19383b;
  margin-left: 0.5em;
}

.hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #334155;
  line-height: 1.4;
  margin: 2px 0 0 0;
}

.hero-title span {
  color: var(--daisy-green-dark);
}

.hero-desc {
  font-size: 0.98rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 13px 16px;
  transition: all 0.2s ease;
}

.feature-item:hover {
  border-color: var(--daisy-green-line);
  background: #f0fdf4;
  transform: translateX(4px);
}

.feature-icon {
  font-size: 1.35rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.feature-text strong,
.feature-text h2 {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 2px 0;
}

.feature-text p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

/* Right: Auth Card */
.auth-box {
  background: #ffffff;
  border: 1px solid var(--daisy-line);
  border-radius: 24px;
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.auth-tabs-row {
  display: flex;
  background: #f1f5f9;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 22px;
  flex-shrink: 0;
}

.auth-tab-btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #64748b;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab-btn.active {
  background: #ffffff;
  color: var(--daisy-green-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

#viewLogin,
#viewSignup,
#viewForgot {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.input-group label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.input-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 14.5px;
  color: #0f172a;
  outline: none;
  transition: all 0.15s ease;
}

.input-group input:focus {
  border-color: var(--daisy-green);
  box-shadow: 0 0 0 3px rgba(59, 122, 87, 0.18);
}

.btn-auth-submit {
  background: linear-gradient(135deg, var(--daisy-green) 0%, var(--daisy-green-dark) 100%);
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  padding: 13px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(59, 122, 87, 0.28);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-auth-submit:hover {
  background: linear-gradient(135deg, var(--daisy-green-hover) 0%, var(--daisy-green-dark) 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(59, 122, 87, 0.35);
}

.auth-social-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 14px;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 600;
}
.auth-social-divider::before,
.auth-social-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.social-btn-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.btn-social-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-naver-auth {
  background: #03c75a;
  color: #ffffff;
}
.btn-naver-auth:hover { background: #02b350; }

.btn-google-auth {
  background: #ffffff;
  color: #374151;
  border-color: #e5e7eb;
}
.btn-google-auth:hover {
  background: #f9fafb;
  border-color: #cbd5e1;
}

.forgot-link {
  font-size: 12.5px;
  color: var(--daisy-green-dark);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}
.forgot-link:hover {
  color: var(--daisy-green-hover);
  text-decoration: underline;
}

.back-btn-row {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

@media (max-width: 900px) {
  body {
    padding: 10px 8px;
    justify-content: flex-start;
  }
  .landing-container {
    display: flex;
    flex-direction: column;
    padding: 14px 14px 18px 14px;
    gap: 8px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
  }
  .hero-info {
    display: contents;
  }
  .hero-brand-wrapper {
    order: 1;
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0;
  }
  .hero-brand {
    justify-content: center;
    gap: 10px;
  }
  .hero-logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .site-brand-title .brand-main,
  #siteBrandTitle .brand-main,
  .brand-title .brand-main {
    font-size: 1.4rem;
  }
  .site-brand-title .brand-sub-tag,
  #siteBrandTitle .brand-sub-tag,
  .brand-title .brand-sub-tag {
    font-size: 0.58rem;
    letter-spacing: 0.35em;
  }
  .auth-box {
    order: 2;
    width: 100%;
    padding: 14px 14px 16px 14px;
    border-radius: 16px;
    box-shadow: none;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
  }
  .auth-tabs-row {
    padding: 3px;
    margin-bottom: 10px;
    border-radius: 10px;
  }
  .auth-tab-btn {
    padding: 7px;
    font-size: 13px;
    border-radius: 8px;
  }
  .form-col {
    gap: 9px;
  }
  .input-group {
    gap: 3px;
  }
  .input-group label {
    font-size: 12px;
  }
  .input-group input {
    padding: 8px 12px;
    font-size: 13.5px;
    border-radius: 10px;
  }
  .btn-auth-submit {
    padding: 10px;
    font-size: 14px;
    border-radius: 10px;
    margin-top: 2px;
  }
  .auth-social-divider {
    margin: 9px 0 7px;
    font-size: 11.5px;
  }
  .social-btn-col {
    gap: 6px;
  }
  .btn-social-auth {
    padding: 8px 12px;
    font-size: 12.5px;
    border-radius: 10px;
  }
  .hero-description-wrapper {
    order: 3;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--daisy-line);
  }
  .hero-title {
    font-size: 1.15rem;
  }
  .hero-desc {
    font-size: 0.88rem;
  }
  .feature-list {
    gap: 9px;
  }
  .feature-item {
    padding: 10px 12px;
    border-radius: 12px;
    gap: 10px;
  }
  .feature-icon {
    font-size: 1.15rem;
  }
  .feature-text strong,
  .feature-text h2 {
    font-size: 0.88rem;
  }
  .feature-text p {
    font-size: 0.80rem;
  }
}

/* =========================================================================
   Kids Friendly Visual Picture Login Styles
   ========================================================================= */
.kids-mode-switch {
  display: flex;
  background: #e2e8f0;
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
  gap: 4px;
}
.kids-mode-btn {
  flex: 1;
  padding: 10px 14px;
  font-size: 14.5px;
  font-weight: 800;
  border: none;
  background: transparent;
  border-radius: 12px;
  cursor: pointer;
  color: #64748b;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.kids-mode-btn.active {
  background: #ffffff;
  color: #0369a1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}
.kids-mode-btn.active.adult-mode {
  color: var(--daisy-green-dark);
}

/* Students List View */
.kids-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 2px;
}
.kid-list-item-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}
.kid-list-item-btn:hover {
  border-color: #38bdf8;
  background: #f0f9ff;
  transform: translateX(4px);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.12);
}
.kid-list-item-btn:active {
  transform: scale(0.98);
}
.kid-list-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.kid-list-avatar {
  font-size: 32px;
  line-height: 1;
}
.kid-list-name {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}
.kid-list-arrow {
  font-size: 16px;
  color: #94a3b8;
  font-weight: 800;
  transition: transform 0.18s ease, color 0.18s ease;
}
.kid-list-item-btn:hover .kid-list-arrow {
  color: #0284c7;
  transform: translateX(3px);
}

/* Visual Picture Password Pad */
.pic-password-container {
  background: #f8fafc;
  border: 2px solid #e0f2fe;
  border-radius: 20px;
  padding: 18px 16px;
  text-align: center;
  animation: fadeIn 0.25s ease;
}
.pic-selected-slots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
  min-height: 54px;
}
.pic-slot {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #ffffff;
  border: 2px dashed #94a3b8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.pic-slot.filled {
  border: 2px solid #0284c7;
  background: #e0f2fe;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.2);
  animation: popIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', 'Montserrat', -apple-system, sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0369a1;
}

.pic-pad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0 16px;
}
.pic-key-btn {
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 16px;
  padding: 12px 6px;
  font-size: 32px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
}
.pic-key-btn:hover {
  border-color: #0284c7;
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(2, 132, 199, 0.18);
}
.pic-key-btn:active {
  transform: scale(0.92);
}
.pic-key-label {
  font-size: 11px;
  font-weight: 800;
  color: #475569;
}

/* Capital Alphabet Letter Keypad Buttons */
.letter-key-btn {
  min-height: 72px;
  padding: 10px 4px;
  justify-content: center;
  background: #ffffff;
  border: 2px solid #cbd5e1;
  border-radius: 16px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
}
.letter-key-btn .letter-char {
  font-family: 'Plus Jakarta Sans', 'Montserrat', -apple-system, sans-serif;
  font-size: 32px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
  user-select: none;
  transition: color 0.15s ease, transform 0.15s ease;
}
.letter-key-btn:hover .letter-char {
  color: #0284c7;
  transform: scale(1.08);
}
.letter-key-btn:active .letter-char {
  color: #0369a1;
}

@keyframes popIn {
  0% { transform: scale(0.6); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   Login Page Footer & Legal Terms Modal
   ============================================================================== */
.login-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.login-footer a {
  color: #475569;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s ease;
  cursor: pointer;
}
.login-footer a:hover {
  color: var(--daisy-green-dark);
}
.footer-divider {
  color: #cbd5e1;
  user-select: none;
}

/* Modal Overlay & Card */
.legal-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.legal-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}
.legal-modal-card {
  background: #ffffff;
  border-radius: 20px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  animation: modalScaleUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.legal-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.legal-modal-close {
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.legal-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.legal-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.7;
  color: #334155;
  word-break: keep-all;
}
.legal-modal-body h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 16px 0 6px;
}
.legal-modal-body h4:first-child {
  margin-top: 0;
}
.legal-modal-body p {
  margin: 0 0 10px;
}
.legal-modal-body ul {
  margin: 0 0 12px 18px;
  padding: 0;
}
.legal-modal-body li {
  margin-bottom: 4px;
}
.legal-modal-footer {
  padding: 14px 24px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
}
.legal-modal-btn-close {
  background: #3B7A57;
  color: #ffffff;
  border: none;
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.legal-modal-btn-close:hover {
  background: #255239;
}
@keyframes modalScaleUp {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
