:root {
  --primary-color: #0057B8;     /* สีน้ำเงินเข้มสดขึ้น */
  --primary-light: #1E88E5;     /* สีน้ำเงินสดใสมากขึ้น */
  --primary-dark: #004094;      /* สีน้ำเงินเข้มที่มีความลึก */
  --accent-color: #00B0FF;      /* สีฟ้าสว่างสดใส */
  --secondary-color: #f0f7ff;   /* สีพื้นหลังเย็นตาขึ้น */
  --text-color: #263238;        /* สีตัวอักษรเข้มเล็กน้อย */
  --text-light: #546E7A;        /* สีตัวอักษรอ่อนที่ดูมีมิติขึ้น */
  --border-color: #E3F2FD;
  --facebook-color: #1877F2;
  --google-color: #EA4335;
  --line-color: #06C755;
}

body {
  font-family: 'Prompt', sans-serif;
  background: linear-gradient(135deg, #1E88E5 0%, #0057B8 50%, #004094 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--text-color);
  position: relative;
  overflow: hidden;
}

body::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.08'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.8;
  z-index: -1;
}

.login-container {
  background-color: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  width: 90%;
  max-width: 460px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25), 0 0 30px rgba(0, 87, 184, 0.2);
  position: relative;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(10px);
}

.login-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 35px 70px rgba(0, 0, 0, 0.35), 0 0 40px rgba(0, 0, 0, 0.1);
}

.login-header {
  background: linear-gradient(120deg, #0057B8, #1E88E5);
  padding: 45px 30px 35px;
  text-align: center;
  position: relative;
  color: white;
  overflow: hidden;
}

/* เพิ่มเส้นโค้งสวยงามในพื้นหลังส่วนหัว */
.login-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 70%);
  pointer-events: none;
}

/* เพิ่มลูกเล่นฟองน้ำลอยขึ้น */
.login-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
      radial-gradient(circle at 20% 90%, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 25%),
      radial-gradient(circle at 80% 85%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 15%);
  animation: bubbleRise 15s infinite ease-out;
}

@keyframes bubbleRise {
  0% {
      transform: translateY(0);
      opacity: 0.1;
  }
  50% {
      opacity: 0.2;
  }
  100% {
      transform: translateY(-100%);
      opacity: 0;
  }
}

.logo-wrapper {
  width: 170px;  /* ปรับขนาดโลโก้ให้ใหญ่ขึ้น */
  height: 170px; /* ปรับขนาดโลโก้ให้ใหญ่ขึ้น */
  margin: 0 auto 25px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  /* ปรับกรอบโลโก้ให้ดูมีมิติและสวยงามมากขึ้น */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(5px);
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 
      0 15px 35px rgba(0, 0, 0, 0.2),
      0 5px 15px rgba(0, 0, 0, 0.1),
      inset 0 2px 5px rgba(255, 255, 255, 0.3);
  animation: pulseLogo 3s infinite alternate ease-in-out;
}

/* เพิ่มเอฟเฟกต์รัศมีรอบโลโก้ */
.logo-wrapper::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: transparent;
  border: 3px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 30px rgba(0, 176, 255, 0.5);
  animation: pulseRing 3s infinite alternate ease-in-out;
  z-index: -1;
}

@keyframes pulseLogo {
  0% {
      transform: scale(1);
      box-shadow: 
          0 10px 25px rgba(0, 0, 0, 0.2), 
          inset 0 2px 5px rgba(255, 255, 255, 0.1);
  }
  100% {
      transform: scale(1.08);
      box-shadow: 
          0 15px 35px rgba(0, 0, 0, 0.3), 
          inset 0 3px 8px rgba(255, 255, 255, 0.2);
  }
}

@keyframes pulseRing {
  0% {
      transform: scale(1.1);
      opacity: 0.4;
  }
  100% {
      transform: scale(1.3);
      opacity: 0;
  }
}

.login-header img {
  max-width: 75%;
  max-height: 75%;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
  animation: floatLogo 6s infinite ease-in-out;
}

@keyframes floatLogo {
  0%, 100% {
      transform: translateY(0) rotate(0deg);
  }
  25% {
      transform: translateY(-5px) rotate(-2deg);
  }
  75% {
      transform: translateY(-3px) rotate(2deg);
  }
}

