 body {
  margin: 0;
  font-family: 'Georgia', serif;
  background-color: #ffeec8;
  overflow: hidden;
  position: relative;
}

/* Visual Background Layers */
#visual-layers {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
}

/* SKY - backmost */
.sky-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* SUN */
.sun-layer {
  position: absolute;
  top: 10%;
  left: 0;
  width: 10%;
  z-index: 1;
}

/* SEA - acts as base container for tiles */
.sea-layer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 30vh; /* NEW: force it to scale taller */
  object-fit: cover; /* ensures it scales without squishing */
  z-index: 2;
}


/* FOREGROUND - just decor, does not block interaction */
.foreground-layer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

/* Make the cloud container scale up */
#score-panel {
  position: absolute;
  top: -20px;               /* 👈 Float higher like your reference */
  left: 50%;
  transform: translateX(-50%);
  width: 50vw;
  max-width: 900px;
  height: 100px;
  z-index: 10;
}


#score-panel img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.score-overlay {
  span {
  line-height: 1;
  white-space: nowrap;
}
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  font-size: 22px;
  font-weight: bold;
  color: #3b1f00;
  display: flex;
  align-items: center;
  justify-content: center;   /* Center everything */
  font-family: Georgia, serif;
  gap: 16px;                 /* Add space between items */
}



/* Game Grid */
#grid-container {
  position: relative;
  max-height: calc(100vh - 38vh); /* Adjust as needed */
  overflow-y: auto;
  z-index: 4;
  padding-top: 80px;
}





#grid {
  display: grid;
  grid-template-columns: repeat(18, 80px);
  grid-auto-rows: 80px; /* Responsive height */
  max-height: 100%;
  width: max-content;
  margin: auto;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}


/* Tiles */
.tile {
  width: 60px;
  height: 60px;
  cursor: grab;
  transition: transform 0.2s ease;
  position: relative;
  z-index: 4;
}

.tile:active {
  transform: scale(1.05);
  cursor: grabbing;
}

.valid-word-glow {
  box-shadow: 0 0 10px 4px #fff176, 0 0 20px 6px #fdd835;
  border-radius: 8px;
  transition: box-shadow 0.3s ease;
}

#tile-bank {
  width: 100%;
  max-width: 800px; /* Restricts horizontal sprawl */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 16px;
  background-color: transparent;
  border-radius: 12px;
}


#tile-bank-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  padding-bottom: 4vh;
  z-index: 10;
}

.sparkle-icon {
  width: 40px !important;
  height: 40px !important;
  margin: 0 4px !important;
}

.bird {
  position: absolute;
  width: 50px;
  opacity: 0.9;
  z-index: 1;
}

.bird-left {
  top: 40px;
  left: 80px;
}

.bird-right {
  top: 40px;
  right: 60px;
  transform: scaleX(-1); /* flip for symmetry */
}

.cloud {
  position: absolute;
  width: 300px;
  opacity: 1;
  z-index: 1;
  animation: floatHorizontal 8s ease-in-out infinite;
}


.cloud-left {
  top: 100px;
  left: 80px;
}

.cloud-right {
  top: 150px;
  right: 100px;
}

@keyframes floatHorizontal {
  0%, 100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(100px); /* Move softly to the right */
  }
}

.cloud {
  animation: floatHorizontal 16s ease-in-out infinite;
  transition: transform 0.3s ease;
}

/* Modal Overlay Background */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

/* Modal Card */
.modal-content {
  background: white;
  padding: 30px 30px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  text-align: center;
  max-width: 480px;
  width: 90%;
  font-family: Georgia, serif;
}

/* Heading */
.modal-content h2 {
  margin-bottom: 24px;
  font-size: 28px;
  color: #2c1d00;
}

/* Bullet List */
.modal-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  font-size: 18px;
  color: #3b1f00;
  text-align: left;
}

.modal-list li {
  background: #fdf6e9;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.start-game-button {
  margin: 32px auto 0;
  padding: 16px 48px;
  font-size: 22px;
  font-weight: bold;
  font-family: 'Georgia', serif;
  color: white;
  background: linear-gradient(to right, #5e106e, #fa7878);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  display: block;
  text-align: center;
}

.start-game-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

/* Keep headings serif, body text sans-serif */
.modal-container h2 {
  font-family: 'Georgia', serif;
}

.modal-container p,
.modal-container li,
.modal-container span {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

#game-over-modal .modal-content h2 {
  color: #3b1f00;
  font-size: 28px;
  margin-bottom: 16px;
}

#game-over-modal .modal-content p {
  font-size: 20px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 24px;
}

.final-score-text {
  font-size: 48px !important; /* ⬅️ Increased from 36px */
  font-weight: bold;
  color: #3b1f00;
  font-family: 'Georgia', serif;
  margin: 0 0 24px;
}
