* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px;
  color: #4a3520;
  font-family: "Trebuchet MS", "Poppins", Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, #ffd8ea 0%, transparent 30%),
    radial-gradient(circle at 90% 18%, #d9f0ff 0%, transparent 34%),
    radial-gradient(circle at 50% 90%, #ffe083 0%, transparent 38%),
    linear-gradient(135deg, #fff9e8, #ffe9f3, #eaf8ff);
}

.app {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

h1 {
  margin: 0;
  font-size: 34px;
}

.subtitle {
  margin: 0;
  opacity: 0.72;
}

.buddy-card,
.stat-card,
.ask-card {
  background: rgba(255, 253, 244, 0.94);
  border: 2px solid rgba(255, 216, 106, 0.65);
  border-radius: 30px;
  box-shadow: 0 18px 40px rgba(120, 75, 20, 0.12);
}

.buddy-card {
  padding: 36px 24px;
}

.sun-avatar {
  width: 175px;
  height: 175px;
  margin: 0 auto;
  position: relative;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #fff6a8, #ffd966 70%, #ffc957);
  box-shadow:
    0 22px 55px rgba(255, 190, 85, 0.32),
    inset 0 10px 18px rgba(255, 255, 255, 0.45),
    inset 0 -9px 18px rgba(255, 160, 70, 0.13);
  animation: float 3s ease-in-out infinite;
}

.sun-avatar::before {
  display: none;
}

.face {
  width: 100%;
  height: 100%;
  position: relative;
}

.eyes {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 36px;
}

.eyes span {
  width: 34px;
  height: 18px;
  background: transparent;
  border-bottom: 7px solid #4a3520;
  border-radius: 0 0 999px 999px;
}

.eyes span::after {
  display: none;
}

.smile {
  position: absolute;
  left: 50%;
  top: 103px;
  transform: translateX(-50%);
  width: 44px;
  height: 24px;
  border-bottom: 7px solid #4a3520;
  border-radius: 0 0 999px 999px;
}

.cheek,
.cheek-left,
.cheek-right,
.cheek::before,
.cheek::after {
  display: none;
}

.sun-avatar.studying {
  animation: pulse 1.3s ease-in-out infinite;
}
.sun-avatar.studying .eyes span {
  height: 8px;
  border-bottom-width: 6px;
  transform: translateY(8px);
}

.message {
  margin: 24px 0 0;
  font-size: 18px;
  font-weight: 700;
}

.timer {
  font-size: 36px;
  font-weight: 800;
  margin: 14px 0 22px;
}

.buttons,
.ask-buttons,
.instagram-box {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

button {
  border: none;
  padding: 13px 20px;
  border-radius: 999px;
  background: #ffd35f;
  color: #4a3520;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.12s ease, box-shadow 0.12s ease;
  box-shadow: 0 8px 18px rgba(255, 184, 77, 0.22);
}

button:hover {
  transform: translateY(-2px) scale(1.03);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

#stopBtn {
  background: #ffe7c7;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.stat-card {
  padding: 18px;
}

.stat-card h3 {
  margin: 0;
  font-size: 14px;
  opacity: 0.7;
}

.stat-card p {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.ask-card {
  position: relative;
  overflow: hidden;
  min-height: 220px;
  padding: 24px;
}

.mini-avatar {
  font-size: 48px;
  animation: softBounce 1.6s ease-in-out infinite;
}

.mini-avatar.happy {
  animation: happyDance 0.7s ease-in-out 3;
}

.mini-avatar.sad {
  animation: tinySad 1s ease-in-out forwards;
}

#askText {
  font-weight: 800;
  font-size: 19px;
  margin: 14px 0 18px;
}

#yesBtn {
  background: #ffd35f;
}

#noBtn {
  background: #ffd5eb;
}

#noBtn.runaway {
  position: absolute;
  transition: left 0.04s linear, top 0.04s linear;
}

.instagram-box {
  margin-top: 16px;
}

.instagram-box input {
  border: 3px solid #ffb84d;
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
  color: #4a3520;
  background: #fffdf4;
  font-weight: 800;
  font-size: 16px;
}

.instagram-box input:focus {
  box-shadow: 0 0 0 5px rgba(255, 216, 106, 0.28);
}

.hidden {
  display: none !important;
}

.privacy {
  margin: 0;
  font-size: 12px;
  opacity: 0.65;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.045);
  }
}

@keyframes softBounce {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }

  50% {
    transform: translateY(-8px) rotate(5deg);
  }
}

@keyframes happyDance {
  0%, 100% {
    transform: rotate(0) scale(1);
  }

  25% {
    transform: rotate(-12deg) scale(1.18);
  }

  50% {
    transform: rotate(12deg) scale(1.25);
  }

  75% {
    transform: rotate(-8deg) scale(1.12);
  }
}

@keyframes tinySad {
  0% {
    transform: translateX(0) rotate(0);
  }

  100% {
    transform: translateX(-35px) rotate(-12deg);
    opacity: 0.72;
  }
}
.password-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(circle at 20% 20%, rgba(120, 140, 180, 0.35), transparent 30%),
    radial-gradient(circle at 80% 15%, rgba(80, 90, 130, 0.45), transparent 35%),
    linear-gradient(135deg, #1f2433, #394056, #151923);
  color: #fff9e8;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
}

.storm-cloud {
  font-size: 92px;
  animation: stormFloat 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.25));
}

.password-screen h1 {
  margin-top: 18px;
  font-size: 32px;
}

.password-screen p {
  opacity: 0.85;
}

.password-box {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

.password-box input {
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 14px 18px;
  outline: none;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-weight: 800;
  font-size: 16px;
}

.password-box input::placeholder {
  color: rgba(255, 255, 255, 0.65);
}

.password-box input:focus {
  box-shadow: 0 0 0 5px rgba(255, 216, 106, 0.18);
}

.password-message {
  margin-top: 14px;
  font-weight: 800;
}

.password-screen.unlocked {
  animation: clearStorm 0.8s ease forwards;
}

@keyframes stormFloat {
  0%, 100% {
    transform: translateY(0) rotate(-2deg);
  }

  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

@keyframes clearStorm {
  to {
    opacity: 0;
    visibility: hidden;
    transform: scale(1.04);
  }
}