/* ============================================================
   clipfinder — premium dark SaaS UI
   ============================================================ */

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

:root {
  --bg:            #06060a;
  --bg-card:       rgba(255,255,255,0.03);
  --bg-card-hover: rgba(255,255,255,0.06);
  --bg-input:      rgba(255,255,255,0.04);
  --border:        rgba(255,255,255,0.06);
  --border-hover:  rgba(255,255,255,0.12);
  --text:          #f0f0f3;
  --text-dim:      #8a8a9a;
  --text-muted:    #55556a;
  --accent:        #7c5cfc;
  --accent-hover:  #8e72ff;
  --accent-glow:   rgba(124, 92, 252, 0.3);
  --accent2:       #06d6d6;
  --green:         #34d399;
  --red-soft:      #f87171;
  --cyan:          #22d3ee;
  --radius:        14px;
  --radius-sm:     10px;
  --radius-lg:     20px;
  --radius-xl:     24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Background Effects
   ============================================================ */

.bg-gradient {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,92,252,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(6,214,214,0.05) 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 80%, rgba(124,92,252,0.04) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.bg-noise {
  position: fixed;
  inset: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
}
.bg-glow-1 {
  width: 700px; height: 700px;
  background: rgba(124,92,252,0.12);
  top: -300px; left: 50%;
  transform: translateX(-50%);
  animation: glowPulse 8s ease-in-out infinite;
}
.bg-glow-2 {
  width: 500px; height: 500px;
  background: rgba(6,214,214,0.08);
  bottom: -200px; right: -100px;
  animation: glowPulse 10s ease-in-out infinite reverse;
}
.bg-glow-3 {
  width: 400px; height: 400px;
  background: rgba(248,113,113,0.05);
  bottom: 30%; left: -150px;
  animation: glowPulse 12s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.6; transform: scale(1) translateX(-50%); }
  50%      { opacity: 1;   transform: scale(1.15) translateX(-50%); }
}
.bg-glow-2, .bg-glow-3 {
  animation-name: glowPulse2;
}
@keyframes glowPulse2 {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 0.9; transform: scale(1.1); }
}


/* ============================================================
   Floating Social Icons
   ============================================================ */

.floating-icons {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.float-icon {
  position: absolute;
  width: 28px;
  height: 28px;
  color: rgba(255,255,255,0.04);
  animation: floatUp linear infinite;
}

.fi-1 { left: 8%;  animation-duration: 22s; animation-delay: 0s;   color: rgba(255,0,0,0.06); }
.fi-2 { left: 18%; animation-duration: 28s; animation-delay: -4s;  color: rgba(6,214,214,0.06); }
.fi-3 { left: 30%; animation-duration: 25s; animation-delay: -8s;  color: rgba(225,48,108,0.05); }
.fi-4 { left: 45%; animation-duration: 30s; animation-delay: -2s;  color: rgba(255,0,0,0.04); width: 22px; height: 22px; }
.fi-5 { left: 60%; animation-duration: 26s; animation-delay: -10s; color: rgba(6,214,214,0.05); }
.fi-6 { left: 72%; animation-duration: 24s; animation-delay: -6s;  color: rgba(225,48,108,0.06); width: 24px; height: 24px; }
.fi-7 { left: 85%; animation-duration: 27s; animation-delay: -3s;  color: rgba(255,0,0,0.05); width: 20px; height: 20px; }
.fi-8 { left: 92%; animation-duration: 32s; animation-delay: -12s; color: rgba(6,214,214,0.04); }

@keyframes floatUp {
  0%   { transform: translateY(110vh) rotate(0deg);   opacity: 0; }
  5%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { transform: translateY(-10vh) rotate(360deg);  opacity: 0; }
}


/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  background: rgba(6,6,10,0.7);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

.nav-cta {
  color: #fff;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--accent);
  transition: background 0.2s, transform 0.1s;
  margin-left: 4px;
}
.nav-cta:hover { background: var(--accent-hover); }
.nav-cta:active { transform: scale(0.97); }


/* ============================================================
   Hero Section
   ============================================================ */

.hero {
  position: relative;
  z-index: 1;
  padding: 160px 24px 60px;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: rgba(124,92,252,0.1);
  border: 1px solid rgba(124,92,252,0.2);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 28px;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}

.hero-gradient {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-dim);
  margin-bottom: 48px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Search Bar ---- */
.hero-search {
  max-width: 680px;
  margin: 0 auto;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 20px;
  transition: border-color 0.3s, box-shadow 0.3s;
  position: relative;
}
.search-box::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: linear-gradient(135deg, rgba(124,92,252,0), rgba(6,214,214,0));
  z-index: -1;
  transition: background 0.3s;
}
.search-box:focus-within {
  border-color: rgba(124,92,252,0.4);
  box-shadow: 0 0 0 4px var(--accent-glow), 0 8px 40px rgba(124,92,252,0.1);
}
.search-box:focus-within::before {
  background: linear-gradient(135deg, rgba(124,92,252,0.15), rgba(6,214,214,0.1));
}

.search-icon {
  color: var(--text-muted);
  flex-shrink: 0;
  display: flex;
}

.search-box input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 1rem;
  padding: 14px 4px;
  font-family: inherit;
}
.search-box input::placeholder {
  color: var(--text-muted);
}

.search-box button {
  background: linear-gradient(135deg, var(--accent), #6248e0);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 14px 28px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  font-family: inherit;
  box-shadow: 0 4px 16px rgba(124,92,252,0.3);
}
.search-box button:hover {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(124,92,252,0.4);
}
.search-box button:active { transform: scale(0.97); }
.search-box button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ---- Platform Toggle ---- */
.platform-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.platform-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 18px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.platform-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-dim);
  background: rgba(255,255,255,0.02);
}
.platform-btn.active {
  background: rgba(124,92,252,0.1);
  border-color: rgba(124,92,252,0.3);
  color: var(--accent);
}
.platform-btn.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.coming-soon-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-left: 2px;
}

