 /* RESET */
* {
  box-sizing: border-box;
}

/* PAGE */
body {
  margin: 0;
  font-family: 'Emilys Candy', cursive;
  background: radial-gradient(circle at top, #a6dfff, #6bb7e6 70%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ✨ SPARKLES */
.sparkle {
  position: absolute;
  color: white;
  animation: twinkle 3s infinite ease-in-out;
  opacity: 0.7;
}

@keyframes twinkle {
  0% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.2; transform: scale(0.8); }
}

/*  PHONE */
.phone {
  width: 200px;
  perspective: 1600px;
  position: relative;
}

/* TOP HALF */
.phone-top {
  height: 220px;
  background: linear-gradient(145deg, #4aa3df, #1f6fb3);
  border-radius: 18px 18px 10px 10px;
  transform-origin: bottom;
  transform: rotateX(-180deg);
  transition: transform 0.7s cubic-bezier(.25,1.5,.5,1);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  padding: 18px 15px;
  z-index: 2;
  position: relative;
  cursor: pointer;
}

.phone.open .phone-top {
  transform: rotateX(0deg);
}

/* Hide bottom + screen when closed */
.phone:not(.open) .phone-bottom {
  visibility: hidden;
}

.phone:not(.open) .screen {
  visibility: hidden;
}

.camera {
  width: 6px;
  height: 6px;
  background: black;
  border-radius: 50%;
  margin: 0 auto 8px auto;
}

.speaker {
  width: 40px;
  height: 5px;
  background: #0d2f4f;
  border-radius: 3px;
  margin: 0 auto 12px auto;
}

/* SCREEN */
.screen-frame {
  background: #0a1f33;
  padding: 8px;
  border-radius: 8px;
}

.screen {
  background: linear-gradient(#001d3d, #003566);
  height: 120px;
  border-radius: 6px;
  color: #90e0ef;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}

/* HINGE */
.hinge {
  height: 12px;
  width: 70%;
  margin: -6px auto;
  background: linear-gradient(#444, #222);
  border-radius: 6px;
}

/* BOTTOM HALF */
.phone-bottom {
  background: linear-gradient(145deg, #90dff7, #ffd166);
  padding: 22px 15px;
  border-radius: 10px 10px 18px 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  min-height: 260px;
}

/* KEYPAD */
.keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.keys button {
  padding: 14px 0;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  background: #1f6fb3;
  color: white;
  cursor: pointer;
  transition: 0.2s;
}

.keys button:hover {
  background: #ffb703;
  transform: translateY(-2px);
}
/* 🌙 CHARM */
.charm-chain {
  position: absolute;
  right: -10px;      /* slightly outside edge */
  bottom: 97px;     /* lower middle of phone */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  animation: swing 3s ease-in-out infinite;
  transform-origin: top center;
  z-index: 50;
}

/* chain string */
.charm-chain::before {
  content: "";
  width: 2px;
  height: 50px;
  background: linear-gradient(#ffd166, gold);
  border-radius: 3px;
  margin-bottom: 4px;
}

/* charm icons */
.charm {
  font-size: 22px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.6));
}

@keyframes swing {
  0% { transform: rotate(-6deg); }
  50% { transform: rotate(6deg); }
  100% { transform: rotate(-6deg); }
}

@keyframes swing {
  0% { transform: rotate(-8deg); }
  50% { transform: rotate(8deg); }
  100% { transform: rotate(-8deg); }
}


@keyframes walkAcross {
  from { left: -40px; }
  to { left: 100%; }
}       