/* Custom CSS Enhancements & Global Fluid Responsive System */

html {
    /* Mobile & Tablet: clean readable base scale */
    font-size: clamp(14px, 0.35vw + 12.5px, 16px);
    overflow-x: clip;
    -webkit-text-size-adjust: 100%;
}

/* Laptop & Large PC Monitors: proportional viewport scaling so big screens keep exact laptop shape & proportions */
@media (min-width: 1280px) {
    html {
        font-size: clamp(15px, 1.11vw, 24px);
    }
}

body {
    overflow-x: clip;
}

/* Global Fluid Responsive Containers (rem-based so they scale proportionally on large monitors too) */
.tv-container {
    width: 100%;
    max-width: min(92vw, 72rem);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(0.875rem, 2.5vw, 2rem);
    padding-right: clamp(0.875rem, 2.5vw, 2rem);
}

.tv-container-wide {
    width: 100%;
    max-width: min(94vw, 84rem);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(0.875rem, 2.5vw, 2rem);
    padding-right: clamp(0.875rem, 2.5vw, 2rem);
}

/* Fluid Hero Section - Always fits cleanly above the fold on mobile, laptop & large PC */
.tv-hero {
    padding-top: clamp(1.25rem, 3.2vh, 2.75rem);
    padding-bottom: clamp(1rem, 2.5vh, 2rem);
}

.tv-h1 {
    font-size: clamp(1.65rem, 3.4vw, 3rem);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.tv-h1-home {
    font-size: clamp(1.9rem, 4.2vw, 3.5rem);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

.tv-lead {
    font-size: clamp(0.875rem, 1.35vw, 1.075rem);
    line-height: 1.55;
}

/* Fluid Tool Workspace & Dropzone */
.tv-tool-shell {
    padding: clamp(1rem, 2.5vw, 2rem);
}

.tv-dropzone {
    padding: clamp(1.5rem, 4vh, 3rem) clamp(1rem, 3vw, 2.5rem);
}

.tv-dropzone-icon {
    width: clamp(3.5rem, 6.5vh, 5rem);
    height: clamp(3.5rem, 6.5vh, 5rem);
    font-size: clamp(1.5rem, 3vh, 2.25rem);
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 25px rgba(99, 102, 241, 0.45);
    }
}

.drag-active {
    border-color: #4f46e5 !important;
    background-color: #eef2ff !important;
    animation: pulseGlow 1.5s infinite;
}

/* Custom scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Image preview card animations */
.image-card-enter {
    animation: fadeInScale 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Modal animation */
.animate-scaleIn {
    animation: scaleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ghost dragging item indicator */
.sortable-ghost {
    opacity: 0.35;
    transform: scale(0.95);
}