/* ---- Search Hints ---- */
.search-hints {
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.hint-chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.hint-chip:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-hover);
  color: var(--text);
}


/* ---- Compact hero (sticky search bar after search) ---- */
.hero--compact {
  position: sticky;
  top: 64px;
  z-index: 50;
  padding: 12px 24px 14px;
  background: rgba(6, 6, 10, 0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.hero--compact .hero-inner {
  max-width: 800px;
}
.hero--compact .hero-title,
.hero--compact .hero-sub,
.hero--compact .search-hints {
  display: none;
}
.hero--compact .hero-search {
  max-width: 100%;
  margin: 0;
}
.hero--compact .platform-toggle {
  justify-content: flex-start;
}

/* ============================================================
   Loading State
   ============================================================ */

.loading-state {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 24px;
}

.loading-pulse {
  position: absolute;
  top: 50%; left: 50%;
  width: 200px; height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.3; }
  50%      { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

.loading-content {
  position: relative;
}

.loading-spinner {
  width: 44px; height: 44px;
  border: 3px solid rgba(255,255,255,0.06);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto 24px;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-text {
  font-size: 1.05rem;
  color: var(--text);
  font-weight: 600;
}
.loading-dots::after {
  content: '';
  animation: dots 1.5s steps(4, end) infinite;
}
@keyframes dots {
  0%  { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

.loading-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}


/* ============================================================
   Results
   ============================================================ */

.results-section {
  position: relative;
  z-index: 1;
  padding: 20px 24px 80px;
  animation: fadeUp 0.5s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
}
.results-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.results-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.new-search-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}
.new-search-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
  color: var(--text);
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ---- Result Card ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(10px);
}
.card:hover {
  border-color: rgba(124,92,252,0.2);
  transform: translateY(-4px);
  box-shadow:
    0 12px 40px rgba(0,0,0,0.4),
    0 0 0 1px rgba(124,92,252,0.1);
}

.card-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0a0a10;
}
.card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}
.card:hover .card-thumb {
  transform: scale(1.05);
}
.card-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #12121a 0%, #1a1a2e 50%, #12121a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2.4rem;
}

.card-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 48px; height: 48px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
}
.card:hover .card-play {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.card-body {
  padding: 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  font-size: 0.78rem;
}

.card-creator {
  font-weight: 600;
  color: var(--text);
}

.card-views {
  color: var(--green);
  font-weight: 600;
}

.card-date {
  color: var(--text-muted);
}

.card-platform {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 6px;
  margin-left: auto;
}
.card-platform.yt {
  background: rgba(255, 0, 0, 0.1);
  color: var(--red-soft);
  border: 1px solid rgba(255,0,0,0.15);
}
.card-platform.tt {
  background: rgba(6,214,214,0.08);
  color: var(--cyan);
  border: 1px solid rgba(6,214,214,0.15);
}
.card-platform.ig {
  background: rgba(225,48,108,0.1);
  color: #e1306c;
  border: 1px solid rgba(225,48,108,0.15);
}


/* ============================================================
   Empty State
   ============================================================ */

.empty-state {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 100px 24px;
}
.empty-icon {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}
.empty-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}


/* ============================================================
   Preview / Features Section
   ============================================================ */

.preview-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px 80px;
  border-top: 1px solid var(--border);
}

.preview-inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--text-dim);
  font-size: 1rem;
  margin-bottom: 56px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 72px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.feature-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.fi-search {
  background: rgba(124,92,252,0.1);
  color: var(--accent);
}
.fi-ai {
  background: rgba(6,214,214,0.1);
  color: var(--accent2);
}
.fi-results {
  background: rgba(52,211,153,0.1);
  color: var(--green);
}

.feature-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-dim);
}

/* Example Preview Cards */
.preview-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s;
}
.preview-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
}

.preview-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.preview-play {
  font-size: 1.4rem;
  color: rgba(255,255,255,0.3);
}

.preview-body {
  padding: 14px;
}

.preview-title {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.preview-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
}
.preview-creator {
  color: var(--text-dim);
  font-weight: 500;
}
.preview-views {
  color: var(--green);
  font-weight: 600;
}
.preview-badge {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.preview-badge.yt {
  background: rgba(255,0,0,0.1);
  color: var(--red-soft);
}
.preview-badge.tt {
  background: rgba(6,214,214,0.08);
  color: var(--cyan);
}
.preview-badge.ig {
  background: rgba(225,48,108,0.1);
  color: #e1306c;
}


/* ============================================================
   Footer
   ============================================================ */

.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 32px 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
}


/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 900px) {
  .features-grid { grid-template-columns: 1fr; }
  .preview-cards { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hero { padding: 120px 16px 40px; }
  .hero-title { font-size: 2.4rem; }
  .hero-sub { font-size: 0.95rem; }
  .hide-mobile { display: none; }

  .search-box {
    flex-direction: column;
    padding: 12px;
    border-radius: var(--radius);
  }
  .search-icon { display: none; }
  .search-box input { padding: 10px 4px; }
  .search-box button {
    width: 100%;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  .nav-links .nav-link { display: none; }

  .results-grid { grid-template-columns: 1fr; }
  .results-header { flex-direction: column; gap: 12px; }

  .preview-cards { grid-template-columns: 1fr; }
  .preview-section { padding: 60px 16px; }
  .section-title { font-size: 1.5rem; }
}
