/* ================================================
   SnapAny - Neo-Brutalism / Pop Design System
   "Happy Candy Machine"
   ================================================ */

:root {
  /* === Palette === */
  --bg-color: #FFF5F5;
  /* Sakue Pink - Soft background */
  --card-bg: #FFFFFF;
  /* Pure White */

  --primary: #FF69B4;
  /* Hot Pink */
  --primary-hover: #FF1493;
  /* Deep Pink */

  --accent-yellow: #FACC15;
  /* Lightning Yellow */
  --accent-purple: #A855F7;
  /* Electric Purple */
  --accent-blue: #3B82F6;
  /* Bright Blue */

  --border-color: #000000;
  /* Pure Black */

  /* === Elements === */
  --text-main: #000000;
  --text-muted: #6b7280;

  /* === Neo-Brutalism Tokens === */
  --border-width: 3px;
  --shadow-offset: 4px;
  --radius-xl: 1.5rem;
  /* rounded-3xl */
  --radius-lg: 1rem;
  /* rounded-xl */
  --radius-md: 0.75rem;
  /* rounded-lg */

  /* === Font === */
  --font-main: 'Inter', sans-serif;
}

/* === Reset & Base === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-color);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  line-height: 1.5;
}

/* === Decorative blobs (Background) === */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  /* mix-blend-multiply blur-3xl */
  opacity: 0.7;
  z-index: -1;
  animation: blob-bounce 10s infinite ease-in-out;
}

.blob-1 {
  top: 5%;
  left: 10%;
  width: 300px;
  height: 300px;
  background-color: #FDE047;
  /* yellow-300 */
}

.blob-2 {
  top: 10%;
  right: 10%;
  width: 250px;
  height: 250px;
  background-color: #D8B4FE;
  /* purple-300 */
  animation-delay: 2s;
}

.blob-3 {
  bottom: 10%;
  left: 30%;
  width: 350px;
  height: 350px;
  background-color: #FDA4AF;
  /* pink-300 */
  animation-delay: 4s;
}

@keyframes blob-bounce {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  33% {
    transform: translate(30px, -50px) scale(1.1);
  }

  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* === Typography === */
h1 {
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.5rem);
  /* Responsive font size */
  line-height: 1.1;
  letter-spacing: -0.05em;
  color: var(--text-main);
  margin-bottom: 2rem;
}

.text-highlight {
  position: relative;
  display: inline-block;
  color: #EC4899;
  /* pink-500 */
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}

.badge-black {
  display: inline-block;
  background: black;
  color: white;
  padding: 0 0.5rem;
  transform: skewX(-12deg);
  font-size: 0.8em;
}

/* === Components: Neo-Brutalism === */

/* The main container card */
.neo-card {
  background: white;
  border: 4px solid black;
  border-radius: var(--radius-xl);
  box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 1);
  padding: 3rem 2rem;
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  position: relative;
  text-align: center;
  z-index: 10;
}

/* Buttons */
.neo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 800;
  text-transform: uppercase;
  border: 3px solid black;
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 0px 0px black;
  transition: all 0.1s ease;
  cursor: pointer;
  background: var(--primary);
  color: white;
  font-size: 1.25rem;
  padding: 1rem 2rem;
  text-decoration: none;
}

.neo-btn:hover {
  background: var(--primary-hover);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px 0px black;
}

.neo-btn:active,
.neo-btn.clicked {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0px 0px black;
}

.neo-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 1rem;
  box-shadow: 2px 2px 0px 0px black;
}

/* Inputs */
.neo-input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  border: 4px solid black;
  border-radius: var(--radius-lg);
  outline: none;
  box-shadow: 4px 4px 0px 0px #e5e7eb;
  /* gray-200 */
  transition: all 0.2s;
}

.neo-input:focus {
  box-shadow: 4px 4px 0px 0px var(--primary);
  transform: scale(1.01);
}

.neo-input::placeholder {
  color: #9CA3AF;
  font-weight: 500;
}

