* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
}
/*header*/
.header-section {
  text-align: center;
  margin-bottom: 10px;
  padding: 20px 0;
  border-bottom: 2px solid #eee;
}

.header-section h2 {
  margin-bottom: 30px;
  color: #2c3e50;
  font-size: 28px;
  font-weight: 700;
}

.header-logo {
  max-width: 80px;
  height: auto;
  margin: 0 auto;
  display: block;
}

/* Optional: Tambahkan animasi subtle pada logo */
.header-logo {
  transition: transform 0.3s ease;
}

.header-logo:hover {
  transform: scale(1.05);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

/* Control Panel Styles */
.control-panel {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  margin-bottom: 30px;
}

.settings-section,
.recipients-section {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

.settings-section h3,
.recipients-section h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 30px;
  font-weight: 600;
  color: #333;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

input:hover,
textarea:hover,
select:hover {
  border-color: #4a90e2;
}

.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

button {
  background: #4a90e2;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

button:hover {
  background: #357abd;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(74, 144, 226, 0.3);
}

.primary-button,
.secondary-button {
  flex: 1;
  max-width: 200px;
}

.primary-button {
  background: #4a90e2;
}

.secondary-button {
  background: #5cb85c;
}

/* Certificate Container Styles */
.certificate-container,
.certificates-preview {
  background: white;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  overflow-x: auto;
}

.certificates-preview {
  display: grid;
  gap: 30px;
  padding: 20px;
}

.certificate {
  width: 1000px;
  height: 680px;
  padding: 40px;
  margin: 0 auto;
  background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
  position: relative;
  overflow: hidden;
}

.certificate::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(74, 144, 226, 0.05) 0%,
    rgba(74, 144, 226, 0) 100%
  );
  z-index: 0;
}

.certificate-content {
  border: 3px solid #c4a300;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.98) 100%
  );
  position: relative;
  z-index: 1;
}

/* Logo Styles */
.logo-container {
  margin-bottom: 5px;
  margin-top: 5px;
}

.logo-preview {
  max-width: 80px;
  max-height: 80px;
  margin-bottom: 10px;
}

.certificate-title {
  font-size: 40px;
  color: #2c3e50;
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.certificate-subtitle {
  font-size: 24px;
  color: #7f8c8d;
  margin-bottom: -px;
}

.recipient-name {
  font-size: 36px;
  color: #2c3e50;
  margin: 10px 0;
  padding-top: 20px;
  font-family: "Segoe UI", serif;
  border-bottom: 2px solid #c4a300;
  padding-bottom: 10px;
}

.recipient-id {
  font-size: 18px;
  color: #7f8c8d;
  margin-bottom: 0px;
}

.certificate-text {
  font-size: 20px;
  color: #34495e;
  margin: 20px 0;
  line-height: 1.6;
  margin-bottom: 10px;
}

.bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-top: -240px;
}

.recipient-photo {
  width: 150px;
  height: 150px;
  border: 2px solid #c4a300;
  margin-left: auto;
  margin-right: auto;
  display: block;
  object-fit: cover;
}

.signature-section {
  text-align: center;
  flex-grow: 1;
  margin-left: auto;
  max-width: 250px;
}

.signature-line {
  width: 100px;
  height: 20px;
  background: #2c3e50;
  margin: 10px auto;
}

/* Stamp Styles */
.stamp {
  position: absolute;
  bottom: 55px;
  right: 130px;
  width: 120px;
  height: 120px;
  transform: rotate(deg); /*sesuaikan rotasi dengan - misal -1deg*/
  z-index: 2;
}

.stamp-border {
  width: 70%;
  height: 70%;
  border: 3px solid #c4a300;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 0 15px rgba(196, 163, 0, 0.2);
  animation: pulse 2s infinite;
}

.stamp-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.stamp i {
  font-size: 40px;
  color: #c4a300;
  stroke-width: 2px;
}

