/* Custom styles for Knowledge Mark G blog */

/* Tailwind CSS base imports would go here in production */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Modern Animations and Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes floatDelay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

@keyframes slideInFromRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromLeft {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-blob {
    animation: blob 7s infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-float-delay {
    animation: floatDelay 4s ease-in-out infinite 2s;
}

.animate-float-slow {
    animation: floatSlow 5s ease-in-out infinite 1s;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-shimmer {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
    background-size: 468px 100%;
}

.animate-slide-in-right {
    animation: slideInFromRight 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInFromLeft 0.5s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}

.animate-spin-slow {
    animation: rotate 3s linear infinite;
}

.animate-gradient {
    animation: gradient 3s ease infinite;
    background-size: 200% 200%;
}

/* Animation Delays */
.animation-delay-1000 {
    animation-delay: 1s;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

/* Modern Glassmorphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Advanced Hover Effects */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-tilt {
    transition: all 0.3s ease;
}

.hover-tilt:hover {
    transform: perspective(1000px) rotateX(10deg) rotateY(-10deg);
}

.hover-glow {
    transition: all 0.3s ease;
    position: relative;
}

.hover-glow:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(45deg, #ff006e, #8338ec, #3a86ff);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Modern Scrollbar Styles */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.7);
}

/* Dark mode scrollbar */
.dark .scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

.dark .scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(75, 85, 99, 0.7);
}

/* Custom Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-rainbow {
    background: linear-gradient(135deg, #ff006e, #fb5607, #ffbe0b, #8338ec, #3a86ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 37%, #f0f0f0 63%);
    background-size: 400% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.dark .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 37%, #374151 63%);
    background-size: 400% 100%;
}

/* Modern Button Styles */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

/* Advanced Card Styles */
.card-modern {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.dark .card-modern {
    background: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-bottom: 8px;
}

.tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-bottom: 2px;
}

.tooltip:hover::after,
.tooltip:hover::before {
    opacity: 1;
}

/* Modern Focus Styles */
.focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 8px;
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Custom utilities */
.text-sm {
    font-size: 0.75rem !important;
    line-height: 1.25rem;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect ratio utilities */
.aspect-w-16 {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
}

.aspect-w-16 > * {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* Prose styles for blog content */
.prose {
    color: #374151;
    max-width: 65ch;
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    color: #111827;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.25;
}

.prose h1 { font-size: 2.25em; }
.prose h2 { font-size: 1.875em; }
.prose h3 { font-size: 1.5em; }
.prose h4 { font-size: 1.25em; }

.prose p {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    font-weight: 500;
}

.prose a:hover {
    color: #1d4ed8;
}

.prose strong {
    color: #111827;
    font-weight: 600;
}

.prose ul, .prose ol {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    padding-left: 1.625em;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose ul ul {
    list-style-type: circle;
}

.prose ul ul ul {
    list-style-type: square;
}

.prose ol ol {
    list-style-type: lower-alpha;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    display: list-item;
}

.prose blockquote {
    font-weight: 500;
    font-style: italic;
    color: #111827;
    border-left-width: 0.25rem;
    border-left-color: #e5e7eb;
    quotes: "\201C""\201D""\2018""\2019";
    margin-top: 1.6em;
    margin-bottom: 1.6em;
    padding-left: 1em;
}

.prose code {
    color: #111827;
    font-weight: 600;
    font-size: 0.875em;
    background-color: #f3f4f6;
    padding: 0.25rem 0.375rem;
    border-radius: 0.25rem;
}

.prose pre {
    color: #e5e7eb;
    background-color: #1f2937;
    overflow-x: auto;
    font-size: 0.875em;
    line-height: 1.7142857;
    margin-top: 1.7142857em;
    margin-bottom: 1.7142857em;
    border-radius: 0.375rem;
    padding: 0.8571429em 1.1428571em;
}

.prose pre code {
    background-color: transparent;
    border-width: 0;
    border-radius: 0;
    padding: 0;
    font-weight: 400;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
    line-height: inherit;
}

.prose img {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 0.5rem;
}

.prose table {
    width: 100%;
    table-layout: auto;
    text-align: left;
    margin-top: 2em;
    margin-bottom: 2em;
    font-size: 0.875em;
    line-height: 1.7142857;
}

.prose thead {
    border-bottom-width: 1px;
    border-bottom-color: #d1d5db;
}

.prose thead th {
    color: #111827;
    font-weight: 600;
    vertical-align: bottom;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
}

.prose tbody tr {
    border-bottom-width: 1px;
    border-bottom-color: #e5e7eb;
}

.prose tbody tr:last-child {
    border-bottom-width: 0;
}

.prose tbody td {
    vertical-align: baseline;
    padding-top: 0.5714286em;
    padding-right: 0.5714286em;
    padding-bottom: 0.5714286em;
    padding-left: 0.5714286em;
}

/* Dark mode prose styles */
.dark .prose {
    color: #d1d5db;
}

.dark .prose h1, .dark .prose h2, .dark .prose h3, .dark .prose h4, .dark .prose h5, .dark .prose h6 {
    color: #f9fafb;
}

.dark .prose strong {
    color: #f9fafb;
}

.dark .prose a {
    color: #60a5fa;
}

.dark .prose a:hover {
    color: #93c5fd;
}

.dark .prose blockquote {
    color: #f9fafb;
    border-left-color: #374151;
}

.dark .prose code {
    color: #f9fafb;
    background-color: #374151;
}

.dark .prose pre {
    color: #e5e7eb;
    background-color: #111827;
}

.dark .prose thead {
    border-bottom-color: #4b5563;
}

.dark .prose thead th {
    color: #f9fafb;
}

.dark .prose tbody tr {
    border-bottom-color: #374151;
}

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite 2s;
}

.animate-float-slow {
    animation: float-slow 10s ease-in-out infinite 4s;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Dark mode scrollbar */
.dark ::-webkit-scrollbar-track {
    background: #374151;
}

.dark ::-webkit-scrollbar-thumb {
    background: #6b7280;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Print styles */
@media print {
    .no-print, .no-print * {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black !important;
        background: white !important;
    }
    
    .prose {
        max-width: none;
    }
    
    h1, h2, h3, h4, h5, h6 {
        break-after: avoid;
        color: black !important;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
}

/* Focus styles for accessibility */
.focus\:ring-2:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px #2563eb;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gray-600 {
        color: #000000;
    }
    
    .text-gray-400 {
        color: #000000;
    }
    
    .border-gray-300 {
        border-color: #000000;
    }
}

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

/* Touch device optimizations */
@media (hover: none) {
    .hover\:shadow-lg:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    }
}

/* ============================================
   SIDEBAR REDESIGN - MINIMALIST GLASSMORPHISM MAGAZINE STYLE
   ============================================ */

/* Sidebar Sticky Container - Minimal Gap */
.sidebar-sticky-container {
    display: block;
    padding: 0;
    position: relative;
}

/* Sidebar Widget Base - Glassmorphism Minimal Style */
.sidebar-widget {
    position: relative;
    overflow: visible;
    background: rgba(255, 255, 255, 0.7) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease;
    animation: fadeInScale 0.6s ease-out backwards;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 10px 40px rgba(0, 0, 0, 0.03) !important;
    margin-bottom: 1rem;
}

.dark .sidebar-widget {
    background: rgba(17, 24, 39, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.3),
        0 10px 40px rgba(0, 0, 0, 0.2) !important;
}

/* Staggered Fade In Animation */
.sidebar-widget:nth-child(1) { animation-delay: 0.05s; }
.sidebar-widget:nth-child(2) { animation-delay: 0.1s; }
.sidebar-widget:nth-child(3) { animation-delay: 0.15s; }
.sidebar-widget:nth-child(4) { animation-delay: 0.2s; }
.sidebar-widget:nth-child(5) { animation-delay: 0.25s; }
.sidebar-widget:nth-child(6) { animation-delay: 0.3s; }
.sidebar-widget:nth-child(7) { animation-delay: 0.35s; }
.sidebar-widget:nth-child(8) { animation-delay: 0.4s; }

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Subtle Hover - Minimal Movement */
.sidebar-widget:hover {
    transform: translateY(-2px);
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 20px 60px rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(99, 102, 241, 0.15) !important;
}

.dark .sidebar-widget:hover {
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 20px 60px rgba(0, 0, 0, 0.3) !important;
    border-color: rgba(99, 102, 241, 0.25) !important;
}

/* Widget Headers - Minimal Clean Style */
.sidebar-widget h3 {
    font-weight: 600;
    letter-spacing: -0.02em;
    font-size: 0.813rem;
    text-transform: uppercase;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .sidebar-widget h3 {
    color: #9ca3af;
}

.sidebar-widget h3 svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sidebar-widget:hover h3 svg {
    opacity: 1;
}

/* Minimal Border - Left Accent */
.sidebar-widget h3[class*="border-b"] {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0.75rem !important;
    position: relative;
    padding-left: 0.75rem;
}

.sidebar-widget h3[class*="border-b"]::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #6366f1, #a855f7);
    border-radius: 10px;
}

/* Related Posts - Minimal Magazine Style */
.sidebar-widget article {
    position: relative;
    overflow: hidden;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    background: transparent;
}

.sidebar-widget article img {
    transition: all 0.4s ease;
    filter: grayscale(10%);
}

.sidebar-widget article:hover img {
    transform: scale(1.05);
    filter: grayscale(0%);
}

.sidebar-widget article h4 {
    transition: color 0.3s ease;
    font-weight: 500;
}

/* Tags Widget - Minimal Flat Pills */
.sidebar-widget a[class*="rounded-full"] {
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.75rem;
}

.sidebar-widget a[class*="rounded-full"]:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

/* Reading Progress Bar - Minimal Clean */
#reading-bar {
    position: relative;
    overflow: hidden;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #ec4899);
}

#reading-percent {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #111827;
}

.dark #reading-percent {
    color: #f9fafb;
}

/* Share Buttons - Minimal Flat Style */
.sidebar-widget button[onclick*="copyUrl"],
.sidebar-widget a[href*="twitter"],
.sidebar-widget a[href*="linkedin"] {
    transition: all 0.2s ease;
}

.sidebar-widget button[onclick*="copyUrl"]:hover,
.sidebar-widget a[href*="twitter"]:hover,
.sidebar-widget a[href*="linkedin"]:hover {
    transform: translateX(2px);
    opacity: 0.9;
}

/* Share Widget - Remove sticky, keep normal */
.sidebar-widget.share-widget-sticky {
    position: relative !important;
}

/* Table of Contents - Make it sticky to fill sidebar */
#sidebar-toc {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 1rem !important;
    z-index: 30 !important;
}

/* Mobile - normal positioning */
@media (max-width: 1023px) {
    #sidebar-toc {
        position: relative !important;
        top: auto !important;
    }
}

