* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', sans-serif;
  background: linear-gradient(135deg, #0a0a1a 0%, #12122e 50%, #0a0a1a 100%);
  color: #fff;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Background minimal dengan efek lebih baik */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.4;
}

.particle {
  position: absolute;
  background: radial-gradient(circle, rgba(0, 195, 255, 0.8) 0%, rgba(0, 195, 255, 0) 70%);
  border-radius: 50%;
  animation: float 8s infinite ease-in-out;
  box-shadow: 0 0 15px rgba(0, 195, 255, 0.6);
}

@keyframes float {
  0%, 100% { 
    transform: translateY(0) translateX(0) scale(1); 
    opacity: 0.4;
  }
  33% { 
    transform: translateY(-30px) translateX(20px) scale(1.1); 
    opacity: 0.7;
  }
  66% { 
    transform: translateY(20px) translateX(-20px) scale(0.9); 
    opacity: 0.5;
  }
}

/* Container utama */
.container {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 40px);
}

/* Kartu utama dengan efek lebih baik */
.card {
  background: rgba(10, 10, 26, 0.75);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 195, 255, 0.4);
  border-radius: 24px;
  padding: 35px 30px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 30px rgba(0, 195, 255, 0.3),
    inset 0 0 20px rgba(0, 195, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 35px;
}

.app-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #00c3ff, #0066ff);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  box-shadow: 
    0 0 20px rgba(0, 195, 255, 0.8),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.app-icon::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transform: rotate(45deg) translate(-100%, -100%);
  transition: all 0.6s;
}

.app-icon:hover::after {
  animation: shine 0.6s ease-in-out;
}

@keyframes shine {
  0% { transform: rotate(45deg) translate(-100%, -100%); }
  100% { transform: rotate(45deg) translate(100%, 100%); }
}

.app-icon:hover {
  transform: translateY(-3px);
  box-shadow: 
    0 10px 25px rgba(0, 195, 255, 0.9),
    inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 195, 255, 0.8);
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
}

/* Form inputs dengan efek lebih baik */
.input-group {
  margin-bottom: 22px;
  position: relative;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 10px;
  padding-left: 5px;
  letter-spacing: 0.3px;
}

.input-field {
  width: 100%;
  padding: 16px 18px;
  background: rgba(0, 195, 255, 0.08);
  border: 1px solid rgba(0, 195, 255, 0.35);
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 12px rgba(0, 195, 255, 0.15),
    inset 0 0 5px rgba(0, 0, 0, 0.2);
}

.input-field:focus {
  outline: none;
  border-color: rgba(0, 195, 255, 0.9);
  background: rgba(0, 195, 255, 0.12);
  box-shadow: 
    0 0 20px rgba(0, 195, 255, 0.4),
    inset 0 0 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.input-field::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* Select styling */
.input-select {
  width: 100%;
  padding: 16px 18px;
  background: rgba(0, 195, 255, 0.08);
  border: 1px solid rgba(0, 195, 255, 0.35);
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 
    0 0 12px rgba(0, 195, 255, 0.15),
    inset 0 0 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 45px;
}

.input-select:focus {
  outline: none;
  border-color: rgba(0, 195, 255, 0.9);
  background: rgba(0, 195, 255, 0.12);
  box-shadow: 
    0 0 20px rgba(0, 195, 255, 0.4),
    inset 0 0 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.input-select option {
  background: #12122e;
  color: #fff;
}

/* Tombol dengan efek lebih baik */
.btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(135deg, #00c3ff, #0066ff);
  border: none;
  border-radius: 14px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 12px;
  box-shadow: 
    0 5px 15px rgba(0, 195, 255, 0.5),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: all 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(0, 195, 255, 0.7),
    inset 0 0 15px rgba(255, 255, 255, 0.3);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 
    0 3px 10px rgba(0, 195, 255, 0.5),
    inset 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Loading state dengan animasi lebih baik */
.loading {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 0;
}

.spinner-container {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 25px;
}

.spinner {
  width: 100%;
  height: 100%;
  border: 3px solid rgba(0, 195, 255, 0.2);
  border-top: 3px solid #00c3ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 
    0 0 20px rgba(0, 195, 255, 0.6),
    inset 0 0 10px rgba(0, 195, 255, 0.3);
}

.pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(0, 195, 255, 0.3);
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.8; }
  70% { transform: scale(1.2); opacity: 0; }
  100% { transform: scale(1.2); opacity: 0; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Result state dengan tampilan lebih baik */
.result {
  display: none;
  text-align: center;
}

.result-title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 25px;
  color: #fff;
  text-shadow: 0 0 15px rgba(0, 195, 255, 0.8);
}

.result-image-container {
  position: relative;
  margin-bottom: 25px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 10px 30px rgba(0, 0, 0, 0.5),
    0 0 25px rgba(0, 195, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-image-container:hover {
  transform: scale(1.02);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.7),
    0 0 35px rgba(0, 195, 255, 0.5);
}

.result-image {
  width: 100%;
  display: block;
  border: 1px solid rgba(0, 195, 255, 0.4);
}

.download-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.result-image-container:hover .download-hint {
  opacity: 1;
}

.download-instructions {
  background: rgba(0, 195, 255, 0.1);
  border: 1px solid rgba(0, 195, 255, 0.3);
  border-radius: 14px;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.download-instructions-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #00c3ff;
}

.btn-secondary {
  background: transparent;
  border: 1px solid rgba(0, 195, 255, 0.6);
  margin-top: 10px;
  position: relative;
  overflow: hidden;
}

.btn-secondary:hover {
  background: rgba(0, 195, 255, 0.1);
  box-shadow: 0 4px 15px rgba(0, 195, 255, 0.4);
  border-color: rgba(0, 195, 255, 0.8);
}

/* Animasi halus */
.fade-in {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(15px);
  }
  to { 
    opacity: 1; 
    transform: translateY(0);
  }
}

/* Efek glow untuk kartu saat fokus */
.card:focus-within {
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(0, 195, 255, 0.5),
    inset 0 0 20px rgba(0, 195, 255, 0.2);
}

/* Progress bar untuk loading */
.progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #00c3ff, #0066ff);
  border-radius: 2px;
  width: 0;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

/* Loading overlay untuk download */
.download-loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.download-loading.show {
  display: flex;
}

.download-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.download-text {
  color: #fff;
  margin-top: 15px;
  font-size: 16px;
}

/* Animasi pulse untuk gambar saat ditekan */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.pressing {
  animation: pulse 0.3s ease-in-out;
}

/* Icon untuk petunjuk download */
.download-icon {
  display: inline-block;
  margin-right: 5px;
  vertical-align: middle;
}

/* Notifikasi error */
.notification {
  background: rgba(255, 59, 48, 0.15);
  border: 1px solid rgba(255, 59, 48, 0.5);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  animation: slideDown 0.3s ease-out;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.notification-message {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.4;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Efek shake untuk input yang salah */
.input-field.error,
.input-select.error {
  border-color: rgba(255, 59, 48, 0.8) !important;
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Footer styling */
.footer {
  margin-top: 40px;
  text-align: center;
  width: 100%;
  padding: 20px 0;
  border-top: 1px solid rgba(0, 195, 255, 0.2);
}

.footer-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer-link {
  color: rgba(0, 195, 255, 0.8);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.footer-link:hover {
  color: #00c3ff;
  text-shadow: 0 0 10px rgba(0, 195, 255, 0.6);
}