.verified-text {
  font-size: 12px;
  font-weight: bold;
  color: #c4a300;
  letter-spacing: 1px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(196, 163, 0, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(196, 163, 0, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(196, 163, 0, 0);
  }
}

/* Border Pattern Styles */
.border-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 2px solid #c4a300;
  margin: 10px;
  pointer-events: none;
}

.border-pattern::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid #c4a300;
}

/* Preview Image Styles */
.preview-image {
  max-width: 100px;
  margin: 10px auto;
  display: block;
}

/* Footer Styles */
.certificate-footer {
  position: absolute;
  bottom: 8px;
  right: 88px;
  font-size: 11px;
  color: rgba(44, 62, 80, 0.3);
  font-style: italic;
  transform: rotate(0deg);
  z-index: 2;
  font-family: "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .control-panel {
    padding: 15px;
  }

  .button-group {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    max-width: 100%;
  }

  .certificate {
    transform: scale(0.8);
    transform-origin: top center;
  }
}

/* Print Styles */
@media print {
  .control-panel {
    display: none;
  }

  .certificates-preview {
    gap: 0;
    padding: 0;
  }

  .certificate {
    margin: 0;
    page-break-after: always;
  }

  .certificate-footer {
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
  }
}

/* jarak antara container id */
.id-format-settings {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background: #fff;
  border-radius: 8px;
}

.recipient-row {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1.5fr auto;
  gap: 150px;
  align-items: start;
}

.edit-id-btn {
  padding: 5px 10px;
  font-size: 12px;
  margin-top: 30px;
}

.remove-recipient {
  background: #ff4444;
  color: white;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-top: 25px;
}

.photo-preview {
  max-width: 100px;
  max-height: 100px;
  margin-top: -107px;
  margin-left: 87px;
}

.add-button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #28a745;
  width: auto;
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .remove-recipient {
    margin-top: 0;
  }
}
/*tanda tangan*/
.signature-preview-container {
  margin-top: 10px;
  text-align: center;
}

.signature-preview-container img {
  max-width: 200px;
  max-height: 100px;
  object-fit: contain;
  margin: 10px auto;
  display: block;
}

.help-text {
  color: #666;
  font-size: 12px;
  display: block;
  margin-top: 5px;
}

/* Update certificate signature section */
.signature-section {
  text-align: center;
  flex-grow: 1;
  margin-left: auto;
  max-width: 250px;
  margin-top: 110px;
  position: relative;
}

.signature-image {
  max-width: 350px;
  max-height: 250px;
  object-fit: contain;
  margin: 1px auto;
  display: block;
}
/*ttd edit*/
.signature-settings {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.signature-settings h4 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.signature-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.signature-control label {
  min-width: 80px;
  margin: 0;
}

.signature-control .slider {
  flex: 1;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  outline: none;
}

.signature-control span {
  min-width: 50px;
  text-align: right;
  color: #666;
}

/* Style untuk tanda tangan yang bisa diatur */
.signature-image {
  cursor: move;
  transition: transform 0.2s ease;
}

/*footer*/
.app-footer {
  background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
  padding: 20px 0;
  margin-top: 50px;
  border-radius: 15px;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.copyright {
  color: #fff;
}

.brand-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  position: relative;
  padding-bottom: 2px;
  transition: all 0.3s ease;
}

.brand-link:after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #fff;
  transition: width 0.3s ease;
}

.brand-link:hover:after {
  width: 100%;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  color: #fff;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-link:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, #00c3ff, #ff00c3);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.social-link:hover:before {
  opacity: 1;
}

.social-link i,
.social-link svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 2;
  transition: transform 0.3s ease;
}

.social-link:hover i,
.social-link:hover svg {
  transform: scale(1.2);
}

.tiktok-icon {
  stroke-width: 2;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

/* Print styles */
@media print {
  .app-footer {
    display: none;
  }
}