/* Ensure all sidebar widgets have full width */
.sidebar-sticky-container > .sidebar-widget {
    width: 100%;
}

/* Add gap between TOC and Tags widgets */
#sidebar-toc {
    margin-bottom: 1.5rem !important;
}

/* Newsletter Widget - Minimal Solid Design */
.sidebar-widget.bg-gradient-to-br {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(0px) !important;
}

.sidebar-widget.bg-gradient-to-br input {
    transition: all 0.2s ease;
}

.sidebar-widget.bg-gradient-to-br input:focus {
    border-color: rgba(255, 255, 255, 0.5);
}

.sidebar-widget.bg-gradient-to-br button {
    transition: all 0.2s ease;
}

.sidebar-widget.bg-gradient-to-br button:hover {
    transform: translateY(-1px);
}

/* TOC Widget - Minimal Clean Design */
#sidebar-toc {
    position: relative;
}

#sidebar-toc .toc-link {
    position: relative;
    padding-left: 0.75rem;
    transition: all 0.2s ease;
    font-size: 0.813rem;
}

#sidebar-toc .toc-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.3;
    transition: all 0.2s ease;
}

#sidebar-toc .toc-link:hover::before,
#sidebar-toc .toc-link.text-primary-600::before {
    opacity: 1;
    width: 6px;
    height: 6px;
}

