body {
    font-family: Arial, sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f0f0f0;
  }
  
  .container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .sequence-container,
  .game-grid-container,
  .reset-button-container,
  .message-container {
    margin-bottom: 20px;
  }
  
  .sequence-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
  }
  
  #sequence img {
    width: 50px;
    height: 50px;
    object-fit: contain;
  }
  
  .grid {
    display: grid;
    grid-template-columns: repeat(6, 50px);
    grid-template-rows: repeat(6, 50px);
    gap: 5px;
    justify-content: center;
    position: relative;
  }
  
  .grid div {
    width: 50px;
    height: 50px;
    background-color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
  }
  
  .grid img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  
  .goal {
    position: absolute;
    bottom: 0;
    right: 0;
    background-color: red;
    width: 50px;
    height: 50px;
  }
  
  .start-cell {
    background-color: green;
    position: relative; /* 子要素の配置に備えて */
    font-size: 16px;
    font-weight: bold;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 5px; /* 角を丸く */
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.7); /* 立体感を出す影 */
    border: 3px solid #006400; /* 目立たせるための太い緑の枠 */
  }
  
  /* スタートセル内にテキスト「スタート」を表示 */
  .start-cell::after {
    content: 'スタート';
    font-size: 10px;
    font-weight: bold;
    color: rgb(0, 0, 0);
  }
  
  button {
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
  }
  
  button:hover {
    background-color: #45a049;
  }
  
  .shake {
    animation: shake 0.3s ease;
  }
  
  @keyframes shake {
    0% { transform: translateX(5px); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
  }
  
  .message-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50px; /* 高さを固定 */
    font-size: 20px;
    color: green;
    font-weight: bold;
    visibility: hidden; /* 初期状態では表示しない */
  }
  
  .message-container.rainbow {
    animation: rainbow 1.5s linear infinite;
  }
  
  @keyframes rainbow {
    0% { color: red; }
    14% { color: orange; }
    28% { color: yellow; }
    42% { color: green; }
    57% { color: blue; }
    71% { color: indigo; }
    85% { color: violet; }
    100% { color: red; }
  }
  