/* ============================================
   EditPIC - Professional Design System
   Mobile Optimized + Clean Professional Look
   ============================================ */

:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-500: #64748b;
    --gray-700: #334155;
    --gray-900: #0f172a;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* Mobile First Base */
* {
    transition: all 0.2s ease;
}

h1, h2, h3 {
    font-weight: 600;
    letter-spacing: -0.025em;
}

/* NAV */
nav {
    border-bottom: 1px solid var(--gray-200);
}

#tool-search {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
}

#tool-search:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* TOOL CARDS */
#tool-grid a {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 20px;
}

#tool-grid a:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05);
}

/* IMAGE PREVIEW */
.image-preview {
    background: var(--gray-50);
    border: 2px dashed var(--gray-200);
    border-radius: 16px;
    min-height: 220px;
}

.image-preview.dragover {
    border-color: var(--primary-light);
    background: #eff6ff;
}

/* BUTTONS */
.btn-primary {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
}

.btn-primary:hover {
    background-color: #1e3a8a;
}

.btn-secondary {
    background: white;
    border: 1px solid var(--gray-200);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 12px;
}

/* INPUTS */
input[type="range"] {
    accent-color: var(--primary);
}

input, select {
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
}

input:focus, select:focus {
    border-color: var(--primary-light);
    outline: none;
}

/* CANVAS */
canvas {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
}

/* COMMAND PALETTE */
#command-palette {
    position: fixed;
    top: 18%;
    left: 50%;
    transform: translateX(-50%);
    width: 94%;
    max-width: 480px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.15);
    z-index: 9999;
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 768px) {
    .image-preview {
        min-height: 180px;
    }
    
    #tool-grid a {
        padding: 16px;
    }
    
    h1 {
        font-size: 2.1rem;
        line-height: 1.1;
    }
    
    .btn-primary, .btn-secondary {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* History Panel */
.history-panel {
    max-height: 220px;
    overflow-y: auto;
}