/* ===================================
   RESET & BASE STYLES
   =================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===================================
   CONTAINER UTAMA (PUSAT BACKGROUND & EFEK)
   =================================== */
.container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
}

/* --- EFEK GELEMBUNG --- */
.container::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0 1);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.container::after {
  content: "";
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 900px;
  height: 900px;
  background: linear-gradient(
    135deg,
    rgba(135, 206, 235, 0.3) 0%,
    rgba(100, 180, 220, 0.2) 100%
  );
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  z-index: 0;
  animation: wave 8s ease-in-out infinite;
  pointer-events: none;
}

.bubble-left {
  position: absolute;
  width: 900px;
  height: 900px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  top: 50%;
  left: -150px;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
  animation: wave 8s ease-in-out infinite;
}

.bubble-left::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
  top: -100px;
  left: 50px;
}

@keyframes wave {
  0%,
  100% {
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    transform: rotate(0deg);
  }
  50% {
    border-radius: 50% 50% 30% 70% / 50% 60% 40% 50%;
    transform: rotate(5deg);
  }
}

/* ===================================
   BAGIAN KIRI - SELAMAT DATANG
   =================================== */
.left-section {
  flex: 1;
  background: transparent;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 80px 60px;
  z-index: 2;
}

/* Logo */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.logo-anak img {
  position: relative;
  width: 300px;
  height: 300px;
  animation: float 3s ease-in-out infinite;
  z-index: 2;
  margin-bottom: 30px;
  object-fit: contain;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Teks Sambutan */
.welcome-title {
  font-size: 52px;
  font-weight: 700;
  color: white;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
  line-height: 1.2;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}

.welcome-subtitle {
  font-size: 18px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  position: relative;
  z-index: 2;
  max-width: 450px;
}

/* ===================================
   BAGIAN KANAN - FORM LOGIN
   =================================== */
.right-section {
  flex: 1;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  position: relative;
  z-index: 2;
}

/* Card Login */
.login-card {
  background: white;
  border-radius: 24px;
  padding: 50px 45px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Judul Login */
.login-title {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  color: #2c3e50;
  margin-bottom: 35px;
}

/* Form Styling */
.login-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 20px;
}

.form-input {
  width: 100%;
  padding: 15px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 15px;
  font-family: "Poppins", sans-serif;
  transition: all 0.3s ease;
  outline: none;
}

.form-input:focus {
  border-color: #0066ff;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.form-input::placeholder {
  color: #999;
}

/* Password Group */
.password-group {
  position: relative;
}

.password-group .form-input {
  padding-right: 50px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  padding: 5px;
  transition: all 0 3s ease;
}

.toggle-password i {
  font-size: 18px;
  color: #9ca3af;
  transition: color 0.3s ease;
}

.toggle-password:hover i {
  color: #0066ff;
}

/* Link Lupa Password */
.forgot-password {
  text-align: right;
  margin-bottom: 25px;
}

.forgot-link {
  color: #2c3e50;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-link:hover {
  color: #0066ff;
}

/* Tombol Login */
.btn-login {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
  margin-bottom: 20px;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-login:active {
  transform: translateY(0);
}

/* Link Daftar */
.register-link {
  text-align: center;
  font-size: 14px;
  color: #5f6368;
}

.register-link-text {
  color: #0066ff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0 3s ease;
}

.register-link-text:hover {
  color: #0052cc;
  text-decoration: underline;
}

/* ===================================
   MODAL STYLES
   =================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
  padding: 20px;
}

.modal-box {
  background: white;
  padding: 40px;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleUp 0 3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  transition: color 0 3s;
  background: none;
  border: none;
}

.close-btn:hover {
  color: #333;
}

/* Modal Icon */
.modal-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.modal-icon i {
  font-size: 36px;
  color: white;
}

.modal-icon.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.modal-box h3 {
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 10px;
  font-weight: 600;
}

.modal-box p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Form dalam Modal */
.modal-box .form-group {
  margin-bottom: 15px;
  text-align: left;
}

.modal-box .form-input {
  width: 100%;
  padding: 14px 16px;
  background-color: #f9fafb;
  border: 1 5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: "Poppins", sans-serif;
  color: #111827;
  transition: all 0 3s ease;
  outline: none;
}

.modal-box .form-input:focus {
  background-color: #fff;
  border-color: #0066ff;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* OTP Inputs */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.otp-field {
  width: 55px;
  height: 55px;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: #1f2937;
  outline: none;
  transition: all 0.3s;
  font-family: "Poppins", sans-serif;
}

.otp-field:focus {
  border-color: #0066ff;
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* Buttons */
.btn-verify {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0 3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Poppins", sans-serif;
}

.btn-verify:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 102, 255, 0.3);
}

.btn-verify.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-verify.btn-success:hover {
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0 3);
}

