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

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family:
    "Outfit",
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: linear-gradient(135deg, #ffd1dc 0%, #ffafbd 50%, #ffc3a0 100%);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  overflow-x: hidden;
  overflow-y: auto;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.container {
  width: 90%;
  max-width: 800px;
  z-index: 10;
  position: relative;
}

h1 {
  color: #d81b60;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.05);
}

p {
  color: #ad1457;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.5rem;
  perspective: 1000px;
}

@media (max-width: 600px) {
  .menu {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .menu-item {
    padding: 1rem 1rem;
    font-size: 1rem;
    border-radius: 1.5rem;
    animation: none !important;
    transform: none !important;
  }
  .menu-item .icon img {
    width: 40px;
    height: 40px;
  }
}

.menu-item {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 2rem;
  padding: 2.5rem 1.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  color: #d81b60;
  font-weight: 700;
  font-size: 1.2rem;
  box-shadow: 0 8px 32px 0 rgba(255, 105, 180, 0.15);
  animation: float 6s ease-in-out infinite;
}

.menu-item:nth-child(even) {
  animation-delay: -3s;
}

.menu-item:hover {
  transform: scale(1.1) translateY(-5px);
  background: #fff;
  box-shadow: 0 10px 20px rgba(255, 105, 180, 0.3);
}

.menu-item .icon {
  font-size: 3.5rem;
  filter: drop-shadow(0 5px 10px rgba(255, 105, 180, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-item .icon img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.menu-item:active {
  transform: scale(0.9) translateY(5px);
  box-shadow: 0 2px 10px 0 rgba(255, 105, 180, 0.2);
  background: rgba(255, 255, 255, 0.5);
  transition: all 0.1s ease;
}

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

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  pointer-events: none;
  z-index: 1;
}

.heart {
  position: fixed;
  bottom: -50px;
  color: #ff69b4;
  font-size: 20px;
  user-select: none;
  pointer-events: none;
  z-index: -1;
  animation: flyUp linear forwards;
  will-change: transform, opacity; /* Tối ưu GPU cho tim bay */
}

@keyframes flyUp {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(-110vh) rotate(360deg);
    opacity: 0;
  }
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

.letter-modal {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 90%;
  max-width: 500px;
  height: 650px;
  padding: 40px;
  position: relative;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(216, 27, 96, 0.2),
    0 0 0 8px rgba(255, 255, 255, 0.4);
  transform: translateY(50px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.letter-modal::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border: 1px dashed rgba(216, 27, 96, 0.3);
  border-radius: 20px;
  pointer-events: none;
}

.overlay.active .letter-modal {
  transform: translateY(0) scale(1);
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(216, 27, 96, 0.8);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.close-btn:hover {
  background: #d81b60;
  transform: rotate(90deg) scale(1.1);
}

.letter-content {
  color: #444;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  z-index: 2;
}

.letter-body {
  font-family: "Dancing Script", cursive;
  font-size: 1.6rem;
  line-height: 2;
  color: #5d4037;
  overflow-y: auto;
  flex-grow: 1;
  padding: 10px 15px 10px 0;
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.letter-body::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari and Opera */
}

.letter-body p {
  margin-bottom: 25px;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
}

.letter-gif {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 120px;
  height: auto;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
  filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.letter-footer {
  text-align: right;
  margin-top: 30px;
  font-size: 1.8rem !important;
  font-weight: bold;
  color: #d81b60 !important;
}

@media (max-width: 480px) {
  .letter-modal {
    padding: 30px 20px;
  }
  .letter-body {
    font-size: 1.2rem;
  }
}

.music-modal {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 90%;
  max-width: 450px;
  height: 650px;
  padding: 30px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(216, 27, 96, 0.2),
    0 0 0 8px rgba(255, 255, 255, 0.4);
  position: relative;
  color: #d81b60;
  transform: translateY(50px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
}

.overlay.active .music-modal {
  transform: translateY(0) scale(1);
}

.spotify-player {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex-grow: 1;
  overflow: hidden;
}

.player-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 800;
  color: #ad1457;
  opacity: 0.8;
}

.spotify-logo {
  width: 28px;
  height: 28px;
  filter: drop-shadow(0 4px 6px rgba(216, 27, 96, 0.3));
}

.now-playing {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding-bottom: 10px;
}

.song-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
}

.album-art {
  width: 200px;
  height: 200px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(216, 27, 96, 0.25);
  background: linear-gradient(135deg, #ffd1dc, #ff8aab);
  position: relative;
  transition: transform 0.5s ease;
}

.album-art:hover {
  transform: scale(1.05) rotate(2deg);
}

.album-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.song-details {
  margin-top: 5px;
}

.song-details h3 {
  margin: 0;
  font-size: 1.4rem;
  color: #d81b60;
  font-weight: 800;
}

.song-details p {
  margin: 4px 0 0;
  font-size: 1rem;
  color: #ad1457;
  opacity: 0.7;
}

.player-controls {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.progress-container {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #ad1457;
  font-weight: 600;
}

.progress-bar {
  flex-grow: 1;
  height: 8px;
  background: rgba(216, 27, 96, 0.1);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.progress {
  height: 100%;
  background: linear-gradient(90deg, #ff8aab, #d81b60);
  border-radius: 10px;
  width: 0%;
  position: relative;
  transition: width 0.1s linear;
}

.control-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
}

.ctrl-btn {
  background: none;
  border: none;
  color: #ff8aab;
  font-size: 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ctrl-btn:hover {
  color: #d81b60;
  transform: scale(1.2);
}

.ctrl-btn.play-pause {
  width: 65px;
  height: 65px;
  background: linear-gradient(135deg, #d81b60, #ad1457);
  color: white;
  border-radius: 50%;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(216, 27, 96, 0.4);
}

.ctrl-btn.play-pause:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 12px 25px rgba(216, 27, 96, 0.5);
}

.song-list {
  margin-top: 10px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(216, 27, 96, 0.2) transparent;
}

.song-list::-webkit-scrollbar {
  width: 4px;
}

.song-list::-webkit-scrollbar-thumb {
  background: rgba(216, 27, 96, 0.2);
  border-radius: 10px;
}

.song-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid transparent;
}

.song-item:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateX(5px);
  border-color: rgba(216, 27, 96, 0.1);
}

.song-item.active {
  background: rgba(216, 27, 96, 0.1);
  border-color: rgba(216, 27, 96, 0.2);
}

.song-item img {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.song-item-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.song-item-title {
  font-size: 1rem;
  font-weight: 700;
  color: #d81b60;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.song-item-artist {
  font-size: 0.85rem;
  color: #ad1457;
  opacity: 0.7;
}

.image-modal {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 90%;
  max-width: 600px;
  height: 650px;
  padding: 40px 20px;
  position: relative;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(216, 27, 96, 0.2),
    0 0 0 8px rgba(255, 255, 255, 0.4);
  transform: translateY(50px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overlay.active .image-modal {
  transform: translateY(0) scale(1);
}

.gallery-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  overflow: hidden;
  cursor: grab;
}

.gallery-container:active {
  cursor: grabbing;
}

.gallery-row {
  display: flex;
  width: max-content;
  pointer-events: auto;
  will-change: transform; /* Tối ưu GPU cho dãy ảnh trượt */
}

.gallery-row img {
  height: 200px;
  width: 150px;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 4px solid white;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  margin-right: 20px;
}

.gallery-row img:hover {
  transform: scale(1.1) translateY(-10px) rotate(2deg);
  box-shadow: 0 15px 30px rgba(216, 27, 96, 0.2);
  z-index: 10;
}

.row-top {
  animation: scroll-left 30s linear infinite;
  -webkit-animation: scroll-left 30s linear infinite; /* Thêm cho Safari */
}

.row-bottom {
  animation: scroll-right 30s linear infinite;
  -webkit-animation: scroll-right 30s linear infinite; /* Thêm cho Safari */
}

/* Thêm Keyframes Webkit cho Safari */
@-webkit-keyframes scroll-left {
  0% { -webkit-transform: translateX(0); }
  100% { -webkit-transform: translateX(-50%); }
}
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@-webkit-keyframes scroll-right {
  0% { -webkit-transform: translateX(-50%); }
  100% { -webkit-transform: translateX(0); }
}
@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
  border: 5px solid white;
}

@media (max-width: 480px) {
  .image-modal {
    height: 500px;
  }
  .gallery-row img {
    height: 140px;
    width: 110px;
  }
  .gallery-gif-wrapper.top {
    top: 5px;
    left: 5px;
  }
  .gallery-gif-wrapper.bottom {
    bottom: 5px;
    right: 5px;
  }
  .gallery-gif {
    width: 40px !important;
  }
  .gallery-gif-wrapper.bottom .gallery-gif {
    width: 100px !important;
  }
  .gallery-gif-wrapper.top .gallery-gif {
    width: 100px !important;
  }
  .flying-text {
    font-size: 0.8rem !important;
  }
}

.gallery-gif-wrapper {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 15px;
  pointer-events: none;
  z-index: 10;
  max-width: calc(100% - 20px);
  overflow: hidden;
}

.gallery-gif-wrapper.top {
  top: 10px;
  left: 10px;
  flex-direction: row;
}

.gallery-gif-wrapper.bottom {
  bottom: 10px;
  right: 10px;
  flex-direction: row;
}

.gallery-gif {
  width: 80px;
  height: auto;
  opacity: 0.9;
  z-index: 11;
}

.gallery-gif-wrapper.bottom .gallery-gif {
  width: 100px;
}

.flying-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #ff1493;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
  white-space: nowrap;
}

.text-right {
  animation: run-right 8s linear infinite;
  -webkit-animation: run-right 8s linear infinite;
}

.text-left {
  animation: run-left 8s linear infinite;
  -webkit-animation: run-left 8s linear infinite;
}

@-webkit-keyframes run-right {
  0% { -webkit-transform: translateX(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { -webkit-transform: translateX(100%); opacity: 0; }
}
@keyframes run-right {
  0% { transform: translateX(-100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(100%); opacity: 0; }
}

@-webkit-keyframes run-left {
  0% { -webkit-transform: translateX(100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { -webkit-transform: translateX(-100%); opacity: 0; }
}
@keyframes run-left {
  0% { transform: translateX(100%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}

.gift-modal {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  width: 95%;
  max-width: 900px;
  height: 85vh;
  position: relative;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow:
    0 25px 50px -12px rgba(216, 27, 96, 0.3),
    0 0 0 8px rgba(255, 255, 255, 0.4);
  transform: translateY(50px) scale(0.9);
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.overlay.active .gift-modal {
  transform: translateY(0) scale(1);
}

.gift-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.gift-modal .close-btn {
  top: 15px !important;
  right: 15px !important;
  z-index: 100 !important;
}

.gift-modal .fullscreen-btn {
  position: absolute;
  top: 15px;
  right: 65px;
  width: 40px;
  height: 40px;
  background: #d81b60;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(216, 27, 96, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: all 0.3s ease;
}

.gift-modal .fullscreen-btn:hover {
  transform: scale(1.1);
}

.gift-modal:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.gift-modal:fullscreen .close-btn {
  display: none;
}

@media (max-width: 600px) {
  .gift-modal {
    height: 80vh;
  }
}

/* Lock Screen Styles */
.lock-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #ffd1dc 0%, #ffafbd 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5000;
  transition: transform 0.8s cubic-bezier(0.8, 0, 0.2, 1), opacity 0.5s ease;
}

.lock-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.1) 75%);
  background-size: 60px 60px;
  background-position: 0 0, 0 30px, 30px -30px, -30px 0px;
  pointer-events: none;
}

.lock-screen.unlocked {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.lock-content {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 50px;
  border-radius: 50px;
  text-align: center;
  box-shadow:
    0 30px 60px rgba(216, 27, 96, 0.2),
    0 0 0 10px rgba(255, 255, 255, 0.1);
  width: 90%;
  max-width: 850px;
  animation: fadeIn 1s ease;
  display: flex;
  align-items: center;
  gap: 50px;
  position: relative;
  z-index: 10;
}

.lock-image {
  flex: 1;
  max-width: 350px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  cursor: none;
}

.lock-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border: 5px solid white;
}

.lock-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lock-icon {
  font-size: 3rem;
  color: #d81b60;
  margin-bottom: 20px;
  animation: heartbeat 1.5s ease infinite;
}

@keyframes heartbeat {
  0% { transform: scale(1); }
  15% { transform: scale(1.15); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
  60% { transform: scale(1); }
}

.pass-dots {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
}

.dot {
  width: 16px;
  height: 16px;
  border: 2px solid #d81b60;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dot.active {
  background: #d81b60;
  transform: scale(1.2);
  box-shadow: 0 0 10px rgba(216, 27, 96, 0.5);
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.num-btn {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #d81b60;
  font-size: 1.6rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  -webkit-tap-highlight-color: transparent; /* Xóa bóng xám khi click trên iOS */
}

.num-btn:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 10px 20px rgba(216, 27, 96, 0.1);
}

.num-btn:active {
  transform: scale(0.9);
  background: #d81b60;
  color: white;
}

.num-btn.blank {
  visibility: hidden;
}

.num-btn.delete-btn {
  font-size: 1.4rem;
  border: none;
  background: transparent;
}

.num-btn.delete-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Shake Animation */
.shake {
  animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {
  10%,
  90% { transform: translate3d(-1px, 0, 0); }
  20%,
  80% { transform: translate3d(2px, 0, 0); }
  30%,
  50%,
  70% { transform: translate3d(-4px, 0, 0); }
  40%,
  60% { transform: translate3d(4px, 0, 0); }
}

.main-content-hidden {
  filter: blur(20px);
  opacity: 0.3;
  transition: all 1s ease;
  pointer-events: none; /* Khóa tương tác khi bị làm mờ (ngăn ghost click) */
}

.main-content-visible {
  filter: blur(0);
  opacity: 1;
  pointer-events: auto; /* Mở lại tương tác khi đã vào được trong */
}

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

@media (max-width: 768px) {
  .lock-content {
    flex-direction: column;
    padding: 20px 15px;
    max-width: 320px;
    gap: 15px;
    border-radius: 30px;
  }
  .lock-image {
    max-width: 140px;
  }
  .lock-image img {
    border-width: 3px;
  }
  .lock-icon {
    font-size: 2rem;
    margin-bottom: 10px;
  }
  .pass-dots {
    margin-bottom: 25px;
    gap: 10px;
  }
  .dot {
    width: 12px;
    height: 12px;
  }
  .num-btn {
    width: 55px;
    height: 55px;
    font-size: 1.2rem;
  }
  .numpad {
    gap: 12px;
  }
  .reset-lock-btn {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}

.reset-lock-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  color: #d81b60;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(216, 27, 96, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 100;
  display: none;
}

/* Hiển thị nút khi đã mở khóa */
.main-content-visible ~ .reset-lock-btn {
  display: flex;
}

.reset-lock-btn:hover {
  transform: scale(1.1) rotate(10deg);
  background: white;
  box-shadow: 0 8px 25px rgba(216, 27, 96, 0.3);
}

.reset-lock-btn:active {
  transform: scale(0.9);
}

@media (max-width: 768px) {
  .reset-lock-btn {
    bottom: 15px;
    right: 15px;
    width: 45px;
    height: 45px;
  }
}
