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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Upload Area Styles */
#upload-area {
    min-height: 240px;
    transition: all 0.2s ease;
}

#upload-area.dragging {
    background-color: rgba(243, 244, 246, 0.8);
    border-color: #9CA3AF;
}

/* Color Card Styles */
.color-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.color-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.color-preview {
    height: 140px;
    width: 100%;
    transition: transform 0.2s ease-in-out;
}

.color-card:hover .color-preview {
    transform: scale(1.02);
}

.color-info {
    padding: 0.75rem;
    font-size: 0.875rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-hex {
    letter-spacing: 0.05em;
    font-weight: 500;
}

.color-percentage {
    color: #9CA3AF;
    font-size: 0.75rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); }
    to { transform: translateY(0); }
}

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

.animate-slide {
    animation: slideUp 0.3s ease-out forwards;
}

/* Progress animation */
@keyframes progress {
    0% { width: 5%; }
    50% { width: 50%; }
    100% { width: 100%; }
}

#extraction-progress {
    animation: progress 2s ease-in-out forwards;
}

/* Toast notification */
#toast-notification.show {
    opacity: 1;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    15% { opacity: 1; }
    85% { opacity: 1; }
    100% { opacity: 0; }
}

/* Make palette container fade in smoothly */
#palette-container.visible {
    display: block;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Media queries for better mobile experience */
@media (max-width: 640px) {
    #upload-area {
        min-height: 180px;
        padding: 1.5rem;
    }
    
    .color-preview {
        height: 100px;
    }
}
