/*
 * Stylesheet for the Scratch Surprise game.
 *
 * The game is designed for toddlers, so the layout uses big fonts,
 * bright colours and large interactive elements. The canvas has a
 * rounded border and drop shadow to make it stand out against the
 * background. The New Card button is styled to look like a soft
 * pill‑shaped button.
 */

body {
  font-family: Arial, Helvetica, sans-serif;
  /* Soft radial gradient background for a high‑end feel */
  /* Refresh the background with a more vibrant radial gradient. The gentle
     transition from sky blue to pale turquoise gives a sophisticated,
     soothing look reminiscent of premium kids' apps. */
  background: radial-gradient(circle at 50% 15%, #dfe9f3 0%, #a0c4ff 45%, #7fb2f0 100%);
  margin: 0;
  padding: 20px;
  text-align: center;
  color: #333;
  min-height: 100vh;
}

h1 {
  margin-top: 0;
  font-size: 3em;
  color: #1e5092;
  text-shadow: 0 2px 5px rgba(0,0,0,0.25);
}

.instructions {
  font-size: 1.1em;
  margin-bottom: 20px;
}

.game-container {
  position: relative;
  display: inline-block;
  margin-bottom: 10px;
}

/* The canvas acts as our scratch card. We set a fixed
 * size and allow the background image to resize within it. */
#scratch-card {
  width: 320px;
  height: 320px;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: pointer;
  touch-action: none; /* Prevent scrolling when scratching on touch devices */
}

.caption {
  font-size: 1.6em;
  font-weight: 600;
  margin: 12px 0;
  min-height: 36px;
  color: #2a5d9f;
  visibility: hidden; /* Hidden until an image is revealed */
}

/* The "New Card" button from the original version is no longer used.
   We leave this section empty for backward compatibility. */

/* Home and category selection styling */
/* Home screen instructions spacing */
#home-screen .instructions {
  margin-bottom: 30px;
}

/* Container for category cards on the home screen */
.category-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 40px;
}

/* Individual category card styling */
.category-card {
  width: 170px;
  height: 180px;
  /* Use a multi‑stop gradient for depth and premium feel */
  background: linear-gradient(145deg, #6ec6ff, #90caf9, #b5d6ff);
  border-radius: 26px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}
.category-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.35);
}
.category-card .emoji {
  font-size: 3.5rem;
  margin-bottom: 12px;
}
.category-card .title {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Back button styling */
.back-button {
  background: none;
  border: none;
  color: #2a5d9f;
  font-size: 1em;
  cursor: pointer;
  text-align: left;
  margin-bottom: 10px;
}

.back-button:hover {
  text-decoration: underline;
}

/* Category title in game screen */
#category-title {
  font-size: 2em;
  color: #1e5092;
  margin: 10px 0;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}