/* Badge/Tag */
.neo-badge {
  background: var(--accent-yellow);
  color: black;
  font-weight: 900;
  border: 2px solid black;
  padding: 0.25rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0px 0px black;
  display: inline-block;
  margin-bottom: 1.5rem;
  transform: rotate(-3deg);
  transition: transform 0.3s;
  font-size: 1.5rem;
}

.neo-badge:hover {
  transform: rotate(3deg) scale(1.1);
}

/* Language Switcher */
.lang-switch {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  display: flex;
  gap: 0.5rem;
}

.lang-btn {
  background: white;
  border: 2px solid black;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 2px 2px 0px 0px black;
  transition: all 0.2s;
  font-size: 0.9rem;
}

.lang-btn.active {
  background: black;
  color: white;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px 0px black;
}

/* === Layout Helper === */
.input-group {
  display: flex;
  gap: 1rem;
  flex-direction: column;
}

@media (min-width: 768px) {
  .input-group {
    flex-direction: row;
  }

  .input-group .neo-input {
    flex: 1;
  }
}

/* === Platform Icons === */
.platform-list {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 2.5rem;
  font-weight: 700;
  color: #6B7280;
  font-size: 0.9rem;
}

.platform-icon {
  font-size: 1.5rem;
  filter: grayscale(100%);
  transition: all 0.2s;
  cursor: default;
}

.platform-icon:hover {
  filter: grayscale(0%);
  transform: scale(1.2) rotate(10deg);
}

/* === Ad Slots === */
.ad-placeholder {
  width: 100%;
  padding: 1rem;
  min-height: 100px;
  background-color: #F3F4F6;
  /* gray-100 */
  border: 3px dashed #D1D5DB;
  /* gray-300 */
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.ad-label {
  color: #9CA3AF;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

/* === Result Card (Injected via JS) === */
.result-card {
  width: 100%;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 3px dashed #E5E7EB;
  text-align: left;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  border: 3px solid black;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 4px 4px 0px 0px black;
  margin-bottom: 1.5rem;
  background: #eee;
}

.result-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.result-meta {
  color: #6B7280;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.download-section h4 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.8rem;
  border-bottom: 3px solid var(--accent-yellow);
  display: inline-block;
  color: black;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.btn-dl {
  background: white;
  border: 2px solid black;
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: 3px 3px 0px 0px black;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 120px;
}

.btn-dl:hover {
  background: #EFF6FF;
  /* blue-50 */
  box-shadow: 4px 4px 0px 0px black;
  transform: translate(-1px, -1px);
}

.btn-dl span:last-child {
  font-size: 0.75rem;
  color: #6B7280;
  font-weight: 500;
}

.close-btn {
  background: transparent;
  border: none;
  font-weight: 700;
  color: #9CA3AF;
  cursor: pointer;
  text-decoration: underline;
  width: 100%;
  margin-top: 1rem;
}

.close-btn:hover {
  color: black;
}

/* === Mobile Responsiveness === */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
  }

  .neo-card {
    padding: 2rem 1rem;
    margin: 1rem auto;
    border-width: 3px;
    box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 1);
    width: 95%;
    /* Ensure it fits with some margin */
  }

  .neo-badge {
    font-size: 1.2rem;
    margin-bottom: 1rem;
  }

  .neo-input {
    font-size: 1rem;
    padding: 0.8rem 1rem;
  }

  .neo-btn {
    width: 100%;
    /* Full width button on mobile */
    font-size: 1.2rem;
  }

  .blob {
    opacity: 0.5;
    /* Reduce blob distractions */
  }

  /* Result card adjustments */
  .btn-group {
    gap: 0.5rem;
  }

  .btn-dl {
    width: 100%;
    /* Stack download buttons on very small screens? Or just flex */
    flex: 1 1 120px;
    /* Allow growing, min width 120 */
  }
}

/* === Footer === */
.footer-copyright {
  text-align: center;
  margin-top: auto;
  /* Push to bottom if flex column */
  padding: 2rem;
  color: #6B7280;
  /* gray-500 */
  font-size: 0.85rem;
  font-weight: 500;
}