/* VST Library — modern refinement layer */

:root {
  --background: 240 12% 4%;
  --foreground: 0 0% 96%;
  --card: 240 10% 7%;
  --card-foreground: 0 0% 96%;
  --muted: 240 8% 14%;
  --muted-foreground: 240 5% 58%;
  --accent: 240 12% 14%;
  --accent-foreground: 0 0% 96%;
  --border: 240 10% 16%;
  --input: 240 10% 16%;
  --ring: 250 45% 55%;
  --radius: 0.75rem;
  --glow: 250 80% 65%;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

html {
  scroll-behavior: auto;
  scrollbar-gutter: stable;
}

html,
body {
  overflow-anchor: none;
}

body {
  font-family: Inter, system-ui, sans-serif;
  background-color: hsl(var(--background));
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

::selection {
  background: hsl(var(--glow) / 0.25);
  color: hsl(var(--foreground));
}

/* Ambient page background + subtle orbs */
.bg-gradient-dark {
  background-color: hsl(var(--background));
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -20%, hsl(250 60% 50% / 0.14), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, hsl(220 70% 50% / 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, hsl(280 50% 40% / 0.06), transparent);
  position: relative;
  overflow-x: hidden;
}

.bg-gradient-dark::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle 400px at 15% 20%, hsl(250 70% 55% / 0.06), transparent 70%),
    radial-gradient(circle 350px at 85% 30%, hsl(220 80% 60% / 0.05), transparent 70%),
    radial-gradient(circle 300px at 50% 90%, hsl(280 60% 50% / 0.04), transparent 70%);
  animation: orbFloat 20s ease-in-out infinite alternate;
}

.bg-gradient-dark > * {
  position: relative;
  z-index: 1;
}

@keyframes orbFloat {
  0% {
    opacity: 0.7;
    transform: translate(0, 0) scale(1);
  }
  100% {
    opacity: 1;
    transform: translate(2%, -1%) scale(1.02);
  }
}

/* Hero ambient pulse */
.min-h-\[80vh\] .animate-pulse {
  animation: ambientGlow 10s ease-in-out infinite;
}

@keyframes ambientGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

/* ——— Topbar (logo sol, menü + CTA sağ — fotoğraf düzeni) ——— */
nav.fixed {
  border-bottom-color: hsl(var(--border) / 0.5);
  background: hsl(var(--background) / 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

nav .hidden.md\:flex a.rounded-md::after,
nav .hidden.md\:flex a.rounded-md::before {
  display: none !important;
  content: none !important;
}

/* Kart açıklamaları — eşit yükseklik */
.plugin-card-desc {
  min-height: 2.75rem;
}

/* İndirme detay modalı */
.plugin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: hsl(0 0% 0% / 0.72);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  isolation: isolate;
  animation: fadeIn 0.25s var(--ease-out-expo) forwards;
}

.plugin-modal-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: hsl(var(--background) / 0.35);
  pointer-events: none;
}

.plugin-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 32rem;
  max-height: min(90vh, 540px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border) / 0.55);
  background: hsl(var(--card) / 0.97);
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / 0.05) inset,
    0 24px 64px -16px hsl(0 0% 0% / 0.65),
    0 8px 24px -8px hsl(0 0% 0% / 0.4);
  animation: pluginModalIn 0.35s var(--ease-out-expo) forwards;
}

@keyframes pluginModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.plugin-modal-header {
  position: relative;
  padding: 1.5rem 1.5rem 0;
  flex-shrink: 0;
}

.plugin-modal-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  padding: 0.35rem;
  border-radius: calc(var(--radius) - 4px);
  color: hsl(var(--muted-foreground));
  transition: color 0.2s ease, background 0.2s ease;
}

.plugin-modal-close:hover {
  color: hsl(var(--foreground));
  background: hsl(var(--accent) / 0.55);
}

.plugin-modal-body {
  padding: 1.25rem 1.5rem;
  overflow-y: auto;
  flex: 1 1 auto;
}

.plugin-modal-body p {
  margin: 0;
}

.plugin-modal-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 1.25rem 1.5rem 1.5rem;
  border-top: 1px solid hsl(var(--border) / 0.45);
  background: hsl(var(--background) / 0.35);
}

.plugin-modal-filename {
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.85rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.4;
  color: hsl(var(--muted-foreground));
  word-break: break-all;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid hsl(var(--border) / 0.4);
  background: hsl(var(--accent) / 0.25);
}

