/*──────────────────────────────────────────────────────
   welcome.css — Lightweight flowing gradient + blobs
                  + clear negative-mask header
──────────────────────────────────────────────────────*/

/* 1. RESET any body background */
body {
  background: transparent !important;
}

/* 2. GLOBAL CENTERING */
body,
input,
button {
  font-family: 'Inter', sans-serif;
}
body {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow: hidden;
  color: #1f2937;
  position: relative;
  line-height: 1.5;
}

/* 3. FLOWING GRADIENT BACKGROUND */
.animated-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, #7c3aed, #6366f1, #ede9fe);
  background-size: 200% 200%;
  animation: gradientFlow 20s ease infinite;
  z-index: -20;
}
@keyframes gradientFlow {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}

/* 4. SUBTLE STATIC RADIAL BLOBS */
.bg-blobs {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.15), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(0,0,0,0.1), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* 5. CENTERED CONTAINER */
.welcome-container {
  max-width: 480px;
  width: 100%;
  padding: 0 1rem;
  text-align: center;
}

/* 6. HEADER WITH NEGATIVE-MASK TEXT */
.welcome-header {
  margin-bottom: 1rem;
  isolation: isolate; /* confine blend to header only */
}
.welcome-header h1 {
  /* solid white text inverted against the background */
  color: #ffffff;
  mix-blend-mode: difference;
  font-size: 2.75rem;
  margin: 0 0 0.25rem;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}
.welcome-header p {
  /* keep your white subtitle too */
  color: #ffffff;
  mix-blend-mode: difference;
  font-size: 1rem;
  margin: 0 0 1rem;
  line-height: 1.4;
  text-shadow: 0 1px 1px rgba(0,0,0,0.2);
}

/* 7. PILL BADGES */
.badges {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: currentColor;
}
.badge-icon {
  display: inline-block;
  width: 1em; height: 1em;
  background-color: currentColor;
  mask-position: center; mask-repeat: no-repeat; mask-size: contain;
  -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain;
}
.badge-fun        { background: #ede9fe;    color: #6b21a8; }
.badge-engaging   { background: #fee2e2;    color: #b91c1c; }
.badge-customizable { background: #dbeafe;  color: #1e40af; }

/* 8. CARD & FORM FIELDS */
.welcome-card {
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  padding: 2rem 1.5rem;
  margin-bottom: 2rem;
}
.form-group { margin-bottom: 1rem; }
label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.label-icon {
  display: inline-block;
  width: 1em; height: 1em;
  background-color: #7c3aed;
  mask-position: center; mask-repeat: no-repeat; mask-size: contain;
  -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain;
}
/* mask definitions for each SVG */
.icon-rocket   { mask-image: url("/static/img/icons/rocket.svg"); }
.icon-heart    { mask-image: url("/static/img/icons/heart.svg"); }
.icon-package  { mask-image: url("/static/img/icons/package.svg"); }
.icon-user     { mask-image: url("/static/img/icons/user.svg"); }
.icon-users    { mask-image: url("/static/img/icons/users.svg"); }
.icon-map-pin  { mask-image: url("/static/img/icons/map-pin.svg"); }
input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #1f2937;
  line-height: 1.4;
}
input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 2px rgba(124,58,237,0.16);
}

/* 9. BUTTONS */
.button-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.6rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: opacity 0.2s;
  color: currentColor;
}
.btn-icon {
  display: inline-block;
  width: 1.1em; height: 1.1em;
  background-color: currentColor;
  mask-position: center; mask-repeat: no-repeat; mask-size: contain;
  -webkit-mask-position: center; -webkit-mask-repeat: no-repeat; -webkit-mask-size: contain;
}
.icon-upload-cloud { mask-image: url("/static/img/icons/upload-cloud.svg"); }
.icon-play         { mask-image: url("/static/img/icons/play.svg"); }
.btn-primary {
  background: linear-gradient(90deg, #7c3aed, #6366f1);
  color: #fff;
  border: none;
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  background: transparent;
  color: #7c3aed;
  border: 2px solid #7c3aed;
}
.btn-outline:hover { background: rgba(124,58,237,0.05); }

/* 10. UPLOAD STATUS */
.upload-status {
  font-size: 0.85rem;
  color: #4b5563;
  text-align: center;
  min-height: 1.25rem;
  margin-top: 0.4rem;
}

/* 11. MODAL OVERLAY */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
}
.overlay.hidden { display: none; }
.modal-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.modal-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.375rem;
  color: #1f2937;
}
.modal-buttons { margin-top: 1rem; }

/* 12. DROPZONE */
.dropzone {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  border: 2px dashed #7c3aed;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  transition: background 0.2s, border-color 0.2s;
  margin: 0.75rem 0;
}
.dropzone span { color: #7c3aed; }
.dropzone:hover {
  background: rgba(124,58,237,0.1);
  border-color: #5b21b6;
}

/* 13. FADE-IN ANIMATION */
.animate-fade-in {
  opacity: 0; transform: translateY(20px);
  animation: fadeInUp 0.6s forwards ease-out;
}
@keyframes fadeInUp {
  to { opacity: 1; transform: translateY(0); }
}
.uploading-animation::after {
    content: " ⏳";
    display: inline-block;
    animation: spin 1s linear infinite;
}

#upload-overlay .modal-card {
  padding: 2rem;
  text-align: center;
}

#uploadStatusModal {
  margin-top: 1rem;
  font-size: 1.2rem;
  color: #6B7280;
}

.uploading-animation::after {
  content: " ⏳";
  display: inline-block;
  animation: spin 1s linear infinite;
}

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

/* ─── Responsive tweaks (add at end of welcome.css) ─── */
@media (max-width: 480px) {
  /* Move buttons side by side instead of stacked */
  .button-group {
    flex-direction: row;
    gap: 0.5rem;
  }
  /* Slightly smaller heading */
  .welcome-header h1 {
    font-size: 2rem;
  }
  .welcome-card {
    padding: 1.5rem 1rem;
  }
}

.spinner {
  margin: 16px auto;
  border: 4px solid #eee;
  border-top: 4px solid #8B5CF6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}
.spinner.hidden {
  display: none;
}

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

/* Somewhere in welcome.css */
.modal-buttons {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}
#accessCode {
  box-sizing: border-box;
}

.lang-toggle-container {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}
.lang-switch {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.375rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.lang-switch button {
  border: none;
  background: transparent;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-weight: 500;
  font-family: inherit;
}
.lang-switch button.active {
  background: #4f46e5;
  color: white;
}