#sidebar-toc .toc-link.text-primary-600 {
    background: transparent;
    font-weight: 600;
}

/* Categories Widget - Minimal List */
.sidebar-widget a[href*="/category/"] {
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-widget a[href*="/category/"]:hover {
    padding-left: 0.75rem;
}

.sidebar-widget a[href*="/category/"] span[class*="bg-gray"] {
    transition: all 0.2s ease;
    font-size: 0.75rem;
}

/* Recent Posts - Minimal Clean Design */
.sidebar-widget a[href*="/blog/"] {
    transition: all 0.2s ease;
}

.sidebar-widget a[href*="/blog/"]:hover {
    padding-left: 0.5rem;
}

/* Mobile Responsive Adjustments */
@media (max-width: 1023px) {
    .sidebar-widget {
        animation: fadeInUp 0.6s ease-out backwards;
    }

    .sidebar-sticky-container {
        padding: 0;
        gap: 1.5rem;
    }
}

/* Accessibility - Reduce Motion */
@media (prefers-reduced-motion: reduce) {
    .sidebar-widget,
    .sidebar-widget::before,
    .sidebar-widget::after,
    .sidebar-widget *,
    #reading-bar::before {
        animation: none !important;
        transition: none !important;
    }
}

/* Performance Optimization */
.sidebar-widget {
    contain: layout style paint;
    will-change: transform;
}

.sidebar-widget img {
    will-change: transform;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .sidebar-widget::after {
        opacity: 1;
        padding: 2px;
    }
}

/* Custom utilities for admin panel */
.admin-sidebar {
    transition: transform 0.3s ease-in-out;
}

.admin-sidebar.collapsed {
    transform: translateX(-100%);
}

@media (min-width: 768px) {
    .admin-sidebar.collapsed {
        transform: translateX(0);
        width: 4rem;
    }
    
    .admin-sidebar.collapsed .sidebar-text {
        display: none;
    }
}

/* Form validation styles */
.field-validation-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444 !important;
}

.validation-summary-errors {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 1.25rem;
    color: #dc2626;
}

/* Dark mode form validation */
.dark .validation-summary-errors {
    background-color: #3f1f1f;
    border-color: #5f2a2a;
}

.dark .validation-summary-errors ul {
    color: #fca5a5;
}

/* TinyMCE editor customization */
.tox-tinymce {
    border-radius: 0.375rem !important;
}

.tox .tox-toolbar__primary {
    background-color: #f9fafb !important;
}

.dark .tox .tox-toolbar__primary {
    background-color: #374151 !important;
}

/* Search suggestions dropdown */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 300px;
    overflow-y: auto;
}

.dark .search-suggestions {
    background: #1f2937;
    border-color: #374151;
}

.search-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.search-suggestion-item:hover {
    background-color: #f9fafb;
}

.dark .search-suggestion-item {
    border-bottom-color: #374151;
}

.dark .search-suggestion-item:hover {
    background-color: #374151;
}