  * {
    box-sizing: border-box;
  }
  
  :root {
    --primary-color: #0056b3;
    --success-color: #28a745;
  }
  
  body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: linear-gradient(
        to top,
        #7ed957 0%,
        #b2e8ae 50%,
        #ADD8E6 75%,
        #dbe6e4 100%
    );
    //display: grid;
    place-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
  }

  .container {
    background: #ffffff;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 500px;
    width: 100%;
  }

  h2 {
    color: #333;
    margin-top: 0;
  }

  .subtitle {
    font-size: 1rem;
    color: #555;
    margin-bottom: 2rem;
  }

  #certForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  #nama {
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
  }
  #nama:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
  }

  button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }

  button:hover {
    background-color: #004494;
  }

  #loader {
    display: none;
    margin: 1.5rem 0;
  }

  /* Animasi Spinner */
  .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
  }
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }

  #preview {
    display: none;
    margin-top: 1.5rem;
    border: 1px dashed #ccc;
    padding: 5px;
    border-radius: 8px;
  }
  
  #preview h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    color: #444;
  }

  #previewImg {
    max-width: 100%;
    height: auto;
  }

  #downloadBtn {
    display: none;
    background-color: var(--success-color);
    margin-top: 1rem;
  }
  #downloadBtn:hover {
    background-color: #218838;
  }

  footer {
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #888;
  }