/* ============================================
   FooxAI Animate - Global Styles
   Style: shadcn/ui inspired (slate theme)
   ============================================ */

:root {
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;
    --slate-950: #020617;

    --background: #FFFFFF;
    --foreground: var(--slate-900);
    --card: #FFFFFF;
    --card-foreground: var(--slate-900);
    --popover: #FFFFFF;
    --popover-foreground: var(--slate-900);
    --primary: var(--slate-900);
    --primary-foreground: #FFFFFF;
    --secondary: var(--slate-100);
    --secondary-foreground: var(--slate-900);
    --muted: var(--slate-50);
    --muted-foreground: var(--slate-500);
    --accent: var(--slate-100);
    --accent-foreground: var(--slate-900);
    --destructive: #dc2626;
    --destructive-foreground: #FFFFFF;
    --border: var(--slate-200);
    --input: var(--slate-200);
    --ring: var(--slate-400);
    --radius: 6px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

    --sidebar-width: 240px;
    --header-height: 60px;
}

html.dark {
    --background: #0F172A;
    --foreground: #F1F5F9;
    --card: #1E293B;
    --card-foreground: #F1F5F9;
    --popover: #1E293B;
    --popover-foreground: #F1F5F9;
    --primary: #F1F5F9;
    --primary-foreground: #0F172A;
    --secondary: #1E293B;
    --secondary-foreground: #F1F5F9;
    --muted: #1E293B;
    --muted-foreground: #94A3B8;
    --accent: #334155;
    --accent-foreground: #F1F5F9;
    --destructive: #ef4444;
    --destructive-foreground: #FFFFFF;
    --border: #334155;
    --input: #334155;
    --ring: #475569;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4), 0 1px 2px -1px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Skeleton Loading Screen
   ============================================ */
.skeleton-wrapper {
    padding: 16px 0;
    animation: skeleton-fade-in 0.2s ease-out;
}

@keyframes skeleton-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.skeleton-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-title {
    height: 18px;
    width: 60%;
    background: var(--slate-200);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--slate-200);
    border-radius: 6px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 12px;
    width: 100%;
    background: var(--slate-200);
    border-radius: 4px;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.skeleton-line.short {
    width: 40%;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

html.dark .skeleton-title,
html.dark .skeleton-image,
html.dark .skeleton-line {
    background: var(--slate-700);
}

/* View transition animations */
.view-enter {
    animation: view-enter 0.25s ease-out;
}

@keyframes view-enter {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.view-header {
    will-change: opacity, transform;
}

#view-content {
    will-change: opacity, transform;
}

/* Smooth page transitions */
.animate-fade-in {
    animation: fade-in 0.2s ease-out;
}

@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.animate-slide-up {
    animation: slide-up 0.25s ease-out;
}

@keyframes slide-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

body {
    font-family: var(--font-sans);
    color: var(--foreground);
    background: var(--background);
    line-height: 1.5;
    min-height: 100vh;
}

