/* Custom Styles complementing Tailwind CSS */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

body {
  font-family: var(--font-sans);
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.4);
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.7);
}

/* Glassmorphism helpers */
.glass-nav {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-card {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Radiant glow background blobs */
.ambient-glow {
  position: absolute;
  filter: blur(120px);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  animation: pulseGlow 10s ease-in-out infinite alternate;
}

@keyframes pulseGlow {
  0% {
    transform: scale(0.95) translate(0, 0);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.1) translate(20px, -20px);
    opacity: 0.65;
  }
  100% {
    transform: scale(1) translate(-10px, 15px);
    opacity: 0.5;
  }
}

/* Spotlight Card mouse tracking */
.spotlight-card {
  position: relative;
  overflow: hidden;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  top: var(--mouse-y, -1000px);
  left: var(--mouse-x, -1000px);
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

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

/* Shimmer animation for badges / borders */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

/* Accordion transition utility */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content.expanded {
  grid-template-rows: 1fr;
}

.accordion-content > div {
  overflow: hidden;
}

/* Toast message animations */
@keyframes toastSlideIn {
  from {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  from {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  to {
    transform: translateY(100%) scale(0.9);
    opacity: 0;
  }
}

.toast-enter {
  animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.toast-exit {
  animation: toastSlideOut 0.25s ease-in forwards;
}

/* ==========================================================================
   Visual Live Editor Styles
   ========================================================================== */
.edit-mode-active [contenteditable="true"] {
  transition: outline 0.15s ease, background-color 0.15s ease;
}

.edit-mode-active [contenteditable="true"]:hover {
  outline: 2px dashed rgba(99, 102, 241, 0.75) !important;
  outline-offset: 3px;
  cursor: text;
  background-color: rgba(99, 102, 241, 0.06);
  border-radius: 4px;
}

.edit-mode-active [contenteditable="true"]:focus {
  outline: 2px solid #6366f1 !important;
  outline-offset: 4px;
  background-color: rgba(99, 102, 241, 0.12);
  border-radius: 6px;
}

.edit-mode-active a {
  cursor: text;
}

.edit-mode-active .editable-img-wrapper {
  position: relative;
  cursor: pointer;
}

.edit-mode-active .editable-img-wrapper:hover::after {
  content: '📷 Change Image URL';
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.8);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #818cf8;
  border-radius: inherit;
  z-index: 25;
  backdrop-filter: blur(2px);
}

/* Floating Editor Dock */
#live-editor-dock {
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

