body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
    text-align: center;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}
h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}
.game-container {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 20px;
}
.column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 170px;
}
.cell {
    height: 50px;
    border: 2px solid #3498db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    cursor: pointer;
    font-size: 18px;
    position: relative;
    transition: background-color 0.3s;
}
.cell:hover {
    background-color: #e8f4fc;
}
.cell.selected {
    background-color: #d4e9f7;
    border-color: #2980b9;
}
.cell.matched {
    border-color: #27ae60;
    background-color: #e8f8f0;
}
canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}
.dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 10;
}
.dialog p {
    margin: 0 0 15px 0;
}
.error-message {
    color: #e74c3c;
}
.success-message {
    color: #27ae60;
}
.dialog button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
}
.retry-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}
.retry-button:hover {
    background-color: #2980b9;
}

@media (max-width: 480px) {
  body {
    padding: 12px;
  }

  h2 {
    font-size: 1.1rem;
    margin-bottom: 12px;
  }

  .game-container {
    gap: 16px;
  }

  .column {
    width: 138px;
  }

  .cell {
    font-size: 13px;
    height: 44px;
  }
}