.plugin-modal-actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.75rem;
}

@media (min-width: 480px) {
  .plugin-modal-actions {
    flex-direction: row;
  }
}

body:has(.plugin-modal-overlay) {
  overflow: hidden;
}

/* Plugin grid — sıralı, glitchsiz giriş */
.plugin-card-stagger {
  opacity: 0;
  animation: pluginStaggerIn 0.42s var(--ease-out-expo) forwards;
}

@keyframes pluginStaggerIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plugin-card-stagger .card-hover {
  animation: none;
}

/* Eski çift animasyonu kapat */
.grid.gap-4 > .animate-scale-in {
  animation: none;
  opacity: 1;
}

/* ——— Typography ——— */
.gradient-text {
  background-image: linear-gradient(
    135deg,
    hsl(var(--foreground)) 0%,
    hsl(var(--glow) / 0.95) 45%,
    hsl(220 70% 78% / 0.95) 100%
  );
  background-size: 200% auto;
  animation: gradientShift 7s var(--ease-out-expo) infinite;
}

@keyframes gradientShift {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

h1,
h2,
h3 {
  letter-spacing: -0.03em;
}

/* ——— Hero CTA — modern standalone buttons ——— */
.hero-cta-group {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .hero-cta-group {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
  }
}

.hero-cta-group .hero-cta-primary,
.hero-cta-group .hero-cta-secondary {
  margin: 0;
  position: relative;
  isolation: isolate;
}

.hero-cta-group .hero-cta-primary a,
.hero-cta-group .hero-cta-primary {
  position: relative;
  z-index: 1;
  height: 3rem !important;
  min-height: 3rem;
  padding-left: 1.75rem !important;
  padding-right: 1.75rem !important;
  border-radius: 0.75rem !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  border: none !important;
  background: linear-gradient(
    135deg,
    hsl(265 70% 62%) 0%,
    hsl(240 75% 58%) 50%,
    hsl(220 80% 55%) 100%
  ) !important;
  background-size: 200% 200% !important;
  color: hsl(0 0% 100%) !important;
  box-shadow:
    0 0 0 1px hsl(265 80% 70% / 0.25) inset,
    0 4px 24px -6px hsl(265 70% 50% / 0.55),
    0 8px 32px -12px hsl(265 60% 40% / 0.35);
  animation: heroBtnShimmer 6s ease-in-out infinite;
  transition:
    transform 0.35s var(--ease-out-expo),
    box-shadow 0.35s var(--ease-out-expo),
    filter 0.3s ease;
}

.hero-cta-group .hero-cta-primary::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: calc(0.75rem + 1px);
  padding: 1px;
  background: linear-gradient(
    135deg,
    hsl(265 90% 75% / 0.6),
    hsl(220 90% 70% / 0.2),
    hsl(280 80% 75% / 0.5)
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.hero-cta-group .hero-cta-primary:hover::before {
  opacity: 1;
}

.hero-cta-group .hero-cta-secondary a,
.hero-cta-group .hero-cta-secondary {
  position: relative;
  z-index: 1;
  height: 3rem !important;
  min-height: 3rem;
  padding-left: 1.75rem !important;
  padding-right: 1.75rem !important;
  border-radius: 0.75rem !important;
  font-weight: 500;
  letter-spacing: -0.02em;
  border: 1px solid hsl(var(--border) / 0.6) !important;
  background: hsl(var(--card) / 0.35) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: hsl(var(--foreground)) !important;
  box-shadow:
    0 0 0 1px hsl(0 0% 100% / 0.04) inset,
    0 4px 20px -8px hsl(0 0% 0% / 0.4);
  transition:
    transform 0.35s var(--ease-out-expo),
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.35s var(--ease-out-expo);
}

.hero-cta-group .hero-cta-secondary::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0.75rem;
  background: linear-gradient(
    135deg,
    hsl(var(--glow) / 0.08) 0%,
    transparent 50%,
    hsl(220 70% 60% / 0.06) 100%
  );
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.hero-cta-group .hero-cta-primary:hover a,
.hero-cta-group .hero-cta-primary:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px hsl(265 80% 75% / 0.35) inset,
    0 8px 32px -6px hsl(265 70% 50% / 0.65),
    0 16px 48px -12px hsl(265 60% 45% / 0.4);
}

.hero-cta-group .hero-cta-secondary:hover::after {
  opacity: 1;
}

.hero-cta-group .hero-cta-secondary:hover a,
.hero-cta-group .hero-cta-secondary:hover {
  transform: translateY(-2px);
  border-color: hsl(var(--glow) / 0.35) !important;
  background: hsl(var(--accent) / 0.55) !important;
  box-shadow:
    0 0 0 1px hsl(var(--glow) / 0.12),
    0 8px 28px -8px hsl(var(--glow) / 0.25);
}

@keyframes heroBtnShimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* ——— Cards ——— */
.card-hover {
  transition:
    transform 0.5s var(--ease-out-expo),
    box-shadow 0.5s var(--ease-out-expo),
    border-color 0.35s ease,
    background-color 0.35s ease;
}

.card-hover::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
    ellipse 120% 80% at 50% 0%,
    hsl(var(--glow) / 0.1),
    transparent 55%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card-hover:hover::before {
  opacity: 1;
}

.card-hover:hover {
  transform: translateY(-4px);
  border-color: hsl(var(--glow) / 0.22) !important;
  background-color: hsl(var(--card) / 0.98) !important;
  box-shadow:
    0 0 0 1px hsl(var(--glow) / 0.1),
    0 20px 50px -16px hsl(0 0% 0% / 0.55),
    0 8px 24px -8px hsl(var(--glow) / 0.15);
}

.group.relative.bg-card {
  position: relative;
  overflow: hidden;
}

.bg-card {
  background: hsl(var(--card) / 0.88);
  backdrop-filter: blur(10px);
}


/* ——— Filter / category chips ——— */
.flex.flex-wrap.gap-3 button {
  border-radius: 9999px;
  padding-left: 1rem;
  padding-right: 1rem;
  transition:
    transform 0.3s var(--ease-out-expo),
    box-shadow 0.3s var(--ease-out-expo),
    background 0.25s ease,
    border-color 0.25s ease;
}

.flex.flex-wrap.gap-3 button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px -6px hsl(var(--glow) / 0.25);
}

