/* Basic layout */
:root { --paper-bg: #fff; }

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, Arial, sans-serif;
  background: linear-gradient(180deg, #0f1722, #071023);
  color: #fff;
}

.stage {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
}

.cookie-stage {
  position: relative;
  width: 520px;
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-img {
  position: absolute;
  max-width: 520px;
  max-height: 420px;
  z-index: 2;
  cursor: pointer;
}

/* Shake animation */
@keyframes shake {
  0% { transform: translateX(0); }
  20% { transform: translateX(-8px) rotate(-3deg); }
  40% { transform: translateX(8px) rotate(3deg); }
  60% { transform: translateX(-6px) rotate(-2deg); }
  80% { transform: translateX(6px) rotate(2deg); }
  100% { transform: translateX(0) rotate(0); }
}

.shake {
  animation: shake 400ms ease-in-out;
}

/* Paper that slides down from underneath */
.paper {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 420px;
  height: 48px;
  background: var(--paper-bg);
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  color: #111;
  z-index: 1;
  transform: translateX(-50%) translateY(-5px); /* moved down by 100px from previous -100px */
  opacity: 0;
  transition: transform 800ms ease-out, opacity 800ms ease-out;
}

.paper.show {
  transform: translateX(-50%) translateY(180px); /* moved down by 100px from previous 100px */
  opacity: 1;
}

.paper.instant-hide {
  opacity: 0;
  transform: translateX(-50%) translateY(195px);
  transition: none;
}

.paper.instant-show {
  opacity: 1;
  transform: translateX(-50%) translateY(195px);
  transition: none;
}

.fortune-text {
  font-size: 16px;
  line-height: 1.2;
  text-align: center;
}

.crack-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 8px 12px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.crack-btn:active {
  transform: translateY(1px);
}

.crack-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
