@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&family=Dancing+Script:wght@400;500;600;700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'Inter', sans-serif;
  height: 100vh;
  overflow: hidden;
  position: relative;
  transition: background-color 1s ease;
}
.splash-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, #ffdde1, #ee9ca7);
  z-index: 20;
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.splash-container.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(1.2);
}
.heart-container {
  perspective: 1000px;
}
.heart {
  width: 90vw;
  height: 90vw;
  max-width: 550px;
  max-height: 550px;
  position: relative;
  background: url('../assets/images/trang-chu/heart.png') no-repeat center
    center;
  background-size: contain;
}
.heart-content {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  z-index: 5;
  padding-top: 20px;
}
.heart-content h1 {
  font-family: 'Dancing Script', cursive;
  font-size: 3.2rem;
  font-weight: 700;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.heart-content p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 500;
  font-style: italic;
  margin-top: 5px;
  margin-bottom: 25px;
  opacity: 0.95;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#start-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 14px 35px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s;
  text-transform: uppercase;
}
#start-btn:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}
body.login-active {
  display: flex;
  align-items: center;
  justify-content: center;
}
body.login-active::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: url('https://img.pikbest.com/ai/illus_our/20230418/64e0e89c52dec903ce07bb1821b4bcc8.jpg!bw700');
  background-size: 50vw 50vh;
  animation: backgroundMove 30s linear infinite;
  transform: scale(1.75) rotate(-20deg);
}
@keyframes backgroundMove {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}
.container {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  border-radius: 25px;
  padding: 40px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  text-align: center;
  width: 90%;
  max-width: 380px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}
.container.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.9);
}
h2 {
  margin-bottom: 1.8rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 2.2rem;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
#password-display {
  font-size: 2.4rem;
  min-height: 85px;
  padding: 1.2rem;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.25);
  letter-spacing: 12px;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}
#password-text,
#status-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}
.status-icon {
  font-size: 1.5rem;
  transition: all 0.3s ease;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}
.status-icon.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 2rem;
}
.keypad button {
  font-size: 1.6rem;
  font-weight: 600;
  height: 65px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  color: #fff;
  transition: all 0.2s;
  backdrop-filter: blur(5px);
}
.keypad button:active {
  transform: scale(0.95);
}
.clear-btn {
  background: rgba(255, 107, 157, 0.3) !important;
}
.check-btn {
  background: rgba(76, 175, 80, 0.3) !important;
}
.success-display {
  background: rgba(76, 175, 80, 0.3) !important;
}
.error-display {
  background: rgba(255, 107, 157, 0.3) !important;
}
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.modal-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.modal-content {
  background: rgba(20, 20, 20, 0.9);
  padding: 35px 45px;
  border-radius: 24px;
  text-align: center;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(20px);
}
.modal-content p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  margin-bottom: 30px;
}
.modal-buttons {
  display: flex;
  gap: 15px;
}
.modal-buttons button {
  flex-grow: 1;
  padding: 14px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}
.modal-buttons button:active {
  transform: scale(0.95);
}
#confirm-yes-btn {
  background-color: #28a745;
  color: white;
}
#confirm-no-btn {
  background-color: #dc3545;
  color: white;
}
@media (max-width: 600px) {
  .heart-content h1 {
    font-size: 2.6rem;
  }
  .heart-content p {
    font-size: 1rem;
  }
  #start-btn {
    padding: 12px 30px;
    font-size: 1rem;
  }
  h2 {
    font-size: 1.9rem;
  }
  #password-display {
    font-size: 2rem;
    letter-spacing: 8px;
  }
  .keypad button {
    font-size: 1.4rem;
    height: 55px;
  }
  .modal-content p {
    font-size: 1.1rem;
  }
}

#simple-loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fce4ec, #f8bbd0); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
    color: #e91e63; 
    font-family: 'Inter', sans-serif;
    font-size: 1.2em;
    text-align: center;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.percentage {
    font-size: 2.5em;
    font-weight: 700;
    color: #e91e63;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(233, 30, 99, 0.3);
}

.progress-container {
    position: relative;
    width: 320px;
    height: 22px;
    background-color: rgba(255, 255, 255, 0.4);
    border: 2px solid #e91e63;
    border-radius: 25px;
    overflow: visible;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #e91e63, #ad1457, #e91e63);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
    border-radius: 25px;
    transition: width 0.3s ease;
    position: relative;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.heart-indicator {
    position: absolute;
    top: -16px;
    left: -12px;
    width: 24px;
    height: 24px;
    color: #e91e63;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(233, 30, 99, 0.4);
    animation: heartbeat 1.5s infinite;
    transition: left 0.3s ease;
    z-index: 10;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.loading-text {
    font-size: 1.1em;
    color: #ad1457;
    margin-top: 10px;
    opacity: 0.9;
    font-weight: 500;
}

.floating-hearts {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    color: rgba(233, 30, 99, 0.7);
    font-size: 18px;
    animation: float-up 4s infinite;
    pointer-events: none;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

#simple-loading-spinner.hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 600px) {
    .percentage {
        font-size: 2em;
    }
    
    .progress-container {
        width: 280px;
        height: 20px;
    }
    
    .loading-text {
        font-size: 1em;
    }
}
