/* ==========================================================================
   RESET & ULTRA MODERN PREMIUM CYBER DESIGN
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #06060a;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #f1f5f9;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

/* Animasi Ambient Latar Belakang Bergerak Lambat */
.bg-glow {
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 700px;
  height: 450px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.04) 50%, transparent 100%);
  z-index: -1;
  pointer-events: none;
  animation: ambientPulse 8s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
  0% { opacity: 0.7; transform: translateX(-50%) scale(0.95); }
  100% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

.container {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

/* Header & Logo */
.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.logo-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  box-shadow: 0 12px 30px -5px rgba(124, 58, 237, 0.5);
  animation: floatIcon 4s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.logo-text {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.75px;
  background: linear-gradient(135deg, #c084fc, #f472b6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-text span {
  color: #94a3b8;
  background: none;
  font-weight: 400;
  margin-left: 2px;
}

.tagline {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
  letter-spacing: 0.3px;
}

/* Premium Card Container */
.card {
  background: rgba(15, 15, 24, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: 24px;
  padding: 1.75rem;
  border: 1px solid rgba(255, 255, 255, 0.04);
  margin-bottom: 1.25rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  width: 100%;
  overflow: hidden;
  transition: border-color 0.3s ease, transform 0.3s ease;
}

.card:hover {
  border-color: rgba(139, 92, 246, 0.2);
}

/* Input Group */
.input-group {
  position: relative;
  margin-bottom: 1.25rem;
  height: 54px;
  width: 100%;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a78bfa;
  font-size: 1.05rem;
  z-index: 2;
}

.url-input {
  width: 100%;
  height: 100%;
  padding: 0 3rem 0 3.25rem;
  background: #11111a;
  border: 1.5px solid #222235;
  border-radius: 50px;
  color: #fff;
  font-size: 0.9rem;
  font-family: inherit;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.url-input:focus {
  outline: none;
  border-color: #8b5cf6;
  background: #141424;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

.clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: #1c1c2e;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: none; /* Diatur via JS flex/none */
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  z-index: 3;
  transition: background 0.2s, color 0.2s;
}

.clear-btn:hover {
  background: #292942;
  color: #fff;
}

/* Badge Server */
.badge-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.45rem 1.25rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.25);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c084fc;
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.05);
}

.badge i {
  animation: pulseIcon 2s infinite;
}

@keyframes pulseIcon {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

/* Group & Tombol Utama (Tebal, Empuk & Centered Sempurna) */
.button-group {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 1.5rem;
  height: 54px;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

/* Efek Shimmer Kilauan Berjalan */
.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -150%;
  width: 120%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  transition: none;
}

.btn:hover::before {
  left: 150%;
  transition: left 0.6s ease-in-out;
}

.btn-video {
  background: linear-gradient(135deg, #6d28d9, #4f46e5);
  box-shadow: 0 6px 20px rgba(109, 40, 217, 0.35), 0 0 0 0px rgba(109, 40, 217, 0.2);
}

.btn-audio {
  background: linear-gradient(135deg, #db2777, #b91c1c);
  box-shadow: 0 6px 20px rgba(219, 39, 119, 0.35), 0 0 0 0px rgba(219, 39, 119, 0.2);
}

.btn:hover {
  transform: translateY(-3px);
}

.btn-video:hover { box-shadow: 0 10px 25px rgba(109, 40, 217, 0.5), 0 0 12px rgba(109, 40, 217, 0.3); }
.btn-audio:hover { box-shadow: 0 10px 25px rgba(219, 39, 119, 0.5), 0 0 12px rgba(219, 39, 119, 0.3); }
.btn:active { transform: translateY(-1px) scale(0.98); }

.btn i {
  font-size: 1rem;
}

/* Card Cara Pakai (Howto) */
.howto-card {
  background: linear-gradient(135deg, rgba(15,15,24,0.9), rgba(20,10,30,0.4));
}

.howto-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.howto-header i {
  color: #a78bfa;
  font-size: 1.1rem;
}

.howto-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.howto-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.howto-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.howto-num {
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #7c3aed, #db2777);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 1px;
  box-shadow: 0 4px 10px rgba(124, 58, 237, 0.3);
}

.howto-text {
  font-size: 0.8rem;
  color: #94a3b8;
  line-index: 1.5;
}

.howto-text i {
  margin-right: 4px;
  color: rgba(167, 139, 250, 0.7);
}

/* Grid Fitur */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 1.5rem;
  width: 100%;
}

.feature {
  background: #0f0f18;
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.02);
  transition: all 0.25s ease;
}

.feature:hover {
  background: #141424;
  border-color: rgba(244, 114, 182, 0.15);
  transform: translateY(-2px);
}

.feature i {
  font-size: 1.3rem;
  color: #f472b6;
  margin-bottom: 6px;
  display: block;
}

.feature span {
  font-size: 0.7rem;
  color: #94a3b8;
  font-weight: 500;
}

/* Loading Card & Animasi Progress */
.loading-card {
  background: #0f0f18;
  border-radius: 24px;
  padding: 2rem;
  text-align: center;
  border: 1px solid rgba(139, 92, 246, 0.2);
  margin-bottom: 1.25rem;
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 1.25rem;
  border: 3px solid rgba(139, 92, 246, 0.1);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.progress-track {
  background: #151522;
  border-radius: 100px;
  height: 5px;
  margin: 1.25rem 0;
  overflow: hidden;
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #db2777);
  transition: width 0.2s ease;
}

.loading-text {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 500;
}

/* ==========================================================================
   KODE LAYOUT HASIL PENCERIAN (RESULT CARD)
   ========================================================================== */
.result-card {
  background: #0f0f18;
  border-radius: 24px;
  padding: 1.25rem;
  border: 1px solid rgba(16, 185, 129, 0.3);
  margin-bottom: 1.25rem;
  width: 100%;
  box-sizing: border-box;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.result-preview {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
  align-items: center;
}

.result-thumb {
  position: relative;
  width: 110px;
  height: 62px;
  background: #151522;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.duration-badge {
  position: absolute;
  bottom: 4px; right: 4px;
  background: rgba(0, 0, 0, 0.85);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}

.result-info {
  min-width: 0;
  flex: 1;
}

.result-title {
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 6px;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.7rem;
  color: #64748b;
}

.result-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.quality-chip {
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: 20px;
  color: #34d399;
  font-weight: 700;
}

.file-info {
  background: #141422;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  font-family: monospace;
  color: #c084fc;
}

.file-info span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Tombol Download Link Hijau Permanen Tebal */
a.download-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  width: 100% !important;
  height: 52px !important;
  min-height: 52px !important;
  background: linear-gradient(135deg, #10b981, #059669) !important;
  border-radius: 50px !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35) !important;
  box-sizing: border-box !important;
  transition: transform 0.2s, box-shadow 0.2s;
}

a.download-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(16, 185, 129, 0.5) !important;
}

.secure-note {
  margin-top: 10px;
  font-size: 0.65rem;
  text-align: center;
  color: #475569;
}

.error {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid #ef4444;
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fca5a5;
  font-size: 0.8rem;
  margin-bottom: 1.25rem;
}

/* Footer & Donasi */
.footer {
  text-align: center;
  margin-top: 1rem;
}

.donate-btn {
  background: rgba(219, 39, 119, 0.06);
  border: 1.5px solid rgba(219, 39, 119, 0.25);
  padding: 10px 24px;
  border-radius: 50px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  margin-bottom: 1.25rem;
  font-family: inherit;
}

.donate-btn:hover {
  border-color: #db2777;
  transform: translateY(-2px);
  background: rgba(219, 39, 119, 0.12);
  box-shadow: 0 0 15px rgba(219, 39, 119, 0.2);
}

.donate-btn i:first-child {
  color: #db2777;
  animation: heartbeat 1.4s infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.social-links a {
  width: 38px;
  height: 38px;
  background: #0f0f18;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1.05rem;
  transition: all 0.2s;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.01);
}

.social-links a:hover {
  transform: translateY(-3px);
}

.social-links a:first-child:hover { color: #25D366; background: rgba(37,211,102,0.1); border-color: rgba(37,211,102,0.2); }
.social-links a:last-child:hover { color: #fff; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.1); }

.copyright {
  font-size: 0.65rem;
  color: #475569;
}

/* Overlay Modal Pop-up */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(3, 3, 6, 0.9);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #0f0f18;
  border-radius: 24px;
  max-width: 320px;
  width: 90%;
  padding: 24px;
  text-align: center;
  border: 1px solid rgba(219, 39, 119, 0.3);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close {
  float: right;
  background: none;
  border: none;
  color: #64748b;
  font-size: 1.2rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  transition: background 0.2s;
}

.modal-close:hover { background: #1c1c2e; color: #fff; }

.modal h3 {
  margin: 14px 0 10px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal p {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 20px;
  line-height: 1.5;
}

.modal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #db2777, #7c3aed);
  border-radius: 50px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(219, 39, 119, 0.3);
}

.hidden { display: none !important; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   BREAKPOINTS RESPONSIVE ANTI GEPENG & TEBAL DI LAYAR MOBILE
   ========================================================================== */
@media (max-width: 480px) {
  .container {
    padding: 1.5rem 0.85rem;
  }
  
  .card {
    padding: 1.35rem 1rem;
    border-radius: 20px;
  }
  
  .logo-text { font-size: 1.65rem; }
  .logo-icon { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }

  /* Set vertikal stack tombol utama */
  .button-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* SINKRONISASI UTAMA: Tombol tebal 54px, kokoh, dan teks berada di tengah rata */
  .btn {
    width: 100% !important;
    height: 54px !important;
    min-height: 54px !important;
    padding: 0 1.5rem !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    border-radius: 14px !important;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .result-preview {
    gap: 10px;
  }
  
  .result-thumb {
    width: 90px;
    height: 50px;
  }
}
