/* Reset y base */
*, *::before, *::after {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #0077ff 0%, #005bcc 100%);
  color: #e0eaff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1rem 6rem;
  user-select: none;
}
header {
  font-size: 2.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.container {
  background: rgba(255 255 255 / 0.1);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 15px 30px rgba(0,0,0,.3);
  max-width: 480px;
  width: 100%;
  animation: fadeInUp 0.7s ease forwards;
}
.input-group {
  position: relative;
  margin-bottom: 1.5rem;
}
input[type="text"] {
  width: 100%;
  padding: 15px 50px 15px 20px;
  border-radius: 50px;
  border: none;
  font-size: 1rem;
  outline: none;
  transition: box-shadow 0.3s ease;
  color: #003366;
  font-weight: 600;
}
input[type="text"]:focus {
  box-shadow: 0 0 8px 3px rgba(0, 119, 255, 0.7);
  background: #fff;
}
.btn-paste {
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
  background: #005bcc;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  color: white;
  font-size: 18px;
  transition: background 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}
.btn-paste:hover {
  background: #0077ff;
}

.btn-download {
  width: 100%;
  background: #004aad;
  cursor: pointer;
  padding: 0.9rem;
  border-radius: 50px;
  font-weight: 600;
  color: white;
  font-size: 1.1rem;
  box-shadow: 0 4px 12px rgba(0,74,173,.8);
  transition: background 0.3s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  user-select: none;
}
.btn-download i {
  margin-right: 8px;
  filter: drop-shadow(0 0 2px rgba(255 255 255 / 0.65));
}
.btn-download:hover:enabled {
  background: #005bcc;
  transform: scale(1.05);
}
.btn-download:active:enabled {
  transform: scale(0.95);
}
.btn-download:disabled {
  background: #002a6a;
  cursor: not-allowed;
  transform: none;
}

/* Loader spinner in button */
.loader {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  margin-left: 10px;
  animation: spin 1s linear infinite;
  display: none;
}
.btn-download.loading .loader {
  display: inline-block;
}

.preview {
  margin-top: 1rem;
  text-align: center;
  animation: fadeIn 0.6s ease forwards;
}
.preview img {
  width: 100%;
  max-height: 250px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  object-fit: cover;
  user-select: none;
}
.video-links {
  margin-top: 1.5rem;
  text-align: center;
}
button.download-btn {
  background: #0077ff;
  color: white;
  border: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.65rem 1.6rem;
  margin: 0.4rem 0.5rem 0 0;
  border-radius: 35px;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(0,119,255,0.6);
  transition: background 0.35s ease, transform 0.3s ease;
  display: inline-flex;
  align-items: center;
}
button.download-btn i {
  margin-right: 8px;
  filter: drop-shadow(0 0 2px rgba(255 255 255 / 0.65));
}
button.download-btn:hover {
  background: #005bcc;
  transform: scale(1.05);
}
button.download-btn:active {
  transform: scale(0.95);
}

.footer {
  margin-top: auto;
  background: rgba(0, 75, 173, 0.8);
  width: 100%;
  max-width: 480px;
  border-radius: 15px;
  padding: 1.2rem 1.5rem;
  color: #d0d8e8dd;
  font-size: 0.9rem;
  user-select: none;
  box-shadow: 0 0 12px rgba(0,0,0,0.4);
  text-align: center;
  font-weight: 500;
}
.social-links {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 1.6rem;
  font-size: 1.4rem;
}
.social-links a {
  color: #d0d8e8dd;
  transition: color 0.3s ease;
}
.social-links a:hover {
  color: #0077ff;
}

/* Animaciones & responsive */
@keyframes fadeInUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1.2rem;
  }
  button.download-btn {
    font-size: 0.9rem;
    padding: 0.5rem 1.2rem;
  }
  .footer {
    font-size: 0.85rem;
  }
  .social-links {
    font-size: 1.2rem;
    gap: 1rem;
  }
}