.login-header h2 {
  margin: 0;
  font-weight: 600;
  font-size: 1.8rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
  background: linear-gradient(to right, #ffffff, #e0e0e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-decoration {
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 30px;
  background: #ffffff;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.login-body {
  padding: 45px 30px 25px;
  position: relative;
  background: linear-gradient(to bottom, #ffffff, #f8fbff);
}

.btn-social {
  display: flex;
  align-items: center;
  padding: 0;
  border-radius: 14px; /* เพิ่มความมน */
  font-weight: 600;
  width: 100%;
  margin-bottom: 22px;
  color: white;
  position: relative;
  overflow: hidden;
  border: none;
  height: 62px; /* ทำให้ปุ่มสูงขึ้น */
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  
  /* ทำให้ปุ่มนูนขึ้น */
  box-shadow: 
      0 6px 15px rgba(0, 0, 0, 0.1),
      0 2px 5px rgba(0, 0, 0, 0.1),
      inset 0 1px 1px rgba(255, 255, 255, 0.25),
      inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.btn-social::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
  pointer-events: none;
}

/* เพิ่มลูกเล่นคลื่นเคลื่อนไหวในปุ่ม */
.btn-social::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(90deg, 
              rgba(255, 255, 255, 0), 
              rgba(255, 255, 255, 0.05), 
              rgba(255, 255, 255, 0));
  transform: rotate(30deg);
  animation: shineEffect 6s infinite linear;
  pointer-events: none;
}

@keyframes shineEffect {
  0% {
      transform: translateX(-100%) rotate(30deg);
  }
  100% {
      transform: translateX(100%) rotate(30deg);
  }
}

.btn-social:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
      0 10px 25px rgba(0, 0, 0, 0.15),
      0 5px 10px rgba(0, 0, 0, 0.05),
      inset 0 1px 1px rgba(255, 255, 255, 0.25),
      inset 0 -1px 1px rgba(0, 0, 0, 0.1);
}

.btn-social:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 
      0 3px 6px rgba(0, 0, 0, 0.1),
      0 1px 2px rgba(0, 0, 0, 0.1),
      inset 0 1px 1px rgba(0, 0, 0, 0.1);
}

.btn-icon {
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background-color: rgba(0, 0, 0, 0.15);
  position: relative;
  overflow: hidden;
}

.btn-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.btn-social span {
  flex-grow: 1;
  text-align: center;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.15);
}

/* ปรับไล่สีของปุ่ม */
.btn-google {
  background: linear-gradient(45deg, #E53935, #FF5252);
}

.btn-facebook {
  background: linear-gradient(45deg, #1565C0, #1E88E5);
}

.btn-line {
  background: linear-gradient(45deg, #00B248, #00E676);
}

/* ปรับแต่งการแจ้งเตือน */
.notification {
  background-color: #fff5f5;
  color: #c53030;
  border-radius: 14px;
  padding: 20px;
  margin-top: 25px;
  font-weight: 500;
  display: none;
  animation: fadeInUp 0.6s forwards;
  box-shadow: 
      0 8px 20px rgba(0, 0, 0, 0.05),
      0 2px 6px rgba(0, 0, 0, 0.05);
  border-left: 4px solid #ff5252;
}

.notification.show {
  display: flex;
  align-items: center;
}

.notification i {
  margin-right: 15px;
  font-size: 1.3rem;
  color: #ff5252;
}

.login-footer {
  text-align: center;
  padding: 5px 30px 30px;
  color: var(--text-light);
  position: relative;
  background: linear-gradient(to top, #f0f4ff, #ffffff);
}

.privacy-terms {
  margin-bottom: 20px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.privacy-terms a {
  color: #0057B8;
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: all 0.3s ease;
}

.privacy-terms a:hover {
  color: #00B0FF;
}

.privacy-terms a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1px;
  background-color: #00B0FF;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.privacy-terms a:hover::after {
  transform: scaleX(1);
}

.login-decoration {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.login-decoration span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #1E88E5;
  margin: 0 4px;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.login-decoration span:nth-child(2) {
  opacity: 0.9;
  transform: scale(1.5);
}

.login-decoration span:nth-child(3) {
  opacity: 0.3;
}

.login-decoration:hover span {
  animation: bounceDot 1s infinite alternate;
}

.login-decoration:hover span:nth-child(1) {
  animation-delay: 0s;
}

.login-decoration:hover span:nth-child(2) {
  animation-delay: 0.2s;
}

.login-decoration:hover span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes bounceDot {
  0% {
      transform: translateY(0) scale(1);
  }
  100% {
      transform: translateY(-8px) scale(1.2);
  }
}

@keyframes fadeInUp {
  from {
      opacity: 0;
      transform: translateY(20px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

/* เพิ่มเอฟเฟกต์พื้นหลังที่สวยงาม */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  transform-origin: center center;
  background: rgba(255, 255, 255, 0.2);
}

/* เพิ่ม animated-bg สวยงาม */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  background: 
      radial-gradient(circle at 30% 30%, rgba(30, 136, 229, 0.7) 0%, rgba(30, 136, 229, 0) 70%),
      radial-gradient(circle at 70% 60%, rgba(0, 176, 255, 0.6) 0%, rgba(0, 176, 255, 0) 70%),
      radial-gradient(circle at 40% 80%, rgba(0, 64, 148, 0.5) 0%, rgba(0, 64, 148, 0) 60%);
  animation: bgPulse 15s infinite alternate ease-in-out;
}

@keyframes bgPulse {
  0% {
      opacity: 0.7;
      background-position: 0% 0%, 100% 100%, 50% 50%;
  }
  100% {
      opacity: 1;
      background-position: 10% 10%, 90% 90%, 60% 40%;
  }
}

@media (max-width: 480px) {
  .login-header {
      padding: 35px 20px 25px;
  }
  
  .logo-wrapper {
      width: 130px;
      height: 130px;
  }
  
  .login-header h2 {
      font-size: 1.5rem;
  }
  
  .login-body {
      padding: 35px 20px 20px;
  }
  
  .btn-social {
      height: 56px;
  }
  
  .btn-icon {
      width: 56px;
      height: 56px;
  }
}