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

body {
  font-family: SFProText-Regular, Helvetica, Arial, sans-serif;
  background-color: #f0f2f5;
  color: #1c1e21;
  line-height: 1.34;
  min-height: 100vh;
}

.fb-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.fb-content {
  display: flex;
  align-items: center;
  max-width: 980px;
  width: 100%;
  gap: 100px;
}

.fb-left {
  flex: 1;
  max-width: 580px;
}

.fb-logo {
  color: #1877f2;
  font-size: 64px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 16px;
  font-family: Klavika-Medium, sans-serif;
}

.fb-tagline {
  color: #1c1e21;
  font-size: 28px;
  font-weight: normal;
  line-height: 32px;
  width: 500px;
}

.fb-right {
  flex: 1;
  max-width: 396px;
}

.fb-login-box {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 8px 16px rgba(0,0,0,.1);
  padding: 20px;
  width: 100%;
}

.fb-input {
  background: #f5f6f7;
  border: 1px solid #dddfe2;
  border-radius: 6px;
  color: #1d2129;
  font-size: 17px;
  padding: 14px 16px;
  width: 100%;
  margin-bottom: 12px;
  line-height: 16px;
}

.fb-input:focus {
  background: white;
  border-color: #1877f2;
  box-shadow: 0 0 0 2px #e7f3ff;
  outline: none;
}

.fb-input::placeholder {
  color: #90949c;
}

.fb-login-btn {
  background: #1877f2;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 20px;
  font-weight: bold;
  padding: 12px;
  width: 100%;
  cursor: pointer;
  margin-bottom: 16px;
  transition: background-color 0.1s;
}

.fb-login-btn:hover {
  background: #166fe5;
}

.fb-forgot {
  color: #1877f2;
  font-size: 14px;
  text-decoration: none;
  text-align: center;
  display: block;
  margin-bottom: 16px;
}

.fb-forgot:hover {
  text-decoration: underline;
}

.fb-divider {
  border-top: 1px solid #dadde1;
  margin: 20px 16px;
}

.fb-create-btn {
  background: #42b883;
  border: none;
  border-radius: 6px;
  color: white;
  font-size: 17px;
  font-weight: bold;
  padding: 12px 16px;
  cursor: pointer;
  display: block;
  margin: 0 auto;
  transition: background-color 0.1s;
}

.fb-create-btn:hover {
  background: #36a420;
}

.fb-create-page {
  color: #1c1e21;
  font-size: 14px;
  font-weight: normal;
  margin-top: 28px;
  text-align: center;
}

.fb-create-page a {
  color: #1c1e21;
  font-weight: 600;
  text-decoration: none;
}

.fb-create-page a:hover {
  text-decoration: underline;
}

.error-message {
  color: #f02849;
  font-size: 13px;
  margin-top: 5px;
  margin-bottom: 5px;
  display: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.bedtime-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.bedtime-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 8px;
  max-width: 450px;
  width: 100%;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.bedtime-modal.show .modal-content {
  transform: translateY(0);
}

.modal-close-button {
  background-color: #1877F2;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  min-width: 180px;
  margin-top: 10px;
}

.modal-close-button:hover {
  background-color: #166FE5;
}

.modal-close-button:disabled {
  background: #e4e6ea;
  color: #bcc0c4;
  cursor: not-allowed;
}

.trusted-contacts-shield {
  margin-top: 32px;
  padding: 20px;
  background: linear-gradient(135deg, #e3f2fd 0%, #f0f8ff 100%);
  border-radius: 12px;
  border-left: 4px solid #1877f2;
  box-shadow: 0 2px 8px rgba(24, 119, 242, 0.1);
}

.shield-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.shield-icon {
  margin-right: 12px;
  flex-shrink: 0;
}

.shield-title {
  color: #1877f2;
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.shield-description {
  color: #1c1e21;
  font-size: 14px;
  line-height: 1.4;
  margin: 0;
}

a {
  text-decoration: none;
  color: #1877F2;
}

a:hover {
  text-decoration: underline;
}

#checking-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: #f0f2f5;
  z-index: 9999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#checking-overlay.show {
  display: flex;
}

.check-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,.1), 0 8px 24px rgba(0,0,0,.12);
  padding: 48px 40px 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.check-fb-logo {
  color: #1877f2;
  font-size: 36px;
  font-weight: bold;
  margin-bottom: 32px;
  font-family: Klavika-Medium, sans-serif;
  letter-spacing: -1px;
}

.spinner-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 28px;
}

.spinner-ring {
  position: absolute;
  inset: -10px;
  border: 3px solid #e7f0fd;
  border-top: 3px solid #1877f2;
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

.spinner-inner {
  width: 72px;
  height: 72px;
  background: #e3f2fd;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.check-title {
  font-size: 20px;
  font-weight: 700;
  color: #1c1e21;
  margin-bottom: 10px;
  line-height: 1.3;
}

.check-subtitle {
  font-size: 14px;
  color: #65676b;
  line-height: 1.6;
  margin-bottom: 30px;
}

.progress-track {
  background: #e4e6ea;
  border-radius: 10px;
  height: 5px;
  overflow: hidden;
  margin-bottom: 14px;
}

.progress-fill {
  height: 100%;
  background: #1877f2;
  border-radius: 10px;
  width: 0%;
  transition: width 0.35s ease;
}

.countdown-line {
  font-size: 13px;
  color: #65676b;
  margin-bottom: 28px;
  min-height: 20px;
}

.countdown-line strong {
  color: #1877f2;
  font-weight: 600;
}

.notice {
  padding: 14px 16px;
  background: #f0f2f5;
  border-radius: 8px;
  font-size: 13px;
  color: #65676b;
  line-height: 1.6;
  text-align: left;
}

.notice p { margin: 0; }
.notice p + p { margin-top: 6px; }
.notice strong { color: #1c1e21; font-weight: 600; }

.footer-note {
  margin-top: 24px;
  font-size: 12px;
  color: #8a8d91;
}

@media (max-width: 898px) {
  .fb-content { flex-direction: column; gap: 40px; text-align: center; }
  .fb-left { max-width: none; }
  .fb-tagline { width: auto; font-size: 24px; line-height: 28px; }
  .fb-logo { font-size: 56px; }
  .trusted-contacts-shield { margin-top: 24px; padding: 16px; text-align: left; }
  .shield-title { font-size: 15px; }
  .shield-description { font-size: 13px; }
}

@media (max-width: 580px) {
  .fb-container { padding: 16px; }
  .fb-login-box { padding: 16px; }
  .fb-logo { font-size: 48px; }
  .fb-tagline { font-size: 20px; line-height: 24px; }
  .trusted-contacts-shield { margin-top: 20px; padding: 14px; }
  .shield-header { margin-bottom: 8px; }
  .shield-icon { margin-right: 8px; }
  .shield-title { font-size: 14px; }
  .shield-description { font-size: 12px; line-height: 1.3; }
}