/* Resend Code */
.resend-code {
  margin-top: 20px;
  font-size: 13px;
  color: #6b7280;
}

.resend-code a {
  color: #0066ff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.resend-code a:hover {
  text-decoration: underline;
}

.resend-code a.disabled {
  color: #9ca3af;
  pointer-events: none;
}

#resendForgotTimer {
  color: #6b7280;
  margin-left: 5px;
}

/* Back to Login */
.back-to-login {
  margin-top: 20px;
}

.back-to-login a {
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s;
}

.back-to-login a:hover {
  color: #0066ff;
}

/* Password Strength Indicator */
.password-strength {
  height: 4px;
  border-radius: 2px;
  margin-top: -10px;
  margin-bottom: 15px;
  transition: all 0 3s;
}

.password-strength.weak {
  background: linear-gradient(to right, #ef4444 0%, #ef4444 33%, #e5e7eb 33%);
}

.password-strength.medium {
  background: linear-gradient(to right, #f59e0b 0%, #f59e0b 66%, #e5e7eb 66%);
}

.password-strength.strong {
  background: linear-gradient(to right, #10b981 0%, #10b981 100%);
}

/* Password Group in Modal */
.modal-box .password-group {
  position: relative;
}

.modal-box .password-group .form-input {
  padding-right: 50px;
}

.modal-box .toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  padding: 5px;
}

.modal-box .toggle-password i {
  font-size: 18px;
  color: #9ca3af;
  transition: color 0.3s;
}

.modal-box .toggle-password:hover i {
  color: #0066ff;
}

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

@keyframes scaleUp {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

/* Large Desktop (1400px ke atas) */
@media (min-width: 1400px) {
  .welcome-title {
    font-size: 58px;
  }

  .welcome-subtitle {
    font-size: 20px;
    max-width: 500px;
  }

  .logo-anak img {
    width: 350px;
    height: 350px;
  }

  .login-card {
    padding: 60px 55px;
    max-width: 480px;
  }
}

/* Laptop / Desktop Kecil (1024px - 1199px) */
@media (max-width: 1199px) {
  .left-section {
    padding: 60px 40px;
  }

  .welcome-title {
    font-size: 44px;
  }

  .welcome-subtitle {
    font-size: 16px;
  }

  .logo-anak img {
    width: 250px;
    height: 250px;
  }

  .login-card {
    padding: 40px 35px;
  }

  .login-title {
    font-size: 28px;
  }
}

/* Tablet Landscape (992px - 1023px) */
@media (max-width: 1023px) {
  .container {
    flex-direction: column;
    overflow-y: auto;
  }

  .left-section {
    flex: none;
    padding: 40px 30px;
    align-items: center;
    text-align: center;
  }

  .welcome-title {
    font-size: 36px;
    text-align: center;
  }

  .welcome-subtitle {
    font-size: 15px;
    text-align: center;
    max-width: 500px;
  }

  .logo-anak img {
    width: 200px;
    height: 200px;
    margin-bottom: 20px;
  }

  .right-section {
    flex: none;
    padding: 30px;
    padding-bottom: 60px;
  }

  .login-card {
    max-width: 450px;
  }

  /* Sembunyikan beberapa efek bubble untuk performa */
  .bubble-left {
    width: 600px;
    height: 600px;
    left: -200px;
    top: 30%;
  }

  .container::before {
    width: 400px;
    height: 400px;
    top: -5%;
    right: -15%;
  }

  .container::after {
    width: 600px;
    height: 600px;
    bottom: -10%;
  }
}

/* Tablet Portrait (768px - 991px) */
@media (max-width: 991px) {
  .left-section {
    padding: 35px 25px;
  }

  .welcome-title {
    font-size: 32px;
    margin-bottom: 15px;
  }

  .welcome-subtitle {
    font-size: 14px;
  }

  .logo-anak img {
    width: 180px;
    height: 180px;
  }

  .login-card {
    padding: 35px 30px;
  }

  .login-title {
    font-size: 26px;
    margin-bottom: 25px;
  }

  .form-input {
    padding: 13px 18px;
    font-size: 14px;
  }

  .btn-login {
    padding: 13px;
    font-size: 15px;
  }
}

/* Mobile Landscape / Large Mobile (576px - 767px) */
@media (max-width: 767px) {
  .container {
    min-height: 100vh;
    height: auto;
  }

  .left-section {
    padding: 30px 20px;
  }

  .welcome-title {
    font-size: 28px;
  }

  .welcome-subtitle {
    font-size: 13px;
    max-width: 100%;
  }

  .logo-anak img {
    width: 150px;
    height: 150px;
    margin-bottom: 15px;
  }

  .right-section {
    padding: 20px;
    padding-bottom: 40px;
  }

  .login-card {
    padding: 30px 25px;
    border-radius: 20px;
  }

  .login-title {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .form-group {
    margin-bottom: 15px;
  }

  .forgot-password {
    margin-bottom: 20px;
  }

  /* Bubble adjustments */
  .bubble-left {
    width: 400px;
    height: 400px;
    left: -150px;
    top: 20%;
  }

  .bubble-left::after {
    width: 300px;
    height: 300px;
  }

  .container::before {
    width: 300px;
    height: 300px;
  }

  .container::after {
    width: 400px;
    height: 400px;
  }

  /* Modal adjustments */
  .modal-box {
    padding: 30px 25px;
    margin: 15px;
  }

  .modal-icon {
    width: 70px;
    height: 70px;
  }

  .modal-icon i {
    font-size: 30px;
  }

  .modal-box h3 {
    font-size: 20px;
  }

  .otp-field {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .otp-inputs {
    gap: 10px;
  }
}

/* Mobile Portrait (480px ke bawah) */
@media (max-width: 480px) {
  body {
    overflow-x: hidden;
  }

  .container {
    min-height: 100vh;
  }

  .left-section {
    padding: 25px 15px;
  }

  .welcome-title {
    font-size: 24px;
    line-height: 1.3;
  }

  .welcome-subtitle {
    font-size: 12px;
    line-height: 1.5;
  }

  .logo-anak img {
    width: 120px;
    height: 120px;
    margin-bottom: 10px;
  }

  .right-section {
    padding: 15px;
    padding-bottom: 30px;
  }

  .login-card {
    padding: 25px 20px;
    border-radius: 16px;
  }

  .login-title {
    font-size: 22px;
    margin-bottom: 18px;
  }

  .form-input {
    padding: 12px 15px;
    font-size: 14px;
    border-radius: 8px;
  }

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

  .forgot-password {
    margin-bottom: 18px;
  }

  .forgot-link {
    font-size: 12px;
  }

  .btn-login {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  .register-link {
    font-size: 13px;
  }

  .toggle-password {
    right: 12px;
  }

  .toggle-password i {
    font-size: 16px;
  }

  /* Sembunyikan bubble untuk layar kecil */
  .bubble-left {
    width: 300px;
    height: 300px;
    left: -100px;
    opacity: 0 5;
  }

  .bubble-left::after {
    display: none;
  }

  .container::before {
    width: 200px;
    height: 200px;
    opacity: 0.5;
  }

  .container::after {
    width: 300px;
    height: 300px;
    opacity: 0.5;
  }

  /* Modal adjustments */
  .modal-overlay {
    padding: 10px;
  }

  .modal-box {
    padding: 25px 18px;
    border-radius: 16px;
  }

  .close-btn {
    top: 10px;
    right: 15px;
    font-size: 22px;
  }

  .modal-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
  }

  .modal-icon i {
    font-size: 26px;
  }

  .modal-box h3 {
    font-size: 18px;
  }

  .modal-box p {
    font-size: 13px;
    margin-bottom: 20px;
  }

  .otp-inputs {
    gap: 8px;
  }

  .otp-field {
    width: 45px;
    height: 45px;
    font-size: 18px;
    border-radius: 10px;
  }

  .btn-verify {
    padding: 12px;
    font-size: 14px;
    border-radius: 8px;
  }

  .resend-code {
    font-size: 12px;
  }

  .back-to-login a {
    font-size: 13px;
  }
}

/* Extra Small Mobile (360px ke bawah) */
@media (max-width: 360px) {
  .left-section {
    padding: 20px 12px;
  }

  .welcome-title {
    font-size: 20px;
  }

  .welcome-subtitle {
    font-size: 11px;
  }

  .logo-anak img {
    width: 100px;
    height: 100px;
  }

  .right-section {
    padding: 12px;
  }

  .login-card {
    padding: 20px 15px;
  }

  .login-title {
    font-size: 20px;
  }

  .form-input {
    padding: 11px 12px;
    font-size: 13px;
  }

  .otp-field {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .otp-inputs {
    gap: 6px;
  }
}

/* Landscape Mode untuk Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .container {
    flex-direction: row;
    height: auto;
    min-height: 100vh;
  }

  .left-section {
    padding: 20px;
    justify-content: center;
  }

  .logo-anak img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
  }

  .welcome-title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .welcome-subtitle {
    font-size: 11px;
    display: none; /* Sembunyikan untuk menghemat ruang */
  }

  .right-section {
    padding: 15px;
  }

  .login-card {
    padding: 20px;
  }

  .login-title {
    font-size: 20px;
    margin-bottom: 15px;
  }

  .form-group {
    margin-bottom: 10px;
  }

  .forgot-password {
    margin-bottom: 15px;
  }
}

/* Print Styles */
@media print {
  .container::before,
  .container::after,
  .bubble-left {
    display: none;
  }

  .container {
    background: white;
  }

  .left-section {
    display: none;
  }

  .login-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
