/* --------- GLOBAL COLORS --------- */
:root {
  --ig-pink: #ec4899;
  --ig-orange: #f97316;
  --ig-card: rgba(15, 23, 42, 0.9);
  --ig-text: #ffffff;
}

/* --------- BASE & BACKGROUND --------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ig-text);
  background:
    linear-gradient(#020617ee, #020617f2),
    url("/static/img/bg.png") center/cover no-repeat fixed;
  /* put bg.png in /static/img/ */
  
}

/* --------- HEADER --------- */
.topbar {
  padding: 18px 24px 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  filter: drop-shadow(0 0 14px rgba(236, 72, 153, 0.6));
  transition: 0.3s ease;
}

.logo:hover {
  transform: scale(1.08);
  filter: drop-shadow(0 0 24px rgba(236, 72, 153, 1));
}

.brand h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

/* --------- LAYOUT --------- */
.page {
  display: flex;
  justify-content: center;
}

.container {
  width: 100%;
  max-width: 1050px;
  padding: 10px 16px 50px;
}

/* --------- NAV TABS --------- */
.toolbar-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.toolbar {
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.tab {
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #fbcfe8;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  transition: 0.2s ease;
}

.tab:hover {
  color: #ffffff;
}

.tab.active {
  background: linear-gradient(90deg, var(--ig-orange), var(--ig-pink));
  color: #ffffff;
  box-shadow: 0 0 16px rgba(236, 72, 153, 0.7);
}

/* --------- CARD / FORM --------- */
.card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 18px;
  background: var(--ig-card);
  border: 1px solid rgba(236, 72, 153, 0.35);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
}

.label {
  font-size: 14px;
  margin-bottom: 6px;
  display: block;
  color: #f9a8d4;
  font-weight: 600;
}

.input {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(236, 72, 153, 0.5);
  background: #020617;
  color: var(--ig-text);
  outline: none;
}

.input::placeholder {
  color: #f9a8d4;
}

/* center download + loader */
.actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  background: linear-gradient(90deg, var(--ig-orange), var(--ig-pink));
  box-shadow: 0 0 18px rgba(236, 72, 153, 0.6);
  transition: 0.2s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  box-shadow: none;
}

/* --------- LOADER --------- */
.loader {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #ec4899;
  border-right-color: #f97316;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --------- PREVIEW (smaller & centered) --------- */
.preview {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;   /* center the preview box */
}

.preview h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

/* smaller preview box */
.video-wrap {
  width: 35%;              /* was bigger, now smaller */
  max-width: 320px;
  padding-top: 56.25%;     /* 16:9 aspect ratio */
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, 0.6);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

.video-wrap video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

/* --------- INSTRUCTIONS --------- */
.instructions-card {
  margin-top: 26px;
  padding: 22px;
  border-radius: 18px;
  background: var(--ig-card);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
}

.instructions-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.instructions-header p {
  margin: 0;
  font-size: 13px;
  color: #e5e7eb;
}

/* one step per row, full-width image */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 16px;
}

.step-item {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(236, 72, 153, 0.3);
  background: rgba(15, 23, 42, 0.9);
}

/* full width image */
.step-media {
  width: 100%;
}

.step-media img {
  width: 100%;
  height: auto;
  display: block;
}

/* text under image */
.step-text {
  padding: 14px 14px 16px;
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ig-orange), var(--ig-pink));
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.step-text h3 {
  margin: 4px 0 4px;
  font-size: 15px;
}

.step-text p {
  margin: 0;
  font-size: 13px;
  color: #e5e7ff;
}

/* footer */
.instructions-footer {
  margin-top: 18px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.instructions-footer code {
  background: rgba(15, 23, 42, 0.9);
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, 0.5);
}

.hint {
  margin-top: 18px;
  font-size: 12px;
  opacity: 0.85;
}

/* --------- RESPONSIVE --------- */
@media (max-width: 640px) {
  .topbar {
    padding-inline: 16px;
  }
  .brand h1 {
    font-size: 22px;
  }

  /* make preview bigger on small screens */
  .video-wrap {
    width: 90%;
    max-width: none;
  }
}
