/* Custom CSS for Blogger & Content Toolkit */

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

:root {
  --font-inter: 'Inter', sans-serif;
  --font-outfit: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-inter);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-outfit);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

.light ::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.3);
  border-radius: 4px;
}

.light ::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.5);
}

.dark ::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.25);
  border-radius: 4px;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.45);
}

/* Glassmorphism Styles */
.glass-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.dark .glass-panel {
  background: rgba(10, 8, 22, 0.75) !important;
  border: 1px solid rgba(99, 102, 241, 0.15);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.glass-input {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.8);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dark .glass-input {
  background: rgba(5, 4, 12, 0.6) !important;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.dark .glass-input:focus-within, 
.dark textarea:focus, 
.dark input:focus {
  border-color: rgba(99, 102, 241, 0.45) !important;
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.15) !important;
  outline: none;
}

/* Background Gradients & Effects */
.bg-mesh-light {
  background-color: #f8fafc;
  background-image: 
    radial-gradient(at 0% 0%, rgba(243, 244, 246, 1) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(238, 242, 255, 1) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(245, 243, 255, 0.8) 0px, transparent 50%),
    radial-gradient(at 0% 100%, rgba(243, 244, 246, 1) 0px, transparent 50%);
}

.bg-mesh-dark {
  background-color: #03010a; /* Ultra-deep dark violet-black */
  background-image: 
    radial-gradient(at 10% 20%, rgba(99, 102, 241, 0.1) 0px, transparent 50%),   /* Indigo glow */
    radial-gradient(at 90% 10%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),  /* Purple glow */
    radial-gradient(at 50% 80%, rgba(236, 72, 153, 0.05) 0px, transparent 50%),  /* Fuchsia glow */
    radial-gradient(at 0% 100%, rgba(6, 182, 212, 0.05) 0px, transparent 50%);   /* Cyan glow */
  background-attachment: fixed;
}

/* Grid overlay background */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(148, 163, 184, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
}

.dark .bg-grid-pattern {
  background-image: 
    linear-gradient(to right, rgba(99, 102, 241, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(99, 102, 241, 0.02) 1px, transparent 1px);
}

/* Premium Card hover glow (only for dark mode cards) */
.dark .glass-panel:hover {
  border-color: rgba(99, 102, 241, 0.3) !important;
  box-shadow: 0 10px 40px 0 rgba(99, 102, 241, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

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

.animate-fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

.animate-slide-in-left {
  animation: slideInLeft 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Checkbox styles for beautiful forms */
.custom-checkbox {
  @apply rounded border-slate-300 text-indigo-600 focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50 dark:border-slate-700 dark:bg-slate-800 dark:checked:bg-indigo-600;
}

/* Hide input range default styles for custom sliders */
.custom-range::-webkit-slider-runnable-track {
  background: rgba(99, 102, 241, 0.2);
  height: 6px;
  border-radius: 3px;
}

.dark .custom-range::-webkit-slider-runnable-track {
  background: rgba(99, 102, 241, 0.1);
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  background: rgb(99, 102, 241);
  height: 16px;
  width: 16px;
  border-radius: 50%;
  margin-top: -5px;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(99, 102, 241, 0.5);
  transition: transform 0.1s;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Line numbering container for textareas */
.textarea-container {
  position: relative;
  display: flex;
}

.line-numbers {
  text-align: right;
  padding: 1rem 0.5rem 1rem 0.75rem;
  font-family: monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #94a3b8;
  border-right: 1px solid rgba(226, 232, 240, 0.8);
  background-color: rgba(248, 250, 252, 0.5);
  user-select: none;
  overflow: hidden;
}

.dark .line-numbers {
  color: #475569;
  border-right: 1px solid rgba(51, 65, 85, 0.5);
  background-color: rgba(15, 23, 42, 0.3);
}

.line-numbered-textarea {
  flex: 1;
  font-family: monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 1rem;
  resize: vertical;
  outline: none;
  border: none;
  background: transparent;
}

/* Toast styling overrides */
.toast-success {
  border-left: 4px solid #10b981;
}

.toast-info {
  border-left: 4px solid #3b82f6;
}

.toast-warning {
  border-left: 4px solid #f59e0b;
}

.toast-error {
  border-left: 4px solid #ef4444;
}

/* Custom Tooltip */
.tooltip {
  position: relative;
}

.tooltip::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 4px 8px;
  background-color: #1e293b;
  color: #fff;
  font-size: 0.75rem;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 50;
}

.dark .tooltip::before {
  background-color: #0f172a;
}

.tooltip:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
