@import "tailwindcss";

/* Custom Design Tokens */
@theme {
    /* Primary Colors - Vibrant and Modern */
    --color-primary: oklch(0.65 0.25 250);
    --color-primary-hover: oklch(0.6 0.28 250);
    --color-secondary: oklch(0.7 0.2 280);

    /* Background Colors */
    --color-surface: oklch(0.99 0 0);
    --color-surface-elevated: oklch(0.97 0 0);

    /* Tool Category Colors */
    --color-compress: oklch(0.65 0.18 150);
    --color-resize: oklch(0.65 0.22 230);
    --color-crop: oklch(0.65 0.22 210);
    --color-convert: oklch(0.75 0.18 80);
    --color-watermark: oklch(0.6 0.25 240);
    --color-meme: oklch(0.65 0.2 300);

    /* Spacing Scale */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background-color: rgb(249 250 251);
    color: rgb(17 24 39);
}

/* Smooth Transitions */
.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg,
            oklch(0.65 0.25 250) 0%,
            oklch(0.7 0.2 280) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Card Hover Effect */
.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -5px rgb(0 0 0 / 0.15);
}

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

::-webkit-scrollbar-track {
    background: rgb(243 244 246);
}

::-webkit-scrollbar-thumb {
    background: rgb(156 163 175);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(107 114 128);
}

/* Badge Styles */
.badge-new {
    background: linear-gradient(135deg, oklch(0.65 0.25 250), oklch(0.7 0.2 280));
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right,
            rgb(243 244 246) 0%,
            rgb(229 231 235) 20%,
            rgb(243 244 246) 40%,
            rgb(243 244 246) 100%);
    background-size: 1000px 100%;
}

/* Line Clamp Utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Scanner Animation */
@keyframes scan {
    0% {
        top: 0;
    }

    100% {
        top: 100%;
    }
}

.animate-scan {
    animation: scan 3s linear infinite;
}