/* Custom CSS */

:root {
    --primary-color: #c36a51; /* Clay 500 */
    --secondary-color: #7a3426; /* Clay 800 */
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Canvas Background Pattern */
.canvas-area {
    background-color: #f9fafb; /* Gray 50 */
    background-image: radial-gradient(#d1d5db 1px, transparent 1px);
    background-size: 24px 24px;
}

.sidebar-scroll {
    scrollbar-width: thin;
    scrollbar-color: #e5e7eb transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background-color: #e5e7eb;
    border-radius: 20px;
}

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

.animate-fade-in {
    animation: fade-in 0.3s ease-out;
}

/* HD Notification Animation - Center Big to Corner Small */
@keyframes hd-notification-enter {
    0% {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        bottom: auto;
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
        filter: blur(8px);
    }
    30% {
        opacity: 1;
        filter: blur(0px);
        transform: translate(-50%, -50%) scale(1.8);
    }
    100% {
        position: fixed;
        top: auto;
        left: auto;
        right: 1rem;
        bottom: 1rem;
        transform: translate(0, 0) scale(1);
        opacity: 1;
        filter: blur(0px);
    }
}

/* Wrapper needed because we can't animate position changes directly */
.hd-notification-animated {
    animation: hd-notification-swoosh 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes hd-notification-swoosh {
    0% {
        opacity: 0;
        transform: scale(2.5) translateY(-200px);
        filter: blur(4px);
    }
    20% {
        opacity: 1;
        transform: scale(2) translateY(-100px);
        filter: blur(2px);
    }
    50% {
        transform: scale(1.5) translateY(-30px);
        filter: blur(0px);
    }
    75% {
        transform: scale(1.1) translateY(5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0px);
    }
}

/* Glow pulse effect for HD badge */
@keyframes hd-glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(147, 51, 234, 0.5), 0 0 40px rgba(147, 51, 234, 0.3), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
    50% {
        box-shadow: 0 0 30px rgba(147, 51, 234, 0.7), 0 0 60px rgba(147, 51, 234, 0.4), 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    }
}

.hd-notification-glow {
    animation: hd-glow-pulse 2s ease-in-out infinite;
}

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

/* Comparison Slider */
#comparison-slider {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#comparison-slider-handle {
    touch-action: none;
    transition: opacity 0.2s ease;
}

#comparison-slider-handle:hover {
    opacity: 0.9;
}

#comparison-slider-handle:active {
    cursor: grabbing;
}

#comparison-after-container {
    transition: clip-path 0s linear;
}

/* Prevent text selection while dragging */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