.flex.flex-wrap.gap-3 button.bg-foreground,
.flex.flex-wrap.gap-3 button[class*="bg-primary"] {
  box-shadow: 0 0 20px -6px hsl(var(--glow) / 0.35);
}

/* ——— Search ——— */
input[type="text"] {
  border-radius: var(--radius);
  transition:
    border-color 0.3s ease,
    box-shadow 0.4s var(--ease-out-expo),
    background 0.3s ease;
}

input[type="text"]:focus {
  border-color: hsl(var(--glow) / 0.45) !important;
  box-shadow:
    0 0 0 3px hsl(var(--glow) / 0.12),
    0 8px 32px -12px hsl(var(--glow) / 0.2);
  background: hsl(var(--card) / 0.95);
}

/* ——— Global animations ——— */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.animate-fade-in {
  animation: fadeIn 0.65s var(--ease-out-expo) forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.9s var(--ease-out-expo) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s var(--ease-out-expo) forwards;
  opacity: 1;
}

.animate-delay-100,
.animate-delay-200,
.animate-delay-300,
.animate-delay-400,
.animate-delay-500 {
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Home feature tiles */
.grid .rounded-lg.bg-card\/50 {
  background: hsl(var(--card) / 0.5) !important;
  backdrop-filter: blur(14px);
  transition:
    transform 0.45s var(--ease-out-expo),
    border-color 0.35s ease,
    box-shadow 0.45s var(--ease-out-expo);
}

.grid .rounded-lg.bg-card\/50:hover {
  transform: translateY(-3px);
  border-color: hsl(var(--glow) / 0.18) !important;
  box-shadow: 0 16px 40px -20px hsl(var(--glow) / 0.2);
}

.grid.gap-4 {
  gap: 1.35rem;
}

.group.relative.bg-card.rounded-lg {
  border-radius: var(--radius);
}

main {
  animation: none;
}

footer {
  background: hsl(var(--card) / 0.35) !important;
  border-top-color: hsl(var(--border) / 0.45) !important;
}

.link-hover:hover {
  color: hsl(var(--glow) / 0.95);
}

.inline-flex.rounded-full.bg-accent {
  background: hsl(var(--accent) / 0.85) !important;
  border: 1px solid hsl(var(--border) / 0.55);
  backdrop-filter: blur(10px);
  box-shadow: 0 0 24px -10px hsl(var(--glow) / 0.3);
}

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-thumb {
  background: hsl(var(--muted));
  border-radius: 4px;
}

:focus-visible {
  outline: 2px solid hsl(var(--glow) / 0.5);
  outline-offset: 2px;
}
