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

:root {
  --bg-color: #060606;
  --surface-color: #121212;
  --surface-hover: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --accent-color: #eab308; /* yellow-500 */
  --accent-hover: #facc15;
  --border-color: rgba(255, 255, 255, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

::selection {
  background-color: var(--accent-color);
  color: #000;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 3px;
}

/* Utilities */
.container {
  width: 90%;
  max-width: 1400px;
  margin: 0 auto;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 50;
  padding: 1rem 0;
  background: rgba(6, 6, 6, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0;
  cursor: pointer;
}

.nav-brand span {
  color: var(--text-secondary);
  font-weight: 400;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.btn-text:hover {
  color: var(--text-primary);
}

.btn-primary {
  background-color: var(--text-primary);
  color: var(--bg-color);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-primary:hover {
  background-color: #e5e5e5;
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 60px; /* Offset for navbar */
}

.hero-video-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  background-color: var(--surface-color);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-video-bg video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-color) 0%, transparent 50%, rgba(0,0,0,0.6) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  max-width: 800px;
  padding: 0 1.5rem;
}

.hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  margin-bottom: 1.5rem;
  text-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.text-gradient {
  background: linear-gradient(to right, #fde047, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #d4d4d8;
  margin-bottom: 3rem;
  font-weight: 300;
  max-width: 600px;
  margin-inline: auto;
  line-height: 1.6;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 1.25rem 2rem;
  padding-right: 8rem;
  font-size: 1.125rem;
  border-radius: 9999px;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  outline: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.search-input::placeholder {
  color: #6b7280;
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.search-btn {
  position: absolute;
  right: 0.5rem;
  top: 0.5rem;
  bottom: 0.5rem;
  background-color: var(--accent-color);
  color: #000;
  border: none;
  border-radius: 9999px;
  padding: 0 2rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.search-btn:hover {
  background-color: var(--accent-hover);
}

/* Category Filter */
.category-filter {
  position: sticky;
  top: 69px; /* Below navbar */
  z-index: 40;
  background: rgba(6, 6, 6, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
}

.category-scroll {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem; /* Space for hidden scrollbar */
}

.category-btn {
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background-color: var(--surface-color);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-btn:hover {
  background-color: var(--surface-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-btn.active {
  background-color: var(--text-primary);
  color: var(--bg-color);
  border-color: var(--text-primary);
}

.category-btn:focus-visible {
  outline-offset: 4px;
}

/* Gallery / Masonry */
.gallery-section {
  padding: 3rem 0;
}

.masonry {
  column-count: 1;
  column-gap: 1.5rem;
}

@media (min-width: 640px) { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
@media (min-width: 1280px) { .masonry { column-count: 4; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  background-color: var(--surface-color);
  cursor: pointer;
  transform: translateZ(0); /* Force GPU acceleration */
}

.masonry-item[hidden] {
  display: none;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.masonry-item:hover img {
  transform: scale(1.05);
}

.item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.5rem;
}

.masonry-item:hover .item-overlay {
  opacity: 1;
}

.item-tag {
  align-self: flex-start;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.item-content {
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.masonry-item:hover .item-content {
  transform: translateY(0);
}

.item-prompt {
  font-size: 0.875rem;
  color: #e5e5e5;
  margin-bottom: 1rem;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

.btn-copy {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background-color: var(--text-primary);
  color: var(--bg-color);
}

.btn-copy.is-copied {
  background-color: var(--accent-color);
  color: #000;
}

.btn-copy svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.empty-state {
  color: var(--text-secondary);
  padding: 3rem 0 4rem;
  text-align: center;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 2rem;
}

.footer-seo {
  max-width: 800px;
  margin-bottom: 3rem;
}

.footer-seo h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.footer-seo p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text-primary);
}

@media (max-width: 768px) {
  .hero {
    min-height: 560px;
  }

  .hero-title {
    font-size: 3.25rem;
  }

  .hero-subtitle {
    font-size: 1.0625rem;
    margin-bottom: 2rem;
  }

  .item-overlay {
    opacity: 1;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.45) 62%, rgba(0,0,0,0.05) 100%);
  }

  .item-content {
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 0.75rem 0;
  }

  .nav-brand {
    font-size: 1.125rem;
  }

  .nav-actions {
    gap: 0.75rem;
  }

  .btn-text {
    display: none;
  }

  .btn-primary {
    padding: 0.5rem 0.875rem;
  }

  .hero {
    height: auto;
    min-height: 620px;
  }

  .hero-title {
    font-size: 2.75rem;
  }

  .search-box {
    display: grid;
    gap: 0.75rem;
  }

  .search-input {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  .search-btn {
    position: static;
    width: 100%;
    min-height: 48px;
  }

  .category-filter {
    top: 58px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}

/* Spotlight & Reveal */
.spotlight {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 9999;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.04), transparent 40%);
  transition: background 0.3s ease-out;
}

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Testimonials Section */
.testimonials-section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255,255,255,0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #000;
  font-size: 1.1rem;
}

.user-info strong {
  display: block;
  font-size: 1rem;
  color: var(--text-primary);
}

.user-info span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.testimonial-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  flex-grow: 1;
}

.testimonial-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.btn-like {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-like svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-like:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

.btn-like.liked {
  color: #ef4444;
}

.btn-like.liked svg {
  fill: #ef4444;
  animation: heartBeat 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes heartBeat {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* SEO Optimization Classes */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.seo-content {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
  margin-top: 2rem;
}

.seo-article {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-secondary);
}

.seo-article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.seo-article h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.seo-article p {
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 1.25rem;
}

.seo-article strong {
  color: var(--text-primary);
  font-weight: 600;
}

.seo-article dl {
  margin-top: 1.5rem;
}

.seo-article dt {
  font-size: 1.05rem;
  color: var(--text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.seo-article dd {
  font-size: 0.9375rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  margin-left: 0;
}

/* Avatar Image Styles */
.avatar-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  background-color: var(--surface-color);
}

/* Skeleton Loader */
.skeleton {
  background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite ease-in-out;
  border-radius: 12px;
  min-height: 200px;
}

@keyframes skeletonLoading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  pointer-events: none;
}

.toast {
  background: rgba(20, 20, 20, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  animation: toastSlideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.fade-out {
  animation: toastFadeOut 0.3s ease forwards;
}

@keyframes toastSlideUp {
  0% { opacity: 0; transform: translateY(20px) scale(0.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastFadeOut {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(10px) scale(0.9); }
}

/* Mobile Optimizations */
@media (hover: none) {
  .item-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
  }
  .item-content {
    opacity: 1;
    transform: translateY(0);
  }
  .item-prompt {
    -webkit-line-clamp: 4;
  }
  .btn-copy {
    opacity: 1;
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.15);
  }
}
