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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #050914;
  color: #f8fafc;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Arrière-plan animé */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.badge-particle {
  position: absolute;
  color: rgba(24, 119, 242, 0.22);
  text-shadow: 0 0 12px rgba(24, 119, 242, 0.4);
  font-weight: 800;
  font-size: 1.2rem;
  user-select: none;
  animation: floatUp 14s infinite linear;
}

@keyframes floatUp {
  0% {
    transform: translateY(110vh) rotate(0deg) scale(0.8);
    opacity: 0;
  }
  15% { opacity: 0.8; }
  85% { opacity: 0.8; }
  100% {
    transform: translateY(-10vh) rotate(360deg) scale(1.2);
    opacity: 0;
  }
}

/* Carte principale Futuriste (Glassmorphism + Neon Cyberpunk Facebook) */
.card {
  position: relative;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(24, 119, 242, 0.25);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 0 40px rgba(24, 119, 242, 0.2), 0 20px 50px rgba(0, 0, 0, 0.85);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 50px rgba(24, 119, 242, 0.3), 0 20px 50px rgba(0, 0, 0, 0.9);
}

.header-icon {
  font-size: 3.4rem;
  margin-bottom: 0.8rem;
}

.glow-icon {
  color: #1877f2;
  filter: drop-shadow(0 0 15px rgba(24, 119, 242, 0.8));
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 0.4rem;
  background: linear-gradient(90deg, #1877f2, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

p.subtitle {
  color: #94a3b8;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Barre de recherche futuriste avec intégration d'actions */
.input-group {
  position: relative;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: #1877f2;
  font-size: 1.2rem;
  filter: drop-shadow(0 0 5px rgba(24, 119, 242, 0.6));
  z-index: 2;
}

input {
  width: 100%;
  padding: 16px 140px 16px 48px;
  border-radius: 14px;
  border: 1px solid rgba(24, 119, 242, 0.25);
  background: rgba(10, 15, 30, 0.9);
  color: #fff;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

input:focus {
  outline: none;
  border-color: #1877f2;
  box-shadow: 0 0 20px rgba(24, 119, 242, 0.35);
}

/* Actions dans l'input (Copier / X) */
.input-actions {
  position: absolute;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 3;
}

.action-btn {
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-paste {
  background: rgba(24, 119, 242, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(24, 119, 242, 0.35);
}

.btn-paste:hover {
  background: rgba(24, 119, 242, 0.3);
  box-shadow: 0 0 12px rgba(24, 119, 242, 0.45);
}

.btn-clear {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.35);
  padding: 8px 10px;
}

.btn-clear:hover {
  background: rgba(239, 68, 68, 0.3);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* Bouton Submit aux couleurs néon Facebook */
.btn-submit {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #1877f2 0%, #0284c7 50%, #2563eb 100%);
  background-size: 200% 200%;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(24, 119, 242, 0.35);
}

.btn-submit:hover {
  background-position: right center;
  transform: translateY(-2deg);
  box-shadow: 0 8px 25px rgba(24, 119, 242, 0.55);
}

/* Zone des résultats */
#result { margin-top: 1.5rem; }

.media-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(24, 119, 242, 0.3);
  padding: 20px;
  border-radius: 16px;
  text-align: left;
  animation: fadeIn 0.4s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

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

.video-cover {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: block;
}

.media-title {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 14px;
}

.format-header {
  font-size: 0.85rem;
  color: #38bdf8;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.btn-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.dl-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}

.dl-btn-hd {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.35);
}
.dl-btn-hd:hover {
  background: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 15px rgba(34, 197, 94, 0.45);
}

.dl-btn-sd {
  background: rgba(24, 119, 242, 0.15);
  color: #38bdf8;
  border-color: rgba(24, 119, 242, 0.35);
}
.dl-btn-sd:hover {
  background: rgba(24, 119, 242, 0.35);
  box-shadow: 0 0 15px rgba(24, 119, 242, 0.45);
}

.dl-btn-audio {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}
.dl-btn-audio:hover {
  background: rgba(168, 85, 247, 0.35);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.45);
}

.spinner { animation: rotate 1s linear infinite; }
@keyframes rotate { 100% { transform: rotate(360deg); } }

.error-msg {
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}