body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    padding: 20px;
    text-align: center;
  }

  h1 {
    margin-bottom: 20px;
  }

  .controls {
    margin-bottom: 20px;
  }

  input[type="color"] {
    width: 60px;
    height: 50px;
    border: none;
    cursor: pointer;
    vertical-align: middle;
  }

  button {
    padding: 10px 18px;
    margin-left: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.2s;
  }

  button:hover {
    background-color: #0056b3;
  }

  .palette {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
  }

  .color-box {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(0,0,0,0.5);
    cursor: pointer;
    transition: transform 0.2s;
  }

  .color-box:hover {
    transform: scale(1.05);
  }

  .color-code {
    font-size: 12px;
    background: rgba(0,0,0,0.3);
    padding: 3px 6px;
    border-radius: 5px;
    text-align: center;
  }

  .delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #fff;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    font-weight: bold;
    line-height: 18px;
  }

  #cssSnippet {
    margin-top: 25px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
    font-family: monospace;
  }