/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-image: url("back.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* Navbar styles */
.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: transparent;
}

.navbar img {
  height: 40px;
}

/* Container styles */
.container {
  margin-top: 35px;
  padding: 20px;
  flex-grow: 1;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Hero section */
.hero-section {
  text-align: center;
  margin-bottom: 15px;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-title {
  font-size: 2.5rem;
  color: #fff;
  text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000,
    -2px 2px 0 #000, 0 2px 0 #000, 2px 0 0 #000, 0 -2px 0 #000, -2px 0 0 #000;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 auto;
  padding: 5px 0;
}

/* Form styles */
#qr-form {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin: 0 auto;
}

input[type="text"],
input[type="url"] {
  width: 100%;
  padding: 12px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.image-upload {
  margin: 15px 0;
}

.image-upload label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 500;
}

input[type="file"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background-color: white;
}

/* Button styles */
button[type="submit"],
.refresh-btn,
#downloadPdf,
#closeModal,
#downloadPng {
  padding: 12px;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 5px 0;
}

button[type="submit"] {
  width: auto;
  min-width: 120px;
  margin: 10px auto;
}

button[type="submit"]:hover,
.refresh-btn:hover,
#downloadPdf:hover,
#closeModal:hover,
#downloadPng:hover {
  background-color: #45a049;
}

.refresh-btn i {
  font-size: 16px;
}

/* QR Code styles */
#qrcode {
  margin: 20px 0;
  text-align: center;
}

/* Loader styles */
.loader-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.loader {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1000;
}

.loader:after {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 6px solid #fff;
  border-color: #4caf50 transparent #4caf50 transparent;
  animation: loader 1.2s linear infinite;
}

@keyframes loader {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Social section styles */
.social-section {
  background: rgba(255, 255, 255, 0.95);
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  width: 100%;
  margin: 20px auto;
  text-align: center;
}

.social-section h3 {
  font-size: 1.5rem;
  color: #333;
  margin-bottom: 10px;
}

.social-section p {
  color: #666;
  margin-bottom: 15px;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 15px;
}

/* Social icon specific styles */
.social-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 24px;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #fff;
}

.social-icon i {
  color: #fff; /* Pastikan ikon selalu putih */
}

/* Specific colors for each social platform */
.social-icon:nth-child(1) {
  background: #e4405f; /* Instagram */
}

.social-icon:nth-child(2) {
  background: #1877f2; /* Facebook */
}

.social-icon:nth-child(3) {
  background: #000000; /* TikTok */
}

.social-icon:nth-child(4) {
  background: #25d366; /* WhatsApp */
}

.social-icon:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1001;
}

.modal-content {
  position: relative;
  background: white;
  margin: 15% auto;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  border-radius: 10px;
  text-align: center;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 28px;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #333;
}

#modal-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/*style bingkai kode qr*/
.qr-wrapper {
  transition: transform 0.3s ease;
}

.qr-wrapper:hover {
  transform: scale(1.02);
}

.corner {
  border-radius: 2px;
  transition: all 0.3s ease;
}

#qrcode {
  perspective: 1000px;
}

#qrcode img {
  max-width: 100%;
  height: auto;
}

/* Styling untuk tombol Download PNG */
#downloadPng {
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin: 5px;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#downloadPng:hover {
  background-color: #45a049;
}


/* Footer Styles */
.footer {
  text-align: center;
  padding: 8px;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 60px;
  position: relative;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
}

.footer::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
  z-index: -1;
  border-radius: 12px;
}

.footer-content {
  position: relative;
  z-index: 1;
}

.footer a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: 8px 8px;
  background: rgba(10, 0, 0, 0.694);
  border-radius: 25px;
  transition: all 0.3s ease;
  margin: 0 10px;
  position: relative;
  overflow: hidden;
}

.footer a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0),
    transparent
  );
  transition: all 0.5s ease;
}

.footer a:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.footer a:hover::before {
  left: 100%;
}
/* Refresh button container */
.refresh-container {
  text-align: center;
  margin: 20px 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .hero-title {
    font-size: 2rem;
  }

  #qr-form {
    padding: 20px;
  }

  .social-icons {
    gap: 15px;
  }

  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .modal-content {
    margin: 20% auto;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .navbar img {
    height: 35px;
  }

  .social-icons {
    gap: 10px;
  }

  .social-icon {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }

  button[type="submit"],
  .refresh-btn {
    font-size: 14px;
    padding: 10px;
  }
}
