* {
  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;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

.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(168, 85, 247, 0.22);
  text-shadow: 0 0 12px rgba(168, 85, 247, 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; }
}

.card {
  margin: auto auto;
  position: relative;
  margin-top: 35px;
  margin-bottom: 40px;
  z-index: 10;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.25);
  padding: 2.5rem 2rem;
  border-radius: 24px;
  width: 100%;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 0 40px rgba(168, 85, 247, 0.2), 0 20px 50px rgba(0, 0, 0, 0.85);
}

.header-icon { font-size: 3.4rem; margin-bottom: 0.8rem; }
.glow-icon { color: #a855f7; filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.8)); }

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  background: linear-gradient(90deg, #a855f7, #38bdf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.form-group { margin-bottom: 1.2rem; text-align: left; }
.label-title {
  display: block;
  font-size: 0.85rem;
  color: #c084fc;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

/* Style de la barre de recherche avec icône */
.search-bar-container {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #a855f7;
  font-size: 0.95rem;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 16px 14px 45px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  background: rgba(10, 15, 30, 0.9);
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #a855f7;
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}

.select-box {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.25);
  background: rgba(10, 15, 30, 0.9);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
}

.drop-zone {
  border: 2px dashed rgba(168, 85, 247, 0.35);
  background: rgba(10, 15, 30, 0.5);
  padding: 30px 20px;
  border-radius: 16px;
  cursor: pointer;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: #a855f7;
  background: rgba(168, 85, 247, 0.08);
}

.upload-icon { font-size: 2.5rem; color: #a855f7; margin-bottom: 10px; }
.drop-zone-content p { color: #e2e8f0; font-size: 0.95rem; margin-bottom: 5px; }
.drop-zone-content p span { color: #38bdf8; font-weight: 600; }
.drop-zone-content small { color: #94a3b8; font-size: 0.8rem; }

.btn-submit {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  background: linear-gradient(90deg, #9333ea 0%, #7c3aed 50%, #0284c7 100%);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(168, 85, 247, 0.35);
  transition: transform 0.3s ease;
}

.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn-submit:not(:disabled):hover { transform: translateY(-2px); }

#result { margin-top: 1.5rem; }
.media-card {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(168, 85, 247, 0.3);
  padding: 20px;
  border-radius: 16px;
  text-align: left;
}

.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;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.35);
  margin-top: 10px;
}

.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;
  gap: 8px;
}