  * {
    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;
  }

  /* Style untuk Modal */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Latar belakang gelap transparan */
    z-index: 9999; /* Pastikan di paling atas */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
  }

  .modal-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transform: scale(0.8);
    animation: scaleUp 0.3s 0.1s forwards;
  }

  .modal-icon {
    font-size: 3rem;
    margin-bottom: 10px;
  }

  .modal-box h3 {
    margin-top: 0;
    color: #d9534f; /* Warna merah untuk urgensi */
  }

  .modal-box p {
    line-height: 1.5;
    color: #444;
    margin-bottom: 1rem;
  }

  #closeModalBtn {
    background-color: #0056b3;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
  }
  
  #closeModalBtn:hover {
    background-color: #004494;
  }

  /* Animasi Masuk */
  @keyframes fadeIn { to { opacity: 1; } }
  @keyframes scaleUp { to { transform: scale(1); } }

  .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;
  }