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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #000000;
  color: #ffffff;
}

.split-container {
  display: flex;
  min-height: 100vh;
}

.left-panel,
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 80px;
  position: relative;
}

.left-panel {
  border-right: 1px solid #262626;
}

/* ---------- Left panel ---------- */

.ig-logo-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 44px;
}

.headline {
  font-size: 2.15rem;
  font-weight: 400;
  line-height: 1.35;
  max-width: 520px;
  margin-bottom: 56px;
}

.gradient-text {
  background: linear-gradient(90deg, #fa7e1e, #d62976);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 500;
}

.period {
  color: #fff;
}

.collage {
  position: relative;
  width: 420px;
  height: 320px;
}

.photo-card {
  position: absolute;
  width: 210px;
  height: 270px;
  object-fit: cover;
  border-radius: 18px;
  border: 6px solid #0d0d0d;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.card-back {
  left: 40px;
  top: 20px;
  transform: rotate(-9deg);
  z-index: 1;
}

.card-front {
  left: 150px;
  top: 0;
  transform: rotate(6deg);
  z-index: 2;
}

.reaction-bubble {
  position: absolute;
  top: 0;
  left: 0;
  background: #262626;
  border-radius: 20px;
  padding: 8px 14px;
  font-size: 18px;
  display: flex;
  gap: 4px;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.heart-badge {
  position: absolute;
  bottom: 30px;
  left: 10px;
  width: 34px;
  height: 34px;
  background: #1a1a1a;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.heart-badge svg {
  width: 18px;
  height: 18px;
}

.star-badge {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: #3ec95d;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.star-badge svg {
  width: 16px;
  height: 16px;
  position: absolute;
}

.star-badge .check {
  width: 12px;
  height: 12px;
  right: -4px;
  bottom: -4px;
  background: #3ec95d;
  border-radius: 50%;
}

.progress-pill {
  position: absolute;
  bottom: 25px;
  right: 30px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 20px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 3;
}

.progress-pill .bar {
  width: 60px;
  height: 4px;
  background: #fff;
  border-radius: 2px;
}

.progress-pill svg {
  width: 16px;
  height: 16px;
}

/* ---------- Right panel ---------- */

.back-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.back-row svg {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.back-row h2 {
  font-size: 1.1rem;
  font-weight: 600;
}

#loginForm {
  display: flex;
  flex-direction: column;
  width: 350px;
}

.input-group {
  margin-bottom: 12px;
}

.input-group input {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  background: #000;
  border: 1px solid #363636;
  border-radius: 8px;
  color: #fff;
  outline: none;
}

.input-group input::placeholder {
  color: #8e8e8e;
}

.input-group input:focus {
  border-color: #6b6b6b;
}

.login-btn {
  margin-top: 6px;
  background: #234b6e;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.login-btn:disabled {
  background: #16324a;
  color: rgba(255, 255, 255, 0.6);
  cursor: default;
}

.login-btn:not(:disabled):hover {
  background: #2c5a85;
}

.forgot-link {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  margin: 22px 0 26px;
}

.forgot-link:hover {
  color: #dbdbdb;
}

.fb-login,
.signup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  border: 1px solid #363636;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  margin-bottom: 12px;
}

.fb-login svg {
  width: 18px;
  height: 18px;
}

.signup-btn {
  border: 1px solid #0095f6;
  color: #0095f6;
  margin-bottom: 0;
}

.meta-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 60px;
  color: #8e8e8e;
  font-size: 13px;
  font-weight: 600;
}

.meta-logo svg {
  width: 24px;
  height: 12px;
}

.mobile-only {
  display: none;
}

.mobile-topbar {
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  margin-bottom: 40px;
}

.back-chevron {
  width: 18px;
  height: 18px;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
}

.lang-select {
  font-size: 14px;
  color: #a8a8a8;
}

.mobile-logo {
  width: 88px;
  height: 88px;
  margin: 0 auto 44px;
}

@media (max-width: 900px) {
  body {
    background: #1c1f26;
  }

  .left-panel {
    display: none;
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: flex;
  }

  .right-panel {
    padding: 24px 24px 40px;
    align-items: center;
  }

  #loginForm {
    width: 100%;
    max-width: 340px;
  }

  .input-group input {
    border-radius: 27px;
    padding: 15px 20px;
    border-color: #3a3d45;
  }

  .login-btn {
    border-radius: 27px;
    background: #0095f6;
    padding: 15px;
  }

  .login-btn:disabled {
    background: #0095f6;
    opacity: 0.4;
    color: #fff;
  }

  .login-btn:not(:disabled):hover {
    background: #1a86d9;
  }

  .signup-btn {
    border-radius: 27px;
    border-color: #0095f6;
  }

  .forgot-link {
    margin: 22px 0 40px;
  }

  .meta-logo {
    justify-content: center;
    margin-top: 40px;
  }
}

/* ---------- Error popup ---------- */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 100;
}

.popup-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.popup {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #363636;
  border-radius: 16px;
  padding: 40px 32px 32px;
  width: 340px;
  max-width: calc(100vw - 32px);
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}

.popup-overlay.show .popup {
  transform: translateY(0) scale(1);
}

.popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: #8e8e8e;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.popup-close:hover {
  color: #fff;
}

.popup-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
}

.popup-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.popup-text {
  font-size: 13px;
  color: #a8a8a8;
  line-height: 1.5;
  margin-bottom: 24px;
}

.login-again-btn {
  width: 100%;
  background: #0095f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.login-again-btn:hover {
  background: #1a86d9;
}
