:root {
  --primary: #405de6;
  --secondary: #5851db;
  --accent: #833ab4;
  --bg: #0b0b10;
  --surface: #111318;
  --surface-2: #161821;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --purple: #7c3aed;
  --purple-2: #a855f7;
  --gradient: linear-gradient(135deg, var(--purple), var(--purple-2));
  --card-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.6);
  --text-dark: #262626;
  --text-light: #8e8e8e;
  --bg-light: #fafafa;
}

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

body {
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(circle at 30% 50%, rgba(64, 93, 230, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
  position: relative;
}

.corner-gradients {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}
.corner-gradients::before,
.corner-gradients::after {
  content: "";
  position: absolute;
  width: 70vmin;
  height: 70vmin;
  filter: blur(60px);
  opacity: 0.35;
  transition: opacity .3s ease;
  background: radial-gradient(closest-side, var(--purple-2), transparent 70%);
  animation: floaty 14s ease-in-out infinite alternate;
}
.corner-gradients::before {
  top: -15vmin;
  left: -15vmin;
}
.corner-gradients::after {
  bottom: -15vmin;
  right: -15vmin;
  animation-delay: -5s;
}
@keyframes floaty {
  0% {
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(10px, -8px, 0) rotate(8deg);
  }
}

header {
  background: transparent;
  color: white;
  padding: 1.75rem 1rem 1rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

.logo i {
  font-size: 2rem;
  color: var(--purple-2);
}

.logo h1 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
}

.tagline {
  font-size: 0.9rem;
  opacity: 0.9;
  color: var(--muted);
}

.social-links {
  margin-top: .75rem;
  display: flex;
  gap: .75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .9rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.25);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.social-link:hover {
  transform: translateY(-1px);
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(168, 85, 247, 0.4);
}

main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.container {
  width: 100%;
  max-width: 700px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: all 0.3s ease;
}

.container:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.15);
}

.input-section {
  padding: 2.5rem;
  background: transparent;
}

h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text);
  font-weight: 600;
}

.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.input-group input {
  flex: 1;
  padding: 15px 20px;
  background-color: var(--surface-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.input-group input:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.25);
  background-color: var(--surface);
}

.input-group input::placeholder {
  color: var(--muted);
}

.btn {
  padding: 15px 30px;
  background: var(--gradient);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(124, 58, 237, 0.55);
  filter: brightness(1.05);
}

.btn:active {
  transform: translateY(0);
}

.result-section {
  padding: 0 2.5rem 2.5rem;
  display: none;
}

.spinner {
  border: 4px solid rgba(124, 58, 237, 0.15);
  border-left-color: var(--purple);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
  display: none;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.media-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.video-preview {
  width: 100%;
  max-width: 720px;
  border-radius: 12px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--card-shadow);
  transition: transform .25s ease;
}

.video-preview:hover {
  transform: scale(1.01);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .75rem;
}
.gallery img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 10px 22px -12px rgba(0, 0, 0, 0.45);
}
.gallery img:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 28px -12px rgba(0, 0, 0, 0.6);
}

.thumbnail {
  width: 100%;
  max-width: 300px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.thumbnail:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.download-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  width: 100%;
}

.download-btn {
  padding: 12px 25px;
  background: var(--gradient);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(124, 58, 237, 0.55);
}

.error-message {
  color: #fecaca;
  background-color: rgba(220, 38, 38, 0.12);
  padding: 15px;
  border-radius: 8px;
  margin-top: 1rem;
  text-align: center;
  border: 1px solid rgba(220, 38, 38, 0.35);
}

.success-message {
  color: #bbf7d0;
  background-color: rgba(22, 163, 74, 0.12);
  padding: 15px;
  border-radius: 8px;
  margin-top: 1rem;
  text-align: center;
  border: 1px solid rgba(22, 163, 74, 0.35);
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  background: transparent;
}

.feature-card {
  background: var(--surface);
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--purple-2);
}

.feature-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-desc {
  color: var(--text-light);
  font-size: 0.9rem;
}

footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  background: transparent;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 768px) {
  .input-section,
  .result-section {
    padding: 1.5rem;
  }

  .input-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .result-section {
    padding: 0 1.25rem 1.25rem;
  }
}
