/* ===============================
   DEMO GAME AREA - DARK THEME
================================*/
#demo-game-root {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: auto;
  min-height: 500px;  /* NOW it will work */
}

/* Input Screen */
.demo-input-screen {
  min-height: 550px;   /* or 650px or 700px */
  position: relative;
  background: #4F46E5;;
  padding: 30px;
  border-radius: 18px;
  text-align: center;
  box-shadow: 0 0 15px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.demo-input-screen h3 {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 16px;
}

.demo-input-screen input,
.demo-input-screen textarea {
  width: 100%;
  background: rgb(255, 255, 255);
  border: 1px solid rgba(255,255,255,0.3);
  color: black;
  padding: 10px;
  border-radius: 8px;
  margin-bottom: 14px;
  
}


.demo-input-screen button {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: none;
  background: white;
  color: black;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
}

/* ===============================
   GAME LAYOUT
================================*/
.demo-main-box {
  min-height: 550px;   /* or 650px or 700px */
  position: relative;
  background: url(images/bg4.png) no-repeat center/contain;
  padding: 22px;                 /* More padding */
  border-radius: 18px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.demo-hint-box {
  height: 150px;
  width: 90%;
  margin: 20px;
  background-color: #904dcb;;
  text-align: center;
  border-radius: 10px;
  margin-top: 40px;
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.demo-hint-main {
  font-size: 16px;
  color: #ffeaa7;
}

.demo-hint-pattern {
  font-size: 28px;       /* Bigger hint */
  color: #fff;
  font-weight: bold;
  letter-spacing: 3px;
}

/* Tiles */
.demo-tiles-box {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 30px;
}

.demo-tile {
  width: 55px;
  height: 80px;
  background: #f2f205;
  color: #000;
  font-size: 32px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  cursor: grab;
  user-select: none;
}

.demo-tiles-box, 
.demo-tile {
  touch-action: none;     /* 🚀 disables long-press delay */
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* Win animation */
.demo-tile.correct {
  background: #ffd500 !important;
  transform: scale(1.06);
  box-shadow: 0 0 20px #ffd500;
}

/* Summary */
.demo-summary {
  min-height: 550px;   /* or 650px or 700px */
  position: relative;
  background: #fdfdfd;
  color: black;
  padding: 20px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
}

.demo-summary img {
  width: 100px;
  height: 100px;
  border-radius: 20%;
  margin-bottom: 10px;
}

.demo-summary button {
  width: 100%;
  margin-top: 10px;
  padding: 12px;
  border-radius: 10px;
  background: white;
  border: 2px solid black;
  font-weight: bold;
  cursor: pointer;
}


/* ===============================
   INSTRUCTION POPUP 
================================*/
.demo-instruction {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 20;
  border-radius: 16px;
}

.demo-instruction .demo-card {
  width: 85%;
  padding: 22px;
  border-radius: 14px;
  text-align: center;
}

.demo-card {
  width: 100%;
  background: #f2f205;
  color: #111;
  padding: 20px;
  border-radius: 14px;
  text-align: center;
}

.demo-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
  font-weight: 800;
}

.demo-card p {
  font-size: 14px;
  margin-bottom: 6px;
}

#demo-ok-btn {
  width: 120px;
  height: 40px;
  background: #904dcb;
  color: #fff;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  margin-top: 10px;
}
