@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&family=Space+Grotesk:wght@500;700&display=swap');

:root {
  --bg: #f0f0f0;
  --panel: #ffffff;
  --ink: #1b1c1f;
  --muted: #62666f;
  --accent: #2060ff;
  --accent-dark: #0b45d6;
  --border: #e1e3e8;
  --shadow: 0 18px 40px rgba(20, 20, 30, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #f7f7f7 0%, #ededed 60%, #e7e7e7 100%);
  color: var(--ink);
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--panel);
  border-radius: 999px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.topbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.brand-icon {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: #eef2ff;
  border: 2px solid var(--accent);
  position: relative;
  display: inline-flex;
}

.brand-icon::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 2px;
  height: 8px;
  background: var(--accent);
}

.brand-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 7px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.platforms {
  display: flex;
  gap: 8px;
  background: #f3f4f7;
  padding: 6px;
  border-radius: 999px;
}

.platform {
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.platform.active {
  background: var(--panel);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border);
}

.icon {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
}

.home-btn {
  border: 1px solid var(--border);
  background: #f3f4f7;
  color: var(--accent);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.menu-toggle {
  border: 1px solid var(--border);
  background: #f7f7fb;
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
  display: none;
  gap: 4px;
  flex-direction: column;
  justify-content: center;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: #444;
  border-radius: 999px;
}

.lang-select {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-label {
  font-size: 12px;
  color: var(--muted);
}

.lang-select select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
}

.media-tabs {
  margin: 20px auto 26px;
  width: min(720px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  box-shadow: var(--shadow);
}

.tab {
  border: none;
  background: transparent;
  padding: 12px 10px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: #eef2ff;
  color: var(--accent);
}

.tab-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

.icon-video {
  background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.icon-reels {
  border: 2px solid var(--accent);
  border-radius: 50%;
}

.icon-photo {
  border: 2px solid var(--accent);
  border-radius: 4px;
  position: relative;
}

.icon-photo::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.content {
  display: flex;
  justify-content: center;
}

.card {
  width: min(980px, 100%);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
  text-align: center;
}

.page-card {
  text-align: left;
  margin-top: 18px;
}

.page-body h2 {
  margin: 18px 0 8px;
  font-size: 20px;
}

.page-body p,
.page-body li {
  color: var(--muted);
  line-height: 1.6;
}

.page-body ul {
  margin: 8px 0 12px 20px;
  padding: 0;
}

.alert.success {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.kicker {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px;
}

h1 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(28px, 4vw, 40px);
  margin: 0 0 10px;
}

.sub {
  margin: 0 0 20px;
  color: var(--muted);
}

.alert {
  margin: 0 auto 16px;
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #f3b9c7;
  border-radius: 12px;
  padding: 12px 16px;
  max-width: 720px;
}

.search {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  width: min(820px, 100%);
}

.search-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-field {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  background: #fafafa;
  width: 100%;
}

.search-field input {
  border: none;
  flex: 1;
  font-size: 16px;
  outline: none;
  background: transparent;
  text-align: left;
}

.link-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  position: relative;
}

.link-icon::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 2px;
  background: var(--accent);
  top: 7px;
  left: 3px;
}

.chip {
  border: 1px solid var(--accent);
  background: #edf2ff;
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}

.chip.ghost {
  background: #f5f6fb;
  border-color: #cfd6f0;
  color: #4b5563;
}

.cta {
  border: none;
  background: var(--accent);
  color: white;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  justify-content: center;
  min-width: 150px;
  box-shadow: 0 12px 22px rgba(32, 96, 255, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 26px rgba(32, 96, 255, 0.32);
}

.loader {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  opacity: 0;
}

.loader.spin {
  opacity: 1;
  animation: spin 0.8s linear infinite;
}

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

.results {
  margin-top: 28px;
  text-align: left;
}

.results h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  justify-content: center;
}

.media-card {
  background: #f8f9fb;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
}

.media-card[data-mode="video"] {
  max-width: 380px;
}

.media-card[data-mode="reels"] {
  max-width: 380px;
}

.media-grid[data-mode="video"] {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.media-grid[data-mode="reels"] {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.media-frame {
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
}

.media-card[data-mode="video"] .media-frame {
  aspect-ratio: 9 / 16;
}

.media-card[data-mode="reels"] .media-frame {
  aspect-ratio: 9 / 16;
}

.media-card[data-mode="photo"] .media-frame {
  aspect-ratio: 4 / 5;
  background: #f1f1f1;
}

.media-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

.seo {
  margin-top: 32px;
  text-align: left;
  color: var(--muted);
}

.seo h2,
.seo h3 {
  color: var(--ink);
}

.seo ul {
  margin: 12px 0 0;
  padding-left: 18px;
}

.video-guide {
  margin-top: 32px;
  text-align: left;
  color: var(--muted);
}

.video-guide h2 {
  color: var(--ink);
  margin: 18px 0 10px;
  font-size: 22px;
}

.video-guide h2.video-title {
  text-align: center;
  font-size: 26px;
}

.video-guide p {
  line-height: 1.7;
}

.video-guide .step-list {
  list-style: none;
  padding: 0;
  margin: 16px auto 20px;
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.video-guide .step-list li {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: start;
  background: #f6f7fb;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
}

.video-guide .step-list img {
  width: 100%;
  height: auto;
  max-width: 700px;
  margin: 0 auto;
  border-radius: 10px;
  display: block;
}

.video-guide .step-list span {
  color: var(--ink);
}

@media (max-width: 640px) {
  .video-guide .step-list {
    max-width: 100%;
  }
}

.footer {
  padding: 24px 16px 32px;
  background: #f4f5f9;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--muted);
  max-width: 880px;
  margin: 0 auto 8px;
}

.footer-copy {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 10;
}

.modal.show {
  display: flex;
}

.modal-card {
  background: var(--panel);
  padding: 28px 32px;
  border-radius: 16px;
  max-width: 420px;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-card h2 {
  margin: 0 0 10px;
  font-family: "Space Grotesk", "Manrope", sans-serif;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 20, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 15;
}

.loading-overlay.show {
  display: flex;
}

.loading-card {
  background: var(--panel);
  border-radius: 18px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: var(--shadow);
  width: min(320px, 92vw);
}

.loading-card h3 {
  margin: 6px 0 6px;
  font-size: 18px;
}

.loading-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 4px solid rgba(32, 96, 255, 0.2);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 12px;
}

@media (max-width: 900px) {
  .topbar {
    flex-direction: column;
    border-radius: 16px;
  }

  .media-tabs {
    width: 100%;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .search-actions {
    width: 100%;
  }

  .search-actions .cta,
  .search-actions .chip {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    align-items: stretch;
    padding: 14px 16px;
  }

  .topbar-main {
    width: 100%;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar-actions {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
  }

  .topbar.menu-open .topbar-actions {
    display: flex;
  }

  .home-btn {
    width: 100%;
    text-align: center;
  }

  .lang-select {
    width: 100%;
    justify-content: space-between;
  }

  .lang-select select {
    min-width: 140px;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 16px;
  }

  .card {
    padding: 24px 20px;
  }
